abdelaziz-mahdy / flutter_meedu_videoplayer

Cross-Platform Video Player for flutter
https://abdelaziz-mahdy.github.io/flutter_meedu_videoplayer/
MIT License
132 stars 69 forks source link

Can m3u8 work properly on the web? #59

Closed AnonymHK closed 1 year ago

AnonymHK commented 1 year ago

Can't m3u8 be used on the web? I want to use this component on Android, IOS, and the Web, but I see a prompt on the example indicating that it cannot be used under WEB!

abdelaziz-mahdy commented 1 year ago

Yes, for now the web implementation doesn't allow playing hls, will try to add it in next release

AnonymHK commented 1 year ago

Thank you very much for your reply. Using m3u8 on the web is a very common requirement, and I look forward to adding this feature in the next version. I will try to replace "better_video_player" with your component.

AnonymHK commented 1 year ago

A suggestion, I think you should add a TikTok slide up and down playback example and put it at the top of the example, and add TikTok and other logo guides in the introduction of pub.dev. This will increase the number of developers trying to use it, because when I chat in the "better_video_player" developer group, most people enter by watching its scrolling examples But now 'better_video_player' is no longer maintained, and many issues cannot be resolved.

abdelaziz-mahdy commented 1 year ago

A suggestion, I think you should add a TikTok slide up and down playback example and put it at the top of the example, and add TikTok and other logo guides in the introduction of pub.dev. This will increase the number of developers trying to use it, because when I chat in the "better_video_player" developer group, most people enter by watching its scrolling examples But now 'better_video_player' is no longer maintained, and many issues cannot be resolved.

The list view example is the closest to it, since It caches videos, but will try to improve it to look like TikTok (no promises I only work on package in free time)

abdelaziz-mahdy commented 1 year ago

for m3u8 web support

Add to pubspec.yaml

    video_player_web_hls:
      git: https://github.com/zezo357/video_player_web_hls

Add

   <script src="https://cdn.jsdelivr.net/npm/hls.js@latest"  type="application/javascript"></script>

in index.html above

   <script src="main.dart.js" type="application/javascript"></script>

or

   <script src="flutter.js" defer></script>

can you test and let me know? i will not publish it, until video_player_web_hls accepts my pull request

AnonymHK commented 1 year ago

video_player_web_hls has accepted Pull and released a new version!

abdelaziz-mahdy commented 1 year ago

Yes will update the package readme,

The only thing changing is instead of using git in pubspec

You will use the version