Can't send Media Stream of captureStream() through WebRTC

901 Views Asked by At

I create a WebRTC with simple peer. I need to capture stream from video element and send it to peers. I use vidEl.captureStream() to get Media Stream from video element and send it to other peer. It's working but only audio and video is blackscreen(not something is display). [Testing] I create another video element on same origin of first video element and use captureStream() and test setObject with Media Stream captured and it's working. How to send MediaStream from video.captureStream() to new peer through WebRTC and display video from remote peer. Sorry for bad english.

2

There are 2 best solutions below

0
QuangNV On

https://webrtc.github.io/samples/src/content/capture/video-pc/ This sample does'nt work on chrome, edge but fire is worked. I don't know why.

0
Philipp Hancke On

There is currently an open bug in Chrome which breaks this: https://bugs.chromium.org/p/chromium/issues/detail?id=1156408