Home > Back-end >  How to play google drive video using react-native-video?
How to play google drive video using react-native-video?

Time:11-25

I want to play a google drive video using react-native-video. I tried to pass drive video link as source, but it does’t load the video component.

Here is my code :

<Video
  controls={true}
  source={{ 
       uri:'https://drive.google.com/drive/u/0/folders/1ytSOrPtVExljEDqI5K9qQznYELMK13xj' 
         }}
  resizeMode={'contain'}
  style={styles.backgroundVideo} 
/>

CodePudding user response:

Go to this site https://gdurl.com/ and paste your google drive video URL link there and get the permanent resource link. For e.g: NMSaYT

Then change your uri into this https://gdurl.com/NMSaYT will work for you.

CodePudding user response:

convert your google drive link into permalink or directlink then paste to your code after

"uri"

  • Related