Skip to content

Commit 9651f28

Browse files
Manik Sachdevarobjperez
Manik Sachdeva
authored andcommitted
remove subscribe to self (opentok#165)
1 parent 2eaccd2 commit 9651f28

File tree

6 files changed

+0
-47
lines changed

6 files changed

+0
-47
lines changed

Custom-Audio-Driver/app/src/main/java/com/tokbox/android/tutorials/custom_audio_driver/MainActivity.java

-11
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ public void onError(Session session, OpentokError opentokError) {
172172
public void onStreamReceived(Session session, Stream stream) {
173173
Log.d(TAG, "onStreamReceived: New stream " + stream.getStreamId() + " in session " + session.getSessionId());
174174

175-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
176-
return;
177-
}
178175
if (mSubscriber != null) {
179176
return;
180177
}
@@ -186,9 +183,6 @@ public void onStreamReceived(Session session, Stream stream) {
186183
public void onStreamDropped(Session session, Stream stream) {
187184
Log.d(TAG, "onStreamDropped: Stream " + stream.getStreamId() + " dropped from session " + session.getSessionId());
188185

189-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
190-
return;
191-
}
192186
if (mSubscriber == null) {
193187
return;
194188
}
@@ -203,11 +197,6 @@ public void onStreamDropped(Session session, Stream stream) {
203197
@Override
204198
public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
205199
Log.d(TAG, "onStreamCreated: Own stream " + stream.getStreamId() + " created");
206-
if (!OpenTokConfig.SUBSCRIBE_TO_SELF) {
207-
return;
208-
}
209-
210-
subscribeToStream(stream);
211200
}
212201

213202
@Override

Custom-Audio-Driver/app/src/main/java/com/tokbox/android/tutorials/custom_audio_driver/OpenTokConfig.java

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@ public class OpenTokConfig {
1010
public static final String SESSION_ID = "";
1111
// Replace with a generated token (from the dashboard or using an OpenTok server SDK)
1212
public static final String TOKEN = "";
13-
14-
// Subscribe to a stream published by this client. Set to false to subscribe
15-
// to other clients' streams only.
16-
public static final boolean SUBSCRIBE_TO_SELF = true;
1713
}

Custom-Video-Driver/app/src/main/java/com/tokbox/android/tutorials/custom_video_driver/MainActivity.java

-12
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ public void onError(Session session, OpentokError opentokError) {
170170
public void onStreamReceived(Session session, Stream stream) {
171171
Log.d(TAG, "onStreamReceived: New stream " + stream.getStreamId() + " in session " + session.getSessionId());
172172

173-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
174-
return;
175-
}
176173
if (mSubscriber != null) {
177174
return;
178175
}
@@ -184,9 +181,6 @@ public void onStreamReceived(Session session, Stream stream) {
184181
public void onStreamDropped(Session session, Stream stream) {
185182
Log.d(TAG, "onStreamDropped: Stream " + stream.getStreamId() + " dropped from session " + session.getSessionId());
186183

187-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
188-
return;
189-
}
190184
if (mSubscriber == null) {
191185
return;
192186
}
@@ -201,12 +195,6 @@ public void onStreamDropped(Session session, Stream stream) {
201195
@Override
202196
public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
203197
Log.d(TAG, "onStreamCreated: Own stream " + stream.getStreamId() + " created");
204-
205-
if (!OpenTokConfig.SUBSCRIBE_TO_SELF) {
206-
return;
207-
}
208-
209-
subscribeToStream(stream);
210198
}
211199

212200
@Override

Custom-Video-Driver/app/src/main/java/com/tokbox/android/tutorials/custom_video_driver/OpenTokConfig.java

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@ public class OpenTokConfig {
1010
public static final String SESSION_ID = "";
1111
// Replace with a generated token (from the dashboard or using an OpenTok server SDK)
1212
public static final String TOKEN = "";
13-
14-
// Subscribe to a stream published by this client. Set to false to subscribe
15-
// to other clients' streams only.
16-
public static final boolean SUBSCRIBE_TO_SELF = false;
1713
}

Live-Photo-Capture/app/src/main/java/com/tokbox/android/tutorials/live_photo_capture/MainActivity.java

-12
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,6 @@ public void onError(Session session, OpentokError opentokError) {
188188
public void onStreamReceived(Session session, Stream stream) {
189189
Log.d(TAG, "onStreamReceived: New stream " + stream.getStreamId() + " in session " + session.getSessionId());
190190

191-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
192-
return;
193-
}
194191
if (mSubscriber != null) {
195192
return;
196193
}
@@ -202,9 +199,6 @@ public void onStreamReceived(Session session, Stream stream) {
202199
public void onStreamDropped(Session session, Stream stream) {
203200
Log.d(TAG, "onStreamDropped: Stream " + stream.getStreamId() + " dropped from session " + session.getSessionId());
204201

205-
if (OpenTokConfig.SUBSCRIBE_TO_SELF) {
206-
return;
207-
}
208202
if (mSubscriber == null) {
209203
return;
210204
}
@@ -219,12 +213,6 @@ public void onStreamDropped(Session session, Stream stream) {
219213
@Override
220214
public void onStreamCreated(PublisherKit publisherKit, Stream stream) {
221215
Log.d(TAG, "onStreamCreated: Own stream " + stream.getStreamId() + " created");
222-
223-
if (!OpenTokConfig.SUBSCRIBE_TO_SELF) {
224-
return;
225-
}
226-
227-
subscribeToStream(stream);
228216
}
229217

230218
@Override

Live-Photo-Capture/app/src/main/java/com/tokbox/android/tutorials/live_photo_capture/OpenTokConfig.java

-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,4 @@ public class OpenTokConfig {
1010
public static final String SESSION_ID = "";
1111
// Replace with a generated token (from the dashboard or using an OpenTok server SDK)
1212
public static final String TOKEN = "";
13-
14-
// Subscribe to a stream published by this client. Set to false to subscribe
15-
// to other clients' streams only.
16-
public static final boolean SUBSCRIBE_TO_SELF = true;
1713
}

0 commit comments

Comments
 (0)