Reputation: 1752
For embedding Vimeo videos on the web, I just need to set up my Vimeo video to allow embedding for a specific URL (eg. www.myapp.com) and then it works. When I try to view the same video in a React Native app with a web view I get a NSUrlErrorDomain
exception.
I've gone through the Vimeo documentation and can't find the answer. Is it possible to do this? Or do I need to make my videos public for it to work?
Upvotes: 1
Views: 6423
Reputation: 56
Domain privacy is on and just like that;
<WebView source={{uri: 'https://player.vimeo.com/video/videoid',headers: {"Referer":"https://yourwebsite.com"}}}/>
Upvotes: 3
Reputation: 3018
Domain privacy for Vimeo embeds requires the HTTP referer to be passed back to the iframe so the Player can determine if the domain where its embedded can play back the video. If you're on a local page without an HTTP referer, then the domain privacy feature will not work.
You'll need to set the video's embed privacy to "Embed anywhere", or use direct video file links (as a PRO or Business member) with the platform's native media player. More info here: https://help.vimeo.com/hc/en-us/articles/224823567-Third-party-player-links
Upvotes: 0