Play .m3u8 video in the react native video

Viewed 1532

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.

1 Answers

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!

Related