this is so viewers can see the controls for their desktop stream, which
should give them a hint if that video is stopped and no-longer
streaming. we also have to pause and play the main stream when the
destkop stream is paused / resumed.
function renderDesktopStream() {
return m("video.lp-video", {
id: "desktop-video",
+ controls: true,
autoplay: true
+ // Sync speaker stream state as best we can.
+ onpause: app.withVideo("speaker-video", function(video) {
+ video.pause();
+ }),
+ onplay: app.withVideo("speaker-video", function(video) {
+ video.play();
+ })
}, [
m("source", { src: app.mountToStreamUrl(stream.desktopMount) + "?t=" + (new Date() * 1) }),
m("p",