I have channelled the stream returned by getUserMedia to <video>
element in html page, video now can be seen in that element. The problem is that if I pause the video from the controls of video element, and then resume after x seconds, then the timer being shown in video element will jump to pauseTime + x seconds. I guess this is because the stream is not getting paused as we pause the playback in video element. If so can we pause the stream too.
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
That is the very thing of Streams, you can't pause them...
But what you can do however, is to buffer this stream, and play what you've bufferred.
To achieve this with a MediaStream, you can make use of the MediaRecorder API, along with the MediaSource API.
But note that now, you'll obviously get more delay than when you were reading the stream directly.
And as a fiddle since StackSnippets are not very gUM friendly.