3

I am playing HLS streaming in the react native using react-native-video and it is working fine. And I want to know that can I play .m3u8 video from Local storage of mobile. Like I have downloaded m3u8 stream in the mobile storage and then I want to play it from the app. So how can I play it. Please let me know if there is anyway to play it from mobile storage in react-native-video.

Also I want to know if there is any good way to download m3u8 streaming in the mobile.

Rover
  • 661
  • 2
  • 18
  • 39
  • seems like a duplicate to me (https://stackoverflow.com/questions/19782389/playing-m3u8-files-with-html-video-tag).. either way - you need to use an external module in order to support this feature (as `m3u8` format is not natively supported by browsers) – ymz Mar 29 '22 at 06:59
  • @ymz it's not a duplicate at all. This question is specifically about React Native and the react-native-video package and the linked question is about vanilla HTML. – Niels Kersic Aug 05 '22 at 13:35
  • 1
    @Rover Can you help with hls streaming with react-native-video – Tarik Sahni Oct 13 '22 at 21:36
  • Hey @Rover, this is totally unrelated to your question, but yeah, I'm relatively new to React native development, I see you mentioned you were able to play videos using react-native-video using HLS protocol, just wanted to know how we can achieve it since there are less resourses for it, let's say my videos are in firebase storage, how can I implement HLS to stream them in my React native app? We can connect in any other platform and discuss if you are okay with it – Abhishek P Apr 19 '23 at 13:03

1 Answers1

-1

OK... so:

The original answer suggested to use this library in order to support HLS videos

It's easy to see that this library is at the end of its life and will be deprecated and replaced soon by a newer library

When I wrote in my comment that this question is seems like a duplicate, I meant that the solution suggested is framework-agnostic (e.g. - it's supports all frameworks that let you include external JS module which is practically all platforms). That is also why I didn't mark this question as duplicate, despite the similarity.

In short: you may use this solution in your project and probably end up with a little react component for a video element to wrap all logic in a single re-usable unit. To get this right - I suggest you take a look at video.js react guidelines and use the sample provided there as a base to your component

Happy development ya all!

ymz
  • 6,602
  • 1
  • 20
  • 39