Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

how switch camera in ios?

snow__fly
初学者
4,816 次查看

      hi!

            how switch camera in ios? 

          I use :

               self.myCamera = AVCaptureDevice.defaultDevice(withDeviceType: .builtInWideAngleCamera, mediaType: AVMediaTypeVideo, position: .front)

              let cameraid=self.myCamera?.uniqueID

              self.myCameraPar=RTCLocalCameraStreamParameters(videoEnabled: true, audioEnabled: true)
            // [parameters setResolutionWidth:352 height:288];
                self.myCameraPar?.setResolutionWidth(352, height: 288)
            
                self.myCameraPar?.setCameraId(cameraid!) 
            
                self.localCanmerStream=RTCLocalCameraStream(parameters: self.myCameraPar!)

          I switch camera,but no success! 

             /*

 let session =  AVCaptureSession()
            
            do {
                let    Input1 = try AVCaptureDeviceInput(device: self.myCamera)
                let    Input2 = try AVCaptureDeviceInput(device: self.myCamera2)
                
                session.beginConfiguration()
                
                
                session.removeInput(Input1)
                
                let b =  session.canAddInput(Input2)
                if(b)
                {
                    session.addInput(Input2)
                    print("okOKokok")
                }
                else
                {
                    print("nononono")
                }
               
                
                session.commitConfiguration()
                session.startRunning()

   */

 I look at API  "RTCAVFoundationVideoSource" ,but I can not use.

        let t = RTCAVFoundationVideoSource.init(constraints: <#T##RTCMediaConstraints!#>)
            
            t?.useBackCamera = true 

 

 

0 项奖励
22 回复数
krishna__venkata
初学者
582 次查看

Hello Team,

Till next update, we decided to republish the ICSLocalStream every time when user switch camera. But after 2 times of switching camera we got issue as like below.

ICE connection state changed to checking

 Remote stream added.

 Empty candidate.

 ICE connection state changed to connected

 ICE connection state changed to completed

How to resolve the issue, till now we can not configure ICE servers at our application end. While Android application, how many times we will switch camera we cannot get this issue.

Please help us to resolve this issue, its major functionality for application.

 

Thank you.

0 项奖励
Dabhi__Hardik
初学者
582 次查看

Hello,

Is there any ios opening who knows webRTC ?Please let me know

0 项奖励
回复