UnbindVideoElement
See original GitHub issueHello,
Am trying to get the following effect.
- Video streams are already “bind” successfully to small thumb nails
- When user press on the thumb nails, video stream is first “unbind” from the smaller thumb nail and then “bind” to a larger sized element.
Am unable to get both unbindVideoElement
and bindVideoElement
working in stage (2).
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
AudioVideoFacade | amazon-chime-sdk-js
Gets an AnalyserNode from the current audio input. This node can be used to generate the display for a mic indicator. null is...
Read more >javascript - Amazon chime SDK - Video not stopping when ...
When on a video call and the stopLocalVideoTile() method is called (by clicking a button). I have also tried using removeLocalVideoTile() ...
Read more >amazon-chime-sdk-js | Yarn - Package Manager
Clean up the HTML video element bounded to VideoTileState using unbindVideoElement API to fix Safari memory leak. If you do not intend to...
Read more >What is the Amazon Chime SDK?
You can choose to implement some or all of the available media modalities (audio, video, and screen share) for a single rate. Messaging,...
Read more >react createRef TypeScript Examples - ProgramCreek.com
... bindVideoElement, unbindVideoElement, nameplatePosition = 'bottom', } = props; const containerRef = createRef<HTMLDivElement>(); const videoRef = React.
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
cool, thanks for your help.
I think it would be helpful to have unbindVideoElement remove the srcObject, or at least to make it clear in the documentation that unbindVideoElement won’t remove the video stream from the video element, because I think most people would assume it just does the opposite of bindVideoElement
Interesting, so you’re saying all unbindVideoElement is supposed to do is trigger a videoTileDidUpdate with boundVideoElement = null and that if I want to remove the video stream from that video element I need to do that myself?
I have video tiles setup very similar to the components library’s RemoteTile, where each video tile takes a tileId as props and has a useEffect to unbind/bind to that tileId when it’s updated:
The problem I was running into is that we are implementing a “pin user to top tile” feature and expected that we could simply swap the order of the tileIds in state and when each video tile received a new tileId, it would unbind the old tileId and bind the new tileId. this worked fine when the tiles that were being swapped both had active video streams, but if one stream was inactive (the participant had their camera off), the video element which previously had the active stream would still show it. Based on your explanation, this is because unbindVideoElement does not remove the old srcObject and the new inactive tileId didn’t have a new srcObject to replace the old srcObject Replacing unbindVideoElement with removing the srcObject seems work as expected: