-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error : Cannot send video as audio #26
Comments
Alright.. Looks like I found the issue. It is indeed the order of media in the answer received. handleAnswerReceived() function: now the media_sessions are in the order of "Video" and "Audio". So the "audio" payload was sent with "Video" media session and hence creating the problem. (Just to quickly test, i reversed the media_sessions list and tried. It worked) A simple fix would be in this line: NSDictionary *mediaDescription = sdp[@"mediaDescriptions"][i++]; instead of using variable i, find that media description object in answer whose mtype = media_session source type. |
You're welcome to make a patch and pull request for this fix. Perhaps take the first video session and set the video source on it, and the first audio session and set the audio source on it. Or something more flexible if you're interested in implementing it. |
Sure thing :) |
Nice @ShGup, looking forward to it! |
@ShGup we would really appreciate a PR for your fix. Let us know if you are unable to do it and we will add it to our TODO list. Thanks in advance. |
Hi,
Using the SDK, We are trying to publish both Audio and Video.
nativeHandler.startGetCaptureSourcesForAudio(true, video: true)
However, when I try to handle the answer received, following error is encountered:
0:06:19.694238000 �[334m 837�[00m 0x1036df070 �[31;01mERROR �[00m �[00m owrtransportagent owr_transport_agent.c:703:handle_new_send_source:�[00m Cannot send video as audio
0:07:14.218096000 �[334m 837�[00m 0x1036df070 �[31;01mERROR �[00m �[00m owrtransportagent owr_transport_agent.c:703:handle_new_send_source:�[00m Cannot send audio as video
(If I only try to Set Capture Source as Audio, things work fine. )
I tied matching the answer SDP from your native-demo project and my project and they both look similar. The only difference was the order of mediaDescriptions was reversed. In my answer, audio was the first media and yours video was the first media. (I dont think that should matter though). Let me know if you need my sample answer sdp
The text was updated successfully, but these errors were encountered: