question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<video .srcObject> not working

See original GitHub issue

Description

<video .srcObject={stream}>. The variable stream is never changed, and video does not play properly when repeating render

Steps to Reproduce

  1. open https://codesandbox.io/s/lit-html-props-test-1pite
  2. allow permission request
  3. click <video> play button

Expected Results

can’t play

Actual Results

play

Browsers Affected

  • Chrome 80
  • Firefox 73

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mantou132commented, Dec 10, 2019

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 set

0reactions
justinfagnanicommented, Dec 12, 2019

Thanks for pointing this out. It’s helpful to know about.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found