- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Tags:
- HTML5
- JavaScript*
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Is there any ios opening who knows webRTC ?Please let me know
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »