Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[video_player_avplay] Fix not display video issue when start play #644

Merged
merged 3 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
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