Search code examples
javascriptreactjswebrtc

getRemoteStreams from webRTC peerConnection undefined in safari or mobile IOS


I was build video call App using webRTC. The app was running smoothly until I tried using safari browser on mac and Chrome browser on Mobile IOS. The error was occur when I get the remote/local stream for my Video Tag sources. The error looks like this :

TypeError: e.getRemoteStreams is not a function. (In 'e.getRemoteStreams()', 'e.getRemoteStreams' is undefined)

I tried in chrome dekstop was work perfectly, Any idea the alternatives to get mediaStream from peerConnection except getRemoteStreams() and getLocalStreams() ?


Solution

  • I already found the solution, getLocalStreams() and getRemoteStreams() function was already deprecated, not all browser still support, safari and mobile browser i.e chrome, safari. So, you can go here for the alternatives way to get the local/remote streams.