sony / flutter-elinux-plugins

Flutter plugins for embedded Linux (eLinux)
BSD 3-Clause "New" or "Revised" License
43 stars 23 forks source link

Implement `IsPlayingUpdate` for ELinuxVideoPlayer/VideoPlayerPlatform #84

Closed talksik closed 9 months ago

talksik commented 9 months ago

Overview

This PR is to enable updates sent over the event channel back to dart for changes in playing and pausing. This allows VideoEventType.IsPlayingStateUpdate to be triggered (this event type was added recently by the video_player_platform_interface).

Help

Help needed: I was unable to find a way to test this. Inside of the main.dart of example, given the VideoPlayerController, how do I receive events? Or do I have to make changes inside the controller implementation to receive these events in the UI layer?

Other

Please let me know if there was another implementation that you had in mind :)

HidenoriMatsubayashi commented 9 months ago

First of all, do you agree to delegate all of rights related to this pull-request (your change, code) to Sony?

Help needed: I was unable to find a way to test this. Inside of the main.dart of example, given the VideoPlayerController, how do I receive events? Or do I have to make changes inside the controller implementation to receive these events in the UI layer?

Verifying the change with your local test codes is enough. So, please verify it locally in debug and release flavors.

talksik commented 9 months ago

First of all, do you agree to delegate all of rights related to this pull-request (your change, code) to Sony?

Yes I do.

talksik commented 9 months ago

Verifying the change with your local test codes is enough. So, please verify it locally in debug and release flavors.

I finally figured out how to test it. For documentation sake, I discovered that VideoPlayerController updates it's isPlaying based on the VideoPlayerPlatform implementation. It will use the videoEventsFor method of our ELinuxVideoPlayer platform implementation. And thus to test, we just need to print the value of the controller that we instantiate in the UI layer like I did in this commit (to be removed for the final deliverable of this PR)

talksik commented 9 months ago

cleaned up PR and ready from my side 👍🏾

HidenoriMatsubayashi commented 9 months ago

Basically, please check the differences between current plugin version and a new one when updating flutter official plugin's version. In addition, please update pubspec.yaml and CHANGELOG.md too.

talksik commented 9 months ago

@HidenoriMatsubayashi sorry for the delay, I have just resolved your comments. I have added to Changelog as well. Please let me know if there is anything else you need.