Skip to content

Commit 603565d

Browse files
lastpeonylastpeonyburak-58
authored
add speaking indicator feature for conference (#63)
* add speaking indicator feature for conference * add track stats to stat collector * keep backward compatibility * keep backward compatibility * keep backward compatibility * improvements * for test * for test * for test * for test * for test * improve unittest * set codecov token * change codecov version --------- Co-authored-by: lastpeony <[email protected]> Co-authored-by: burak-58 <[email protected]>
1 parent 48beefe commit 603565d

File tree

17 files changed

+1106
-47
lines changed

17 files changed

+1106
-47
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
api-level: 33
5656
arch: x86_64
5757
target: playstore
58-
emulator-build: 9322596 #31.3.14.0 It can be get by running -> ./emulator -version
58+
#emulator-build: 9322596 #31.3.14.0 It can be get by running -> ./emulator -version
5959
force-avd-creation: false
6060
disable-animations: true
6161
cores: 3

webrtc-android-framework/src/main/java/io/antmedia/webrtcandroidframework/api/DefaultConferenceWebRTCListener.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package io.antmedia.webrtcandroidframework.api;
22

3+
import org.webrtc.VideoTrack;
4+
5+
import io.antmedia.webrtcandroidframework.websocket.Broadcast;
6+
37
/**
48
* Default implementation of {@link IWebRTCListener} for conference applications
59
* You may extend this class and override methods that you need
@@ -8,6 +12,12 @@ public class DefaultConferenceWebRTCListener extends DefaultWebRTCListener {
812
private final String roomId;
913
private final String streamId;
1014

15+
@Override
16+
public void onNewVideoTrack(VideoTrack track, String streamId) {
17+
super.onNewVideoTrack(track, streamId);
18+
19+
}
20+
1121
/*
1222
* This flag is used to check if the play is started or not
1323
* if play is not started, it will start when publish is started
@@ -27,6 +37,13 @@ public DefaultConferenceWebRTCListener(String roomId, String streamId) {
2737
this.streamId = streamId;
2838
}
2939

40+
@Override
41+
public void onBroadcastObject(Broadcast broadcast) {
42+
super.onBroadcastObject(broadcast);
43+
44+
45+
}
46+
3047
@Override
3148
public void onPublishStarted(String streamId) {
3249
super.onPublishStarted(streamId);

webrtc-android-framework/src/main/java/io/antmedia/webrtcandroidframework/api/DefaultWebRTCListener.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,18 @@ public void onStreamInfoList(String streamId, ArrayList<StreamInfo> streamInfoLi
114114

115115
@Override
116116
public void onNewVideoTrack(VideoTrack track) {
117+
onNewVideoTrack(track, null);
118+
}
119+
120+
@Override
121+
public void onNewVideoTrack(VideoTrack track, String trackId) {
117122
String messageText = "New video track received";
118123
callbackCalled(messageText);
119124

120125
for (SurfaceViewRenderer r : webRTCClient.getConfig().remoteVideoRenderers) {
121126
if (r.getTag() == null) {
122127
r.setTag(track);
128+
123129
webRTCClient.setRendererForVideoTrack(r, track);
124130
break;
125131
}

webrtc-android-framework/src/main/java/io/antmedia/webrtcandroidframework/api/IWebRTCClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77
import org.webrtc.VideoTrack;
88
import org.webrtc.audio.CustomWebRtcAudioRecord;
99

10+
import io.antmedia.webrtcandroidframework.core.StatsCollector;
11+
1012
/**
1113
* Created by karinca on 20.10.2017.
1214
*/
1315

1416
public interface IWebRTCClient {
1517

18+
1619
/**
1720
* This enum is used to specify the stream source
1821
*/
@@ -261,4 +264,7 @@ void publish(String streamId, String token, boolean videoCallEnabled, boolean au
261264
*/
262265
void toggleAudioOfAllParticipants(boolean enabled);
263266

267+
268+
StatsCollector getStatsCollector();
269+
264270
}

webrtc-android-framework/src/main/java/io/antmedia/webrtcandroidframework/api/IWebRTCListener.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,15 @@ public interface IWebRTCListener {
105105
*/
106106
void onNewVideoTrack(VideoTrack track);
107107

108+
/**
109+
* It's called when a new video track is added.
110+
*
111+
* @param track
112+
* @param trackId
113+
* @return
114+
*/
115+
void onNewVideoTrack(VideoTrack track, String trackId);
116+
108117
/**
109118
* It's called when a video track is removed.
110119
*

0 commit comments

Comments
 (0)