<video .srcObject> not working
See original GitHub issueDescription
<video .srcObject={stream}>
.
The variable stream
is never changed, and video does not play properly when repeating render
Steps to Reproduce
- open https://codesandbox.io/s/lit-html-props-test-1pite
- allow permission request
- click <video> play button
Expected Results
can’t play
Actual Results
play
Browsers Affected
- Chrome 80
- Firefox 73
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
WebRTC. Not showing video - javascript - Stack Overflow
Working code: ... srcObject = mediaStream; video.onloadedmetadata = function(e) { video.play(); }; }) .catch(function(err) ...
Read more ><video .srcObject> not working · Issue #1048 · lit/lit - GitHub
<video .srcObject={stream}> . The variable stream is never changed, and video does not play properly when repeating render. Steps to Reproduce.
Read more >HTMLMediaElement.srcObject - Web APIs | MDN
In this example, a MediaStream from a camera is assigned to a newly-created <video> element. const mediaStream = await navigator.mediaDevices.
Read more >Simple WebRTC Not Working - Google Groups
I am trying to code a simple example of using MediaStream API "getUserMedia" but I'll be damned if I can figure out why...
Read more >Dealing with HTMLMediaElements and srcObjects in ...
If you tried to have more than 75 audio and video elements playing, then some of them would have thrown this error instead...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thx. lit-html is just setting properties. it’s up to developer to avoid this.
HTMLMediaElement.prototype.srcObject
is setter, it looks like the video status is updated every time it is setThanks for pointing this out. It’s helpful to know about.