blackmann / story_view

Story view for apps with stories.
BSD 3-Clause "New" or "Revised" License
402 stars 327 forks source link

Support for custom video player controller #147

Closed matwright closed 2 years ago

matwright commented 2 years ago

Small update which allows you to pass a custom VideoPlayerController to the component. For example, this is very useful if you want to stream otherwise unsupported video types such as M3U8

Simply pass the VideoPlayerController through to the factory as such:

  StoryItem.pageVideo(
      ..., 
      controller: controller,
      playerController  VideoPlayerController.network(some_uri_for_a_network_m3u8_file)
    )

the playerController field is entirely optional so there is no backward breaking issues.

matwright commented 2 years ago

I decided that the custom PlayerController probably isn't a suitable approach for the use case described.