Java Code Examples for org.chromium.chrome.browser.media.remote.RemoteVideoInfo.PlayerState#INVALIDATED
The following examples show how to use
org.chromium.chrome.browser.media.remote.RemoteVideoInfo.PlayerState#INVALIDATED .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RemoteMediaPlayerBridge.java From delion with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { if (mNativeRemoteMediaPlayerBridge == 0) return; if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { nativeOnPlaybackFinished(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PLAYING) { nativeOnPlaying(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PAUSED) { mPauseRequested = false; nativeOnPaused(mNativeRemoteMediaPlayerBridge); } }
Example 2
Source File: ExpandedControllerActivity.java From delion with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { RemoteVideoInfo videoInfo = new RemoteVideoInfo(mVideoInfo); videoInfo.state = newState; setVideoInfo(videoInfo); scheduleProgressUpdate(); if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { // If we are switching to a finished state, stop the notifications. finish(); } }
Example 3
Source File: AbstractMediaRouteController.java From delion with Apache License 2.0 | 5 votes |
@VisibleForTesting void setPlayerStateForMediaItemState(int state) { PlayerState playerState = PlayerState.STOPPED; switch (state) { case MediaItemStatus.PLAYBACK_STATE_BUFFERING: playerState = PlayerState.LOADING; break; case MediaItemStatus.PLAYBACK_STATE_CANCELED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_ERROR: playerState = PlayerState.ERROR; break; case MediaItemStatus.PLAYBACK_STATE_FINISHED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_INVALIDATED: playerState = PlayerState.INVALIDATED; break; case MediaItemStatus.PLAYBACK_STATE_PAUSED: if (isAtEndOfVideo(getPosition(), getDuration())) { playerState = PlayerState.FINISHED; } else { playerState = PlayerState.PAUSED; } break; case MediaItemStatus.PLAYBACK_STATE_PENDING: playerState = PlayerState.PAUSED; break; case MediaItemStatus.PLAYBACK_STATE_PLAYING: playerState = PlayerState.PLAYING; break; default: break; } mRemotePlayerState = playerState; }
Example 4
Source File: RemoteMediaPlayerBridge.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { if (mNativeRemoteMediaPlayerBridge == 0) return; if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { nativeOnPlaybackFinished(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PLAYING) { nativeOnPlaying(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PAUSED) { mPauseRequested = false; nativeOnPaused(mNativeRemoteMediaPlayerBridge); } }
Example 5
Source File: ExpandedControllerActivity.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { RemoteVideoInfo videoInfo = new RemoteVideoInfo(mVideoInfo); videoInfo.state = newState; setVideoInfo(videoInfo); scheduleProgressUpdate(); if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { // If we are switching to a finished state, stop the notifications. finish(); } }
Example 6
Source File: AbstractMediaRouteController.java From AndroidChromium with Apache License 2.0 | 5 votes |
@VisibleForTesting void setPlayerStateForMediaItemState(int state) { PlayerState playerState = PlayerState.STOPPED; switch (state) { case MediaItemStatus.PLAYBACK_STATE_BUFFERING: playerState = PlayerState.LOADING; break; case MediaItemStatus.PLAYBACK_STATE_CANCELED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_ERROR: playerState = PlayerState.ERROR; break; case MediaItemStatus.PLAYBACK_STATE_FINISHED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_INVALIDATED: playerState = PlayerState.INVALIDATED; break; case MediaItemStatus.PLAYBACK_STATE_PAUSED: if (isAtEndOfVideo(getPosition(), getDuration())) { playerState = PlayerState.FINISHED; } else { playerState = PlayerState.PAUSED; } break; case MediaItemStatus.PLAYBACK_STATE_PENDING: playerState = PlayerState.PAUSED; break; case MediaItemStatus.PLAYBACK_STATE_PLAYING: playerState = PlayerState.PLAYING; break; default: break; } mRemotePlayerState = playerState; }
Example 7
Source File: RemoteMediaPlayerBridge.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { if (mNativeRemoteMediaPlayerBridge == 0) return; if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { nativeOnPlaybackFinished(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PLAYING) { nativeOnPlaying(mNativeRemoteMediaPlayerBridge); } else if (newState == PlayerState.PAUSED) { mPauseRequested = false; nativeOnPaused(mNativeRemoteMediaPlayerBridge); } }
Example 8
Source File: ExpandedControllerActivity.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void onPlaybackStateChanged(PlayerState newState) { RemoteVideoInfo videoInfo = new RemoteVideoInfo(mVideoInfo); videoInfo.state = newState; setVideoInfo(videoInfo); scheduleProgressUpdate(); if (newState == PlayerState.FINISHED || newState == PlayerState.INVALIDATED) { // If we are switching to a finished state, stop the notifications. finish(); } }
Example 9
Source File: AbstractMediaRouteController.java From 365browser with Apache License 2.0 | 5 votes |
@VisibleForTesting void setPlayerStateForMediaItemState(int state) { PlayerState playerState = PlayerState.STOPPED; switch (state) { case MediaItemStatus.PLAYBACK_STATE_BUFFERING: playerState = PlayerState.LOADING; break; case MediaItemStatus.PLAYBACK_STATE_CANCELED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_ERROR: playerState = PlayerState.ERROR; break; case MediaItemStatus.PLAYBACK_STATE_FINISHED: playerState = PlayerState.FINISHED; break; case MediaItemStatus.PLAYBACK_STATE_INVALIDATED: playerState = PlayerState.INVALIDATED; break; case MediaItemStatus.PLAYBACK_STATE_PAUSED: if (isAtEndOfVideo(getPosition(), getDuration())) { playerState = PlayerState.FINISHED; } else { playerState = PlayerState.PAUSED; } break; case MediaItemStatus.PLAYBACK_STATE_PENDING: playerState = PlayerState.PAUSED; break; case MediaItemStatus.PLAYBACK_STATE_PLAYING: playerState = PlayerState.PLAYING; break; default: break; } mRemotePlayerState = playerState; }
Example 10
Source File: AbstractMediaRouteController.java From delion with Apache License 2.0 | 4 votes |
@Override public final boolean isBeingCast() { return (mIsPrepared && mRemotePlayerState != PlayerState.INVALIDATED && mRemotePlayerState != PlayerState.ERROR && mRemotePlayerState != PlayerState.FINISHED); }
Example 11
Source File: AbstractMediaRouteController.java From AndroidChromium with Apache License 2.0 | 4 votes |
@Override public final boolean isBeingCast() { return (mIsPrepared && mRemotePlayerState != PlayerState.INVALIDATED && mRemotePlayerState != PlayerState.ERROR && mRemotePlayerState != PlayerState.FINISHED); }
Example 12
Source File: AbstractMediaRouteController.java From 365browser with Apache License 2.0 | 4 votes |
@Override public final boolean isBeingCast() { return (mIsPrepared && mRemotePlayerState != PlayerState.INVALIDATED && mRemotePlayerState != PlayerState.ERROR && mRemotePlayerState != PlayerState.FINISHED); }