Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
++
  • Loading branch information
matanlurey committed Jun 13, 2024
commit d97a4ada59fdd1a44ee01c6d1372ff3437b839d1
Original file line number Diff line number Diff line change
Expand Up @@ -314,19 +314,21 @@ public void behindLiveWindowErrorResetsPlayerToDefaultPosition() {
public void otherErrorsReportVideoErrorWithErrorString() {
List<Player.Listener> listeners = new LinkedList<>();
doAnswer(invocation -> listeners.add(invocation.getArgument(0)))
.when(fakeExoPlayer)
.addListener(any());
.when(fakeExoPlayer)
.addListener(any());

@SuppressWarnings("unused")
VideoPlayer unused =
new VideoPlayer(
fakeExoPlayer,
VideoPlayerEventCallbacks.withSink(fakeEventSink),
fakeSurfaceTextureEntry,
fakeVideoPlayerOptions,
httpDataSourceFactorySpy);

PlaybackException exception = new PlaybackException("You did bad kid", null, PlaybackException.ERROR_CODE_DECODING_FAILED);
new VideoPlayer(
fakeExoPlayer,
VideoPlayerEventCallbacks.withSink(fakeEventSink),
fakeSurfaceTextureEntry,
fakeVideoPlayerOptions,
httpDataSourceFactorySpy);

PlaybackException exception =
new PlaybackException(
"You did bad kid", null, PlaybackException.ERROR_CODE_DECODING_FAILED);
listeners.forEach(listener -> listener.onPlayerError(exception));

verify(fakeEventSink).error(eq("VideoError"), contains("You did bad kid"), any());
Expand Down