wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

[Enhancement] Expose listening APIs #139

Closed bdlukaa closed 2 months ago

bdlukaa commented 3 months ago

Currently, the fvp native player's APIs lack events or methods for directly listening to changes in position, duration, and buffering state. This makes it difficult to create features like progress bars, time displays, or custom buffering indicators. Exposing these APIs would significantly improve the developer experience and enable the creation of more advanced playback functionalities. The current native player APIs do not provide any built-in mechanisms for developers to track or react to changes in position, duration, or buffering.

Proposal

We propose the following adding some API improvements, like:

player.onPositionChange((duration) {})

and similar methods for other options.

wang-bin commented 3 months ago

events are already in video_player and video_player_mdk.dart, the can be reused in your code