Comments (12)
What device model and iOS version are you using? Does this error occur
every time? In what situation do you get the error? Can you list the steps?
What AppRTC Server are you connecting to and is the remote device a web
browser or another iOS device?
--kelly
On Thu, Jul 30, 2015 at 6:46 AM, Kos [email protected] wrote:
Arising some error,
onVideoError: NSConcreteNotification 0x16fc1a50 {name =
AVCaptureSessionRuntimeErrorNotification; object =
-> ; userInfo = {
AVCaptureSessionErrorKey = "Error Domain=AVFoundationErrorDomain
Code=-11800 "The operation could not be completed" UserInfo=0x16fb5230
{NSLocalizedDescription=The operation could not be completed,
NSUnderlyingError=0x16d0ae60 "The operation couldn\U2019t be completed.
(OSStatus error -12780.)", NSLocalizedFailureReason=An unknown error
occurred (-12780)}";
}}
Than: WARNING: Renegotiation needed but unimplemented.Than the App freezing
What should I do if delegate calls a peerConnectionOnRenegotiationNeeded
method?
I disabled an execution of device rotation.
Any ideas ?
Thanks!—
Reply to this email directly or view it on GitHub
#5.
from apprtc-ios.
So, I have a iPhone5, ios 8.4
Steps: I set connection up, similar to example, then a connection is established, everything's fine, video and audio exchanging is running, then rotate the device at 180grad ( tentatively ) then local video view is freezing and in this moment the error arises. The freezing is going until I rotate the device again by the same manner and the freezing is gone, a behavior of running is very weird, following log:
onVideoError: NSConcreteNotification 0x16fc1a50 {name = AVCaptureSessionRuntimeErrorNotification; object = <AVCaptureSession: 0x180a35a0 [AVCaptureSessionPresetInputPriority]>
<AVCaptureDeviceInput: 0x16dd1ba0 [Front Camera]> -> <AVCaptureVideoDataOutput: 0x180d8a30>; userInfo = {
AVCaptureSessionErrorKey = "Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x16fb5230 {NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x16d0ae60 "The operation couldn\U2019t be completed. (OSStatus error -12780.)", NSLocalizedFailureReason=An unknown error occurred (-12780)}";
}}
WARNING: Renegotiation needed but unimplemented.
WARNING: Renegotiation needed but unimplemented.
Exchange happens between browser and device.
I use default google stun servers.
I think, a server side is not guilty, it depends on some video capture system. Presumably, the webrtc lib consists of a lot of wrappers of native classes ( ObjC ) and probably inside of some class call a rotation method of device.
What should i do when delegate call a peerConnectionOnRenegotiationNeeded method?
What are cases a Renegotiation occurs ??
Because the "onVideoError" error occurs in the same time with the Renegotiation WARNING.
My take on it, this 2 events are connected with each other.
Thanks
from apprtc-ios.
Yes, rotation seems to cause a problem and lead to crashing. What needs to
happen is before rotation the app will need to destroy the views and
recreate them after rotation in the correct orientation.
On Thu, Jul 30, 2015 at 7:59 AM, Kos [email protected] wrote:
So, I have a iPhone5, ios 8.4
Steps: I set connection up, similar to example, then a connection is
established, everything's fine, View and audio exchanging is running, then
rotate the device at 180grad ( tentatively ) then local video view is
freezing and in this moment the error arises. The freezing is going until I
rotate the device again by the same manner and the freezing is gone, a
behavior of running is very weird, following log:
onVideoError: NSConcreteNotification 0x16fc1a50 {name =
AVCaptureSessionRuntimeErrorNotification; object =
-> ; userInfo = {
AVCaptureSessionErrorKey = "Error Domain=AVFoundationErrorDomain
Code=-11800 "The operation could not be completed" UserInfo=0x16fb5230
{NSLocalizedDescription=The operation could not be completed,
NSUnderlyingError=0x16d0ae60 "The operation couldn\U2019t be completed.
(OSStatus error -12780.)", NSLocalizedFailureReason=An unknown error
occurred (-12780)}";
}}
WARNING: Renegotiation needed but unimplemented.
WARNING: Renegotiation needed but unimplemented.
Exchange happens between browser and device.
I use default google stun servers.
I think, a server side is not guilty, it depends on some video capture
system. Presumably, the webrtc lib consists of a lot of wrappers of native
classes ( ObjC ) and probably inside of some class call a rotation method
of device.
What should i do when delegate call a peerConnectionOnRenegotiationNeeded
method?
What are cases a Renegotiation occurs ??
Because the "onVideoError" error occurs in the same time with the
Renegotiation WARNING.
My take on it, this 2 events are connected with each other.
Thanks—
Reply to this email directly or view it on GitHub
#5 (comment).
from apprtc-ios.
Must I do it within peerConnectionOnRenegotiationNeeded method?
from apprtc-ios.
Last time i looked into the issue it was related to
ARTCVideoChatViewController's videoView:didChangeVideoSize: method that is
called when orientation change. Looks like changing the frame size for
the RTCEAGLVideoView for the local and remote views is what leads to the
error.
-k
On Fri, Jul 31, 2015 at 10:50 AM, Kos [email protected] wrote:
Must I do it within peerConnectionOnRenegotiationNeeded method?
—
Reply to this email directly or view it on GitHub
#5 (comment).
from apprtc-ios.
Hello,
Look, Presumably I found a point that causes an issue.
Acoording to ticket: https://code.google.com/p/webrtc/issues/detail?id=3162&can=1&q=onVideoError&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20Area%20Status%20Owner%20Summary
There are discussing about stop video session on a background thread, so it's fine, a following code of ARDAppClient:
- (void)orientationChanged:(NSNotification *)notification {
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (UIDeviceOrientationIsLandscape(orientation) || UIDeviceOrientationIsPortrait(orientation)) {
//Remove current video track
RTCMediaStream *localStream = _peerConnection.localStreams[0];
[localStream removeVideoTrack:localStream.videoTracks[0]];
RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack];
if (localVideoTrack) {
[localStream addVideoTrack:localVideoTrack];
[_delegate appClient:self didReceiveLocalVideoTrack:localVideoTrack];
}
[_peerConnection removeStream:localStream];
[_peerConnection addStream:localStream];
}
}
A [localStream removeVideoTrack:localStream.videoTracks[0]] and RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack] are called from different threads and probably the system tries to call removeVideoTrack and createLocalVideoTrack simultaneously. I made a test, I inserted a pause (sth like sleep() ) between removeVideoTrack and createLocalVideoTrack, for convincing that a removeVideoTrack was executed and createLocalVideoTrack will be executed after, the problem is gone.
Look at my stack while my test was running:
The didChangeVideoSizes is selector that handles an error onVideoError ( when I talked about in the beginning).
What do you think about it? Would you agree that handling of two methods of video Capture is not good simultaneously?
from apprtc-ios.
Thats great to hear you solved the problem! Do you want to issue a pull
request and I can merge it into the code repository?
thanks!
On Thu, Aug 6, 2015 at 7:18 AM, Kos [email protected] wrote:
Hello,
Look, Presumably I found a point that causes a issue.
Acoording to ticket:
https://code.google.com/p/webrtc/issues/detail?id=3162&can=1&q=onVideoError&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20Area%20Status%20Owner%20Summary
There are discussing about stop video session on a background thread, so
it's fine, next a following code of ARDAppClient:
(void)orientationChanged:(NSNotification *)notification {
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (UIDeviceOrientationIsLandscape(orientation) || UIDeviceOrientationIsPortrait(orientation)) {
//Remove current video track
RTCMediaStream *localStream = _peerConnection.localStreams[0];
[localStream removeVideoTrack:localStream.videoTracks[0]];RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack]; if (localVideoTrack) { [localStream addVideoTrack:localVideoTrack]; [_delegate appClient:self didReceiveLocalVideoTrack:localVideoTrack]; } [_peerConnection removeStream:localStream]; [_peerConnection addStream:localStream];
}
}A [localStream removeVideoTrack:localStream.videoTracks[0]] and
RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack] are called
from different threads and probably the system tries to call
removeVideoTrack and createLocalVideoTrack simultaneously. I made a test, I
inserted a pause (sth like sleep() ) between removeVideoTrack and
createLocalVideoTrack, for convincing that a removeVideoTrack was executed
and createLocalVideoTrack will be executed after, the problem is gone.
Look at my stack while my test was running:
[image: screen shot 2015-08-06 at 16 48 51]
https://cloud.githubusercontent.com/assets/7373566/9113418/27ef23f4-3c5d-11e5-81f8-f5f57d73a7ea.pngThe didChangeVideoSizes is selector that handles an error onVideoError (
when I talked about in the beginning).
What do you think about it? Would you agree that handling of two methods
of video Capture is not good simultaneously?—
Reply to this email directly or view it on GitHub
#5 (comment).
from apprtc-ios.
Hi, I'm having the exact problem. For me, this error is occurring only when I add mandatoryConstraints for maxWidth and maxHeight. Without them, everything seems fine. By trial and error method I managed to find out that inserting 0.4 seconds pause anywhere between [localStream removeVideoTrack:localStream.videoTracks[0]]; and [_delegate appClient:self didReceiveLocalVideoTrack:localVideoTrack]; fixes the problem. Anything below 0.4 seconds doesn't work for me. Since pausing for 0.4 seconds is creating a delay I was wondering if there is a more elegant solution for this problem?
Thanks!
from apprtc-ios.
Guys look at my pull request. There are improvements regarding the issue
from apprtc-ios.
Yep, works like a charm now. Thanks!
One more thing, when I used the default way to detect orientation changes using UIDeviceOrientation, it would register FaceUp and FaceDown orientation change and cause local view to be reloaded unnecessarily so I switched to UIInterfaceOrientation and that seems to work better for me.
from apprtc-ios.
I'm using @kos9kus 's fix, and generally it works - rotates fine, with one exception - front camera, when orientation is set to 4 (UIDeviceOrientationLandscapeRight). Then I just get a black screen. Any ideas?
from apprtc-ios.
Hello guys! I Maybe fix it. This is my solution :
In ARDAppClient class
-
(void)orientationChanged:(NSNotification )notification
{
/
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
if (UIDeviceOrientationIsLandscape(orientation) || UIDeviceOrientationIsPortrait(orientation))
{
//Remove current video track
RTCMediaStream *localStream = _peerConnection.localStreams[0];
RTCVideoTrack *localVideoTrack = localStream.videoTracks[0];
[localStream removeVideoTrack:localVideoTrack];//RTCVideoTrack *localVideoTrack = [self createLocalVideoTrack]; if (localVideoTrack) { [localStream addVideoTrack:localVideoTrack]; [_delegate appClient:self didReceiveLocalVideoTrack:localVideoTrack]; } [_peerConnection removeStream:localStream]; [_peerConnection addStream:localStream];
}
*/
}
Do nothing in it
from apprtc-ios.
Related Issues (20)
- IOS Native App for WebRTC
- Error posting data: The network connection was lost.
- Xcode 10 issue with -lstdc++.6 HOT 3
- Call freezed then ended automatically
- [__NSSingleEntryDictionaryI length]: unrecognized selector sent to instance 0x281de6360 ??
- Voice is not exchanging between peers with CallKit
- Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) When add stream to peerconnection
- Unknown selected data source for Port Speaker (type: Speaker)
- Failed to set remote video description send parameters HOT 1
- project successfully build but doesn't run HOT 3
- iceRestart option in createOffer
- I want to remove Echo and Noise, but didn't success
- failed to create session description webrtc in ios
- Local video doesn't be rendered. It doesn't be sent to remote machine on IOS 13 HOT 23
- How to capture a local vidoe stream apply filter and and share with peer
- How to use this project on the Swift? HOT 4
- local and remote video not call delegate function HOT 1
- how can i run this code HOT 4
- Can I use this to chat with ordinary pictures and texts at the same time
- one-to-one videos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apprtc-ios.