private func setupVideoStreaming() {
videoSource = webRTCPeer.peerConnectionFactory.videoSource()
let videoTrack = webRTCPeer.peerConnectionFactory.videoTrack(with: videoSource, trackId: "screen_share_track_id")
let videoSender = webRTCPeer.localPeerConnection.peerConnection.sender(withKind: kRTCMediaStreamTrackKindVideo, streamId: "\(personID)_screen_sharing")
videoSender.track = videoTrack
videoCapturer = RTCVideoCapturer(delegate: videoSource)
}
private func setupVideoStreaming() {
localStream = webRTCPeer.peerConnectionFactory.mediaStream(withStreamId: "\(personID)_screen_sharing")
videoSource = webRTCPeer.peerConnectionFactory.videoSource()
videoCapturer = RTCVideoCapturer(delegate: videoSource)
videoSource.adaptOutputFormat(toWidth: 441, height: 736, fps: 15)
let videoTrack = webRTCPeer.peerConnectionFactory.videoTrack(with: videoSource, trackId: "screen_share_track_id")
videoTrack.isEnabled = true
localStream.addVideoTrack(videoTrack)
for localStream in webRTCPeer.localPeerConnection.peerConnection.localStreams {
webRTCPeer.localPeerConnection.peerConnection.remove(localStream)
}
webRTCPeer.localPeerConnection.peerConnection.add(localStream)
}
RPScreenRecorder.shared().startCapture(handler: { (sampleBuffer, bufferType, error) in
RPScreenRecorder.shared().startCapture(handler: { (sampleBuffer, bufrferType, error) in
// Getting buffers
}, completionHandler: nil)
NBMMediaConfiguration *config = [[NBMMediaConfiguration alloc] init];
config.rendererType = NBMRendererTypeOpenGLES;
config.audioBandwidth = 0;
config.videoBandwidth = 0;
config.audioCodec = NBMAudioCodecOpus;
config.videoCodec = NBMVideoCodecVP8;
NBMVideoFormat format;
format.dimensions = (CMVideoDimensions){720, 480};
format.frameRate = 30;
format.pixelFormat = NBMPixelFormat420f;
config.receiverVideoFormat = format;
config.cameraPosition = NBMCameraPositionAny;
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/11833f24-3429-46ed-a03d-5d49664bd3f1%40googlegroups.com.
You will have to create a custom ADM and inject it into peer connection. Not possible as direct implementation in iOS sdk of webrtc. It must be implemented in native api using c++.
Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to discuss...@googlegroups.com.