use of com.google.android.gms.cast.framework.media.MediaQueue in project ExoPlayer by google.
the class CastTimelineTrackerTest method mockRemoteMediaClient.
private static RemoteMediaClient mockRemoteMediaClient(int[] itemIds, int currentItemId, long currentDurationMs) {
RemoteMediaClient remoteMediaClient = Mockito.mock(RemoteMediaClient.class);
MediaStatus status = Mockito.mock(MediaStatus.class);
when(status.getQueueItems()).thenReturn(Collections.emptyList());
when(remoteMediaClient.getMediaStatus()).thenReturn(status);
when(status.getMediaInfo()).thenReturn(getMediaInfo(currentDurationMs));
when(status.getCurrentItemId()).thenReturn(currentItemId);
MediaQueue mediaQueue = mockMediaQueue(itemIds);
when(remoteMediaClient.getMediaQueue()).thenReturn(mediaQueue);
return remoteMediaClient;
}
use of com.google.android.gms.cast.framework.media.MediaQueue in project ExoPlayer by google.
the class CastTimelineTrackerTest method mockMediaQueue.
private static MediaQueue mockMediaQueue(int[] itemIds) {
MediaQueue mediaQueue = Mockito.mock(MediaQueue.class);
when(mediaQueue.getItemIds()).thenReturn(itemIds);
return mediaQueue;
}
Aggregations