Skip to content
Prev Previous commit
Gemini review feedback
  • Loading branch information
stuartmorgan-g committed Jul 16, 2025
commit f41c1b1ca4e1f9e1757ec7d33ada8aa067116e47
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void setPlaybackSpeed(@NonNull Double speed) {

@Override
public void seekTo(@NonNull Long position) {
exoPlayer.seekTo(position.intValue());
exoPlayer.seekTo(position);
}

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void initialize() {
// Set up the instance-specific API handler, and make sure it is removed when the player is
// disposed.
BinaryMessenger messenger = flutterState.binaryMessenger;
final String channelSuffix = Integer.toString((int) id);
final String channelSuffix = Long.toString(id);
VideoPlayerInstanceApi.setUp(messenger, channelSuffix, videoPlayer);
videoPlayer.setDisposeHandler(
() -> VideoPlayerInstanceApi.setUp(messenger, channelSuffix, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void seekAndGetPosition() {
verify(mockExoPlayer).seekTo(10);

when(mockExoPlayer.getCurrentPosition()).thenReturn(20L);
assertEquals(20L, videoPlayer.getPosition().doubleValue(), 0.001);
assertEquals(20L, videoPlayer.getPosition().longValue());
}

@Test
Expand Down