Skip to content

Commit

Permalink
[video_player_avplay] Fix not display video issue when start play (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyue7 authored Dec 27, 2023
1 parent b87dadb commit 0d363f0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
4 changes: 4 additions & 0 deletions packages/video_player_avplay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.3

* Fix issue of not display video when start play.

## 0.1.2

* Replace surface id with resource id for fixing overlap issue.
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To use this package, add `video_player_avplay` as a dependency in your `pubspec.

```yaml
dependencies:
video_player_avplay: ^0.1.2
video_player_avplay: ^0.1.3
```
Then you can import `video_player_avplay` in your Dart code:
Expand Down
12 changes: 0 additions & 12 deletions packages/video_player_avplay/lib/video_player.dart
Original file line number Diff line number Diff line change
Expand Up @@ -574,11 +574,6 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
_updatePosition(newPosition);
},
);

// This ensures that the correct playback speed is always applied when
// playing back. This is necessary because we do not set playback speed
// when paused.
await _applyPlaybackSpeed();
} else {
_timer?.cancel();
await _videoPlayerPlatform.pause(_playerId);
Expand All @@ -597,13 +592,6 @@ class VideoPlayerController extends ValueNotifier<VideoPlayerValue> {
return;
}

// Setting the playback speed on iOS will trigger the video to play. We
// prevent this from happening by not applying the playback speed until
// the video is manually played from Flutter.
if (!value.isPlaying) {
return;
}

await _videoPlayerPlatform.setPlaybackSpeed(
_playerId,
value.playbackSpeed,
Expand Down
2 changes: 1 addition & 1 deletion packages/video_player_avplay/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: video_player_avplay
description: Flutter plugin for displaying inline video on Tizen TV devices.
homepage: https://github.com/flutter-tizen/plugins
repository: https://github.com/flutter-tizen/plugins/tree/master/packages/video_player_avplay
version: 0.1.2
version: 0.1.3

environment:
sdk: ">=2.18.0 <4.0.0"
Expand Down
4 changes: 4 additions & 0 deletions packages/video_player_avplay/tizen/src/plus_player.cc
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,10 @@ void PlusPlayer::OnPrepareDone(bool ret, void *user_data) {
LOG_INFO("[PlusPlayer] Prepare done, result: %d.", ret);
PlusPlayer *self = reinterpret_cast<PlusPlayer *>(user_data);

if (!SetDisplayVisible(self->player_, true)) {
LOG_ERROR("[PlusPlayer] Fail to set display visible.");
}

if (!self->is_initialized_ && ret) {
self->SendInitialized();
}
Expand Down

0 comments on commit 0d363f0

Please sign in to comment.