Agora-Flutter-SDK
Agora-Flutter-SDK copied to clipboard
Video not play after rejoin channel
Version of the agora_rtc_engine
6.2.1 We are using flutter for lives streaming . When i leave channel and rejoin channel. Log show joinLive success but the livestream has only audio. I check log , i see when i leave channel i receive : " PlayerBase::stop() from IPlayer" but when i rejoin channel i don't see it start again. I try run your demo, it also got the same error
Platforms affected
- [X] Android
- [X] iOS
- [ ] macOS
- [ ] Windows
- [ ] Web
Steps to reproduce
- Join channel
- Leave channel
- join channel
Expected results
- Audio and video are playing
Actual results
only audio play
Code sample
Code sample
InkWell( onTap: () { if (widget.agoraUtils?.inChannel == true) { widget.agoraUtils?.inChannel = false; widget.agoraUtils?.engine().leaveChannel();
} else {
final channel =
context.read<PlayVideoCubit>().getChannel();
widget.agoraUtils?.inChannel = true;
widget.agoraUtils
?.engine()
.joinChannel(
token: channel!.token,
channelId: channel.channelId,
uid: channel.uid,
options: const ChannelMediaOptions(
autoSubscribeAudio: true,
autoSubscribeVideo: true,
channelProfile: ChannelProfileType.channelProfileLiveBroadcasting,
clientRoleType: ClientRoleType.clientRoleAudience,
audienceLatencyLevel: AudienceLatencyLevelType
.audienceLatencyLevelLowLatency))
.then((value) {
print("vo");
widget.agoraUtils?.engine().enableVideo();
widget.agoraUtils?.engine().enableAudio();
print("test");
}, onError: (err) {
print(err);
});
}
},
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]
Flutter Doctor output
Doctor output
[Paste your output here]