Agora-Flutter-SDK icon indicating copy to clipboard operation
Agora-Flutter-SDK copied to clipboard

Video not play after rejoin channel

Open manhpv-1697 opened this issue 1 year ago • 1 comments

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

  1. Join channel
  2. Leave channel
  3. 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]
![Uploading Screenshot 2024-10-13 at 00.08.19.png…]()

Flutter Doctor output

Doctor output
[Paste your output here]

manhpv-1697 avatar Oct 12 '24 17:10 manhpv-1697