open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
389 stars 181 forks source link

分流时,只有视频没有音频 #562

Open tenchong opened 2 years ago

tenchong commented 2 years ago

分流时,只有视频没有音频,或有时,一开始有音频,然后一下后面就没有了。

jianjunz commented 2 years ago

Please describe your issue in detail, with reproduce steps, your expectations and actual results. Thanks.

tenchong commented 2 years ago

Hello. The version 4.3.1 is used, and then IOS shunts and subscribes to the audio and video on the computer side. You can only see the video and can't hear the sound. The computer side can hear the sound and see the video with each other. IOS confluence can be normal. What is the reason?

jianjunz commented 2 years ago

Please check whether you iOS client received RTP packets for audio. If so, please make sure AVAudioSession is correctly configured.

tenchong commented 2 years ago

[[M2MOWTManager sharedSocket] subscribe:remoteStream withOptions:nil success:^(OWTConferenceSubscription * _Nonnull subscription) { videoView.subscription = subscription; videoView.subscriptionId = videoView.subscription.subscriptionId; dispatch_async(dispatch_get_main_queue(), ^{ [remoteStream attach:videoView.remoteVideoView];

});

} failure:^(NSString * _Nonnull error) { NSLog(@"%@",error); }];

Hello, The above is the code for me to subscribe to the video, how to mark AVAudioSession is correctly configured.

jianjunz commented 2 years ago

Configuration of AVAudioSession depends on your requirements, you may want to override output to speaker or default.