Is it possible to access Private videos with the React Native Player?
See docs: React Native player
As far as I can see, it only takes a ‘videoId’ prop. No place for the auth/bearer token to go.
Am I missing something?
Thank you.
Is it possible to access Private videos with the React Native Player?
See docs: React Native player
As far as I can see, it only takes a ‘videoId’ prop. No place for the auth/bearer token to go.
Am I missing something?
Thank you.
Hey @blueridgeoverlandgea thanks for brining this up.
I’ve looked at our library for React Native Player in Github, and I guess we will have to do some updates to it: https://github.com/apivideo/api.video-reactnative-player/blob/main/src/index.tsx
Once it’s available, we will let you know.
You can also use the React Player: GitHub - apivideo/api.video-react-player: api.video React player component which does support that private video concept
Thanks for working on that.
When you say ‘use the React Player’, how would I do that?
I can make a webview in React Native, but to use a React component, wouldn’t I have to build an entire react website and serve it to my mobile app, just so I could display it in a web view?
you’re right, that’s going to be a challenge. I’ve created a new branch on the React Native SDK, can you work off that branch and let me know if the issue was resolved for you? https://github.com/apivideo/api.video-reactnative-player/tree/am/private-videos-fix
You’ll be able to pass new props, for example, if you want to use a private token it will be something like this:
<ApiVideoPlayer
ref={(r) => (this.player = r)}
muted={true}
videoId="123"
privateToken="123"
/>
And if you retrieved a session token, then this would be your payload:
<ApiVideoPlayer
ref={(r) => (this.player = r)}
muted={true}
videoId="123"
privateToken="123"
sessionToken="123"
/>