webrtc-working-example icon indicating copy to clipboard operation
webrtc-working-example copied to clipboard

addStream doesn't exist in standard

Open normen opened this issue 2 years ago • 1 comments

Thanks for this example, it helped me a lot. I found that the addStream function hasn't been implemented on Safari as its not part of the standard apparently, so changing this line: https://github.com/pfertyk/webrtc-working-example/blob/b33afd66c3da97e8acc83a5e4d2a1915f5397fd2/web/main.js#L67

to the following worked for me

localStream.getTracks().forEach(track => pc.addTrack(track, localStream))

Thanks again!

normen avatar Jul 12 '22 19:07 normen

Hi! Thanks for reaching out :) I was sure that the "track vs stream" issue was already resolved in one of the previous PRs, but apparently not quite ... I'll take a look at this ;)

Cheers, Paweł

pfertyk avatar Jul 13 '22 20:07 pfertyk