Skip to content

Commit

Permalink
[Android]Adapt to 4.3.0 latest version.
Browse files Browse the repository at this point in the history
  • Loading branch information
xgfd3 committed Dec 6, 2023
1 parent fe1216f commit cb693eb
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.agora.api.example.examples.advanced;

import static io.agora.api.example.common.model.Examples.ADVANCED;
import static io.agora.rtc2.Constants.REMOTE_VIDEO_STATE_PLAYING;
import static io.agora.rtc2.Constants.REMOTE_VIDEO_STATE_DECODING;
import static io.agora.rtc2.video.VideoCanvas.RENDER_MODE_HIDDEN;
import static io.agora.rtc2.video.VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_15;
import static io.agora.rtc2.video.VideoEncoderConfiguration.ORIENTATION_MODE.ORIENTATION_MODE_ADAPTIVE;
Expand Down Expand Up @@ -139,8 +139,7 @@ public void onCreate(@Nullable Bundle savedInstanceState) {
// This api can only be used in the private media server scenario, otherwise some problems may occur.
engine.setLocalAccessPoint(localAccessPointConfiguration);
}
}
catch (Exception e) {
} catch (Exception e) {
e.printStackTrace();
getActivity().onBackPressed();
}
Expand Down Expand Up @@ -415,7 +414,7 @@ public void onRemoteAudioStateChanged(int uid, int state, int reason, int elapse
* to REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED(3), REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED(5),
* or REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE(7).
* REMOTE_VIDEO_STATE_STARTING(1): The first remote video packet is received.
* REMOTE_VIDEO_STATE_PLAYING(2): The remote video stream is decoded and plays normally,
* REMOTE_VIDEO_STATE_DECODING(2): The remote video stream is decoded and plays normally,
* probably due to REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY (2),
* REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED(4), REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED(6),
* or REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY(9).
Expand Down Expand Up @@ -446,8 +445,8 @@ public void onRemoteAudioStateChanged(int uid, int state, int reason, int elapse
public void onRemoteVideoStateChanged(int uid, int state, int reason, int elapsed) {
super.onRemoteVideoStateChanged(uid, state, reason, elapsed);
Log.i(TAG, "onRemoteVideoStateChanged->" + uid + ", state->" + state + ", reason->" + reason);
if (state == REMOTE_VIDEO_STATE_PLAYING) {
/*REMOTE_VIDEO_STATE_PLAYING as the basis for judging whether there is a broadcaster
if (state == REMOTE_VIDEO_STATE_DECODING) {
/*REMOTE_VIDEO_STATE_DECODING as the basis for judging whether there is a broadcaster
* in the channel.
* But you should judge according to your own business logic, here is just for example,
* not for reference.*/
Expand Down

0 comments on commit cb693eb

Please sign in to comment.