Register media instance with session and prepare communication with embedder

This commit is contained in:
Fernando Jiménez Moreno 2019-10-08 10:18:13 +02:00
parent 9c329a7935
commit 4d147d2c56
8 changed files with 107 additions and 4 deletions

View file

@ -474,6 +474,9 @@ pub struct Constellation<Message, LTF, STF> {
/// Mechanism to force the compositor to process events.
event_loop_waker: Option<Box<dyn EventLoopWaker>>,
/// Browser ID of the active media session, if any.
active_media_session: Option<TopLevelBrowsingContextId>,
}
/// State needed to construct a constellation.
@ -843,6 +846,7 @@ where
glplayer_threads: state.glplayer_threads,
player_context: state.player_context,
event_loop_waker: state.event_loop_waker,
active_media_session: None,
};
constellation.run();
@ -1774,6 +1778,9 @@ where
new_value,
);
},
FromScriptMsg::MediaSessionEventMsg(browser_id, event) => {
// TODO
},
}
}