mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 18:19:58 +00:00
Fix unused locals and better receiver selector available media checking
This commit is contained in:
@@ -21,22 +21,6 @@ let session: cast.Session;
|
||||
let wasSessionRequested = false;
|
||||
|
||||
let peerConnection: RTCPeerConnection;
|
||||
let drawWindowIntervalId: number;
|
||||
|
||||
|
||||
let availableMediaTypes =
|
||||
ReceiverSelectorMediaType.Screen
|
||||
| ReceiverSelectorMediaType.Tab;
|
||||
|
||||
/**
|
||||
* Remove "Screen" option when on an insecure origin as
|
||||
* MediaDevices.getDisplayMedia will not exist (and legacy
|
||||
* MediaDevices.getUserMedia mediaSource constraint will
|
||||
* fail).
|
||||
*/
|
||||
if (typeof navigator.mediaDevices.getDisplayMedia === "undefined") {
|
||||
availableMediaTypes &= ~ReceiverSelectorMediaType.Screen;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -124,7 +108,7 @@ async function onRequestSessionSuccess (newSession: cast.Session) {
|
||||
}
|
||||
|
||||
|
||||
drawWindowIntervalId = window.setInterval(drawWindow, 1000 / 30);
|
||||
window.setInterval(drawWindow, 1000 / 30);
|
||||
|
||||
/**
|
||||
* Capture video stream from canvas and feed into the RTC
|
||||
|
||||
Reference in New Issue
Block a user