Can I use Stream Api in react native apps?

From the documentation, it seems the Stream Api is only for the web platform, I want to use it in react native apps or even native mobile apps. Is there any way?

How to play Cloudflare stream in react native?

Hello,

Did any of you tried to implement Stream in a react-native application ?

Does Cloudflare has plan to implement a custom library for the native alternatives ?

Best regards

(merged these recent requests into one thread)

It’s probably possible but I’m not aware of a solution yet.

I think Cloudflare hasn’t provided any sdk for react native. But I am using it in my application using webview. I know the solution is not the standard one, but this is what worked for me.

@imRajMayank Did you find any issues with the audio playback? In my case, the audio kept playing in the background even after WebView component was unmounted.

Did anyone solve/work on this? We could really use a solution for React Native. Thanks

[EDIT]: the closest “solution” I found was to use react-native-web-webview and use the “Video Link” (https://watch.cloudflarestream.com/)

So, I was able to get stream working with react-native-video.

Use this Cloudflare endpoint to grab your video details: https://api.cloudflare.com/#stream-videos-video-details

With the video details response, find result.playback. There, you’ll have uris to the video. Use one of those uris.

1 Like

[continued] (New users can only post 2 links. I’m new.)

For more info on using third party players, follow this link: https://developers.cloudflare.com/stream/video-playback/third-party-players/

1 Like