Commit 80e9c84a by aquilescanta Committed by Oliver Woodman

Remove RemotePlayer

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=217708323
parent 50dd0897
...@@ -33,7 +33,7 @@ import com.google.android.exoplayer2.Timeline; ...@@ -33,7 +33,7 @@ import com.google.android.exoplayer2.Timeline;
import com.google.android.exoplayer2.Timeline.Period; import com.google.android.exoplayer2.Timeline.Period;
import com.google.android.exoplayer2.ext.cast.CastPlayer; import com.google.android.exoplayer2.ext.cast.CastPlayer;
import com.google.android.exoplayer2.ext.cast.MediaItem; import com.google.android.exoplayer2.ext.cast.MediaItem;
import com.google.android.exoplayer2.ext.cast.RemotePlayer; import com.google.android.exoplayer2.ext.cast.SessionAvailabilityListener;
import com.google.android.exoplayer2.source.ConcatenatingMediaSource; import com.google.android.exoplayer2.source.ConcatenatingMediaSource;
import com.google.android.exoplayer2.source.ExtractorMediaSource; import com.google.android.exoplayer2.source.ExtractorMediaSource;
import com.google.android.exoplayer2.source.MediaSource; import com.google.android.exoplayer2.source.MediaSource;
...@@ -52,7 +52,7 @@ import java.util.ArrayList; ...@@ -52,7 +52,7 @@ import java.util.ArrayList;
/** Manages players and an internal media queue for the ExoPlayer/Cast demo app. */ /** Manages players and an internal media queue for the ExoPlayer/Cast demo app. */
/* package */ class DefaultReceiverPlayerManager /* package */ class DefaultReceiverPlayerManager
implements EventListener, RemotePlayer.SessionAvailabilityListener, PlayerManager { implements EventListener, SessionAvailabilityListener, PlayerManager {
private static final String USER_AGENT = "ExoCastDemoPlayer"; private static final String USER_AGENT = "ExoCastDemoPlayer";
private static final DefaultHttpDataSourceFactory DATA_SOURCE_FACTORY = private static final DefaultHttpDataSourceFactory DATA_SOURCE_FACTORY =
......
...@@ -53,8 +53,8 @@ import java.util.concurrent.CopyOnWriteArraySet; ...@@ -53,8 +53,8 @@ import java.util.concurrent.CopyOnWriteArraySet;
* *
* <p>The behavior of this class depends on the underlying Cast session, which is obtained from the * <p>The behavior of this class depends on the underlying Cast session, which is obtained from the
* Cast context passed to {@link #CastPlayer}. To keep track of the session, {@link * Cast context passed to {@link #CastPlayer}. To keep track of the session, {@link
* #isCastSessionAvailable()} can be queried and {@link RemotePlayer.SessionAvailabilityListener} * #isCastSessionAvailable()} can be queried and {@link SessionAvailabilityListener} can be
* can be implemented and attached to the player. * implemented and attached to the player.
* *
* <p>If no session is available, the player state will remain unchanged and calls to methods that * <p>If no session is available, the player state will remain unchanged and calls to methods that
* alter it will be ignored. Querying the player state is possible even when no session is * alter it will be ignored. Querying the player state is possible even when no session is
...@@ -88,7 +88,7 @@ public final class CastPlayer extends BasePlayer { ...@@ -88,7 +88,7 @@ public final class CastPlayer extends BasePlayer {
// Listeners. // Listeners.
private final CopyOnWriteArraySet<EventListener> listeners; private final CopyOnWriteArraySet<EventListener> listeners;
private RemotePlayer.SessionAvailabilityListener sessionAvailabilityListener; private SessionAvailabilityListener sessionAvailabilityListener;
// Internal state. // Internal state.
private CastTimeline currentTimeline; private CastTimeline currentTimeline;
...@@ -257,9 +257,9 @@ public final class CastPlayer extends BasePlayer { ...@@ -257,9 +257,9 @@ public final class CastPlayer extends BasePlayer {
/** /**
* Sets a listener for updates on the cast session availability. * Sets a listener for updates on the cast session availability.
* *
* @param listener The {@link RemotePlayer.SessionAvailabilityListener}. * @param listener The {@link SessionAvailabilityListener}.
*/ */
public void setSessionAvailabilityListener(RemotePlayer.SessionAvailabilityListener listener) { public void setSessionAvailabilityListener(SessionAvailabilityListener listener) {
sessionAvailabilityListener = listener; sessionAvailabilityListener = listener;
} }
......
...@@ -15,31 +15,12 @@ ...@@ -15,31 +15,12 @@
*/ */
package com.google.android.exoplayer2.ext.cast; package com.google.android.exoplayer2.ext.cast;
import com.google.android.exoplayer2.Player; /** Listener of changes in the cast session availability. */
public interface SessionAvailabilityListener {
/** A {@link Player} for playing media remotely using the Google Cast framework. */ /** Called when a cast session becomes available to the player. */
public interface RemotePlayer extends Player { void onCastSessionAvailable();
/** Listener of changes in the cast session availability. */ /** Called when the cast session becomes unavailable. */
interface SessionAvailabilityListener { void onCastSessionUnavailable();
/** Called when a cast session becomes available to the player. */
void onCastSessionAvailable();
/** Called when the cast session becomes unavailable. */
void onCastSessionUnavailable();
}
/** Returns whether a cast session is available. */
boolean isCastSessionAvailable();
/**
* Sets a listener for updates on the cast session availability.
*
* @param listener The {@link SessionAvailabilityListener}.
*/
void setSessionAvailabilityListener(SessionAvailabilityListener listener);
/** Returns the {@link MediaItemQueue} associated to this player. */
MediaItemQueue getMediaItemQueue();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment