Skip to content

Commit 0c98d96

Browse files
author
Alexander Matveev
committedJul 8, 2021
8268718: [macos] Video stops, but audio continues to play when stopTime is reached
Reviewed-by: kcr, arapte
1 parent 787506f commit 0c98d96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎modules/javafx.media/src/main/native/jfxmedia/platform/osx/avf/AVFMediaPlayer.mm

+5
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,9 @@ - (double) currentTime
333333
- (void) setCurrentTime:(double)time
334334
{
335335
[self.player seekToTime:CMTimeMakeWithSeconds(time, 1)];
336+
if (previousPlayerState == kPlayerState_FINISHED) {
337+
[self play];
338+
}
336339
}
337340

338341
- (BOOL) mute {
@@ -402,6 +405,8 @@ - (void) stop {
402405
}
403406

404407
- (void) finish {
408+
[self.player pause];
409+
[self setPlayerState:kPlayerState_FINISHED];
405410
}
406411

407412
- (void) dispose {

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Jul 8, 2021

@openjdk-notifier[bot]
Please sign in to comment.