fix
This commit is contained in:
parent
c4f1e4d8c0
commit
c5fb07f6da
@ -27,6 +27,16 @@
|
|||||||
captureFn = sourceElt.mozCaptureStream;
|
captureFn = sourceElt.mozCaptureStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(sourceElt instanceof HTMLCanvasElement){
|
||||||
|
captureFn = sourceElt.captureStream.bind(sourceElt)
|
||||||
|
} else {
|
||||||
|
if(sourceElt.mozCaptureStream){
|
||||||
|
captureFn = sourceElt.mozCaptureStream.bind(sourceElt)
|
||||||
|
} else {
|
||||||
|
captureFn = sourceElt.captureStream.bind(sourceElt)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const canvasStream = captureFn()
|
const canvasStream = captureFn()
|
||||||
const canvasStreamTracks = canvasStream.getVideoTracks()
|
const canvasStreamTracks = canvasStream.getVideoTracks()
|
||||||
if(canvasStreamTracks.length > 0){
|
if(canvasStreamTracks.length > 0){
|
||||||
|
Loading…
Reference in New Issue
Block a user