Pause the stream returned by getUserMedia

后端 未结 2 1127
礼貌的吻别
礼貌的吻别 2021-01-16 06:21

I have channelled the stream returned by getUserMedia to element in html page, video now can be seen in that element. The problem is that if I pau

2条回答
  •  天涯浪人
    2021-01-16 06:52

    Looks like MediaStreamTrack.enabled can be toggled to temporarily pause the video stream.

    The enabled property on the MediaStreamTrack interface is a Boolean value which is true if the track is allowed to render the source stream or false if it is not. This can be used to intentionally mute a track. When enabled, a track's data is output from the source to the destination; otherwise, empty frames are output.

提交回复
热议问题