mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Hololens - Show/hide media controls according to playback state
This commit is contained in:
parent
c810962d78
commit
d633c8b9da
7 changed files with 69 additions and 4 deletions
|
@ -432,6 +432,15 @@ void ServoControl::OnServoIMEStateChanged(bool aShow) {
|
|||
// https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-implementingtextandtextrange
|
||||
}
|
||||
|
||||
void ServoControl::OnServoMediaSessionMetadata(hstring title, hstring artist,
|
||||
hstring album) {
|
||||
RunOnUIThread([=] { mOnMediaSessionMetadataEvent(title, artist, album); });
|
||||
}
|
||||
|
||||
void ServoControl::OnServoMediaSessionPlaybackStateChange(int state) {
|
||||
RunOnUIThread([=] { mOnMediaSessionPlaybackStateChangeEvent(*this, state); });
|
||||
}
|
||||
|
||||
template <typename Callable> void ServoControl::RunOnUIThread(Callable cb) {
|
||||
Dispatcher().RunAsync(CoreDispatcherPriority::High, cb);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue