Skip to content

Commit 5b0c6fb

Browse files
author
xianing
committed
adapt 3.7.200
1 parent 3a12b8e commit 5b0c6fb

9 files changed

Lines changed: 35 additions & 12 deletions

File tree

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/AdjustVolume.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private void joinChannel(String channelId) {
246246
}
247247
/** Allows a user to join a channel.
248248
if you do not specify the uid, we will generate the uid for you*/
249-
engine.enableAudioVolumeIndication(1000, 3);
249+
engine.enableAudioVolumeIndication(1000, 3, true);
250250

251251
ChannelMediaOptions option = new ChannelMediaOptions();
252252
option.autoSubscribeAudio = true;

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/CustomRemoteVideoRender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ public int getVideoFormatPreference() {
490490
}
491491

492492
@Override
493-
public int getRotationApplied() {
494-
return 0;
493+
public boolean getRotationApplied() {
494+
return false;
495495
}
496496

497497
@Override

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/MediaPlayer.java

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import io.agora.api.example.utils.CommonUtil;
2626
import io.agora.mediaplayer.IMediaPlayer;
2727
import io.agora.mediaplayer.IMediaPlayerObserver;
28+
import io.agora.mediaplayer.data.SrcInfo;
2829
import io.agora.rtc2.ChannelMediaOptions;
2930
import io.agora.rtc2.Constants;
3031
import io.agora.rtc2.IRtcEngineEventHandler;
@@ -547,8 +548,8 @@ public void run() {
547548
}
548549

549550
@Override
550-
public void onPlayerEvent(io.agora.mediaplayer.Constants.MediaPlayerEvent mediaPlayerEvent) {
551-
Log.e(TAG, " onPlayerEvent mediaPlayerEvent " + mediaPlayerEvent);
551+
public void onPlayerEvent(io.agora.mediaplayer.Constants.MediaPlayerEvent mediaPlayerEvent, long l, String s) {
552+
552553
}
553554

554555
@Override
@@ -560,8 +561,28 @@ public void onPlayBufferUpdated(long l) {
560561

561562
}
562563

564+
@Override
565+
public void onPreloadEvent(String s, io.agora.mediaplayer.Constants.MediaPlayerPreloadEvent mediaPlayerPreloadEvent) {
566+
567+
}
568+
563569
@Override
564570
public void onCompleted() {
565571
Log.e(TAG, "onCompleted");
566572
}
573+
574+
@Override
575+
public void onAgoraCDNTokenWillExpire() {
576+
577+
}
578+
579+
@Override
580+
public void onPlayerSrcInfoChanged(SrcInfo srcInfo, SrcInfo srcInfo1) {
581+
582+
}
583+
584+
@Override
585+
public void onPlayerIdsRenew(String s) {
586+
587+
}
567588
}

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ProcessAudioRawData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ private void joinChannel(String channelId) {
289289
if (TextUtils.equals(accessToken, "") || TextUtils.equals(accessToken, "<#YOUR ACCESS TOKEN#>")) {
290290
accessToken = null;
291291
}
292-
engine.enableAudioVolumeIndication(1000, 3);
292+
engine.enableAudioVolumeIndication(1000, 3, false);
293293
ChannelMediaOptions option = new ChannelMediaOptions();
294294
option.autoSubscribeAudio = true;
295295
option.autoSubscribeVideo = true;

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ProcessRawData.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ public int getVideoFormatPreference() {
332332
}
333333

334334
@Override
335-
public int getRotationApplied() {
336-
return 0;
335+
public boolean getRotationApplied() {
336+
return false;
337337
}
338338

339339
@Override

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/PushExternalVideo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private void joinChannel(String channelId) {
246246
* method to send the video frame to the Agora SDK:
247247
* true: Use the push mode.
248248
* false: Use the pull mode (not supported).*/
249-
engine.setExternalVideoSource(true, true, false);
249+
engine.setExternalVideoSource(true, true, Constants.ExternalVideoSourceType.VIDEO_FRAME);
250250

251251
/**Please configure accessToken in the string_config file.
252252
* A temporary token generated in Console. A temporary token is valid for 24 hours. For details, see

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/SimpleAudioExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private void joinChannel(String channelId) {
235235
if (TextUtils.equals(accessToken, "") || TextUtils.equals(accessToken, "<#YOUR ACCESS TOKEN#>")) {
236236
accessToken = null;
237237
}
238-
engine.enableAudioVolumeIndication(1000, 3);
238+
engine.enableAudioVolumeIndication(1000, 3, false);
239239
ChannelMediaOptions option = new ChannelMediaOptions();
240240
option.autoSubscribeAudio = true;
241241
option.autoSubscribeVideo = true;

Android/APIExample/app/src/main/java/io/agora/api/example/examples/basic/JoinChannelAudio.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.agora.api.example.examples.basic;
22

33
import android.content.Context;
4+
import android.media.AudioRecordingConfiguration;
45
import android.os.Bundle;
56
import android.os.Handler;
67
import android.text.TextUtils;
@@ -111,6 +112,7 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState)
111112
config.mEventHandler = iRtcEngineEventHandler;
112113
config.mAudioScenario = Constants.AudioScenario.getValue(Constants.AudioScenario.HIGH_DEFINITION);
113114
engine = RtcEngine.create(config);
115+
engine.startAudioRecording();
114116
}
115117
catch (Exception e)
116118
{
@@ -221,7 +223,7 @@ private void joinChannel(String channelId)
221223
}
222224
/** Allows a user to join a channel.
223225
if you do not specify the uid, we will generate the uid for you*/
224-
engine.enableAudioVolumeIndication(1000, 3);
226+
engine.enableAudioVolumeIndication(1000, 3, true);
225227

226228
ChannelMediaOptions option = new ChannelMediaOptions();
227229
option.autoSubscribeAudio = true;

macOS/APIExample/Examples/Advanced/AudioMixing/AudioMixing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ class AudioMixing: BaseViewController {
469469

470470
@IBAction func onStartAudioMixing(_ sender: NSButton) {
471471
if let filepath = Bundle.main.path(forResource: "audiomixing", ofType: "mp3") {
472-
let result = agoraKit.startAudioMixing("", loopback: false, replace: false, cycle: -1)
472+
let result = agoraKit.startAudioMixing(filepath, loopback: false, replace: false, cycle: -1)
473473
if result != 0 {
474474
self.showAlert(title: "Error", message: "startAudioMixing call failed: \(result), please check your params")
475475
} else {

0 commit comments

Comments
 (0)