| Index: chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerController.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerController.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerController.java
|
| index 97237945085a89b46b86cfce7db5c7e112e269d2..e2289f559c20a19984f7d50394ddd22f973986a1 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerController.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerController.java
|
| @@ -185,6 +185,11 @@ public class RemoteMediaPlayerController implements MediaRouteController.UiListe
|
| */
|
| public void requestRemotePlayback(
|
| MediaRouteController.MediaStateListener player, MediaRouteController controller) {
|
| + // If we are already casting then simply switch to new video.
|
| + if (controller.isBeingCast()) {
|
| + controller.playerTakesOverCastDevice(player);
|
| + return;
|
| + }
|
| Activity currentActivity = ApplicationStatus.getLastTrackedFocusedActivity();
|
| mChromeVideoActivity = new WeakReference<Activity>(currentActivity);
|
|
|
| @@ -272,41 +277,6 @@ public class RemoteMediaPlayerController implements MediaRouteController.UiListe
|
| }
|
|
|
| /**
|
| - * Returns the current remote playback position.
|
| - *
|
| - * @return The current position of the remote playback in milliseconds.
|
| - */
|
| - public int getPosition() {
|
| - if (mCurrentRouteController == null) return -1;
|
| - return mCurrentRouteController.getPosition();
|
| - }
|
| -
|
| - /**
|
| - * @return The stream duration in milliseconds.
|
| - */
|
| - public int getDuration() {
|
| - if (mCurrentRouteController == null) return 0;
|
| - return mCurrentRouteController.getDuration();
|
| - }
|
| -
|
| - /**
|
| - * @return Whether the video is currently being played.
|
| - */
|
| - public boolean isPlaying() {
|
| - return mCurrentRouteController != null && mCurrentRouteController.isPlaying();
|
| - }
|
| -
|
| - /**
|
| - * Initiates a seek request for the remote playback device to the specified position.
|
| - *
|
| - * @param msec The position to seek to, in milliseconds.
|
| - */
|
| - public void seekTo(int msec) {
|
| - if (mCurrentRouteController == null) return;
|
| - mCurrentRouteController.seekTo(msec);
|
| - }
|
| -
|
| - /**
|
| * @return the currently playing MediaRouteController
|
| */
|
| public MediaRouteController getCurrentlyPlayingMediaRouteController() {
|
|
|