草庐IT

localStream

全部标签

ios - 使用 react-native-webrtc 断开视频通话

我已经使用react-native-webrtc实现了基于WebRTC的视频通话。它是一对一的调用并且工作正常,但是当我断开调用并尝试再次重新连接时,重新连接会花费很多时间并且有时会挂起应用程序。下面是断开连接的代码:functionstopLocalStream(){if(friends!=null){friends.forEach(friend=>{leave(friend.socketId)})}if(localStream!=null){localStream.getTracks().forEach(t=>t.stop())localStream.release()localS

ios - 如何使用WEBRTC最新框架<Anakros/WebRTC>中videoview显示localstream的方法? - 用于 webrtc 框架(iOS)

更新最新的webrtc框架后,我不知道如何向用户显示本地流,因为方法已更改,在存储库的“iOS”文件夹中没有示例。在旧代码中...RTCVideoCapturer*capturer=[RTCVideoCapturercapturerWithDeviceName:cameraID];RTCMediaConstraints*mediaConstraints=[selfdefaultMediaStreamConstraints];RTCVideoSource*videoSource=[_factoryvideoSourceWithCapturer:capturerconstraints:me