[ SOLVED ] How to play a Google Drive Video in a Web Code ? | SoloLearn: Learn to code for FREE!

+20

[ SOLVED ] How to play a Google Drive Video in a Web Code ?

[ note : I've already used search bar and found nothing all that I found was related with images only ] I've uploaded some videos in Google Drive , some of them were played ( with a horrible look ) and some of them were not , those which played sometimes were not working after sometimes . Sometimes it play audio only while i had provided video source ( previous file not this one ). Files details : added in code. I've Google it for solution found lots of LECTURES but none were working and asked to many users . It can be work with Dropbox ( I hope so ) but why can't with Google Drive ???? Edit : I've tried in Dropbox but it shows something went wrong while loading the video in code. I need answer for it that's why I'm using discussion thread , happy to here you all guys ^_^ Give your best answers ☺️ Here is a try https://code.sololearn.com/WRpmL0oZ1bnB/?ref=app

10/9/2020 12:52:28 PM

vaibhav

42 Answers

New Answer

+8

The problem isn't with Google drive, but video format. Your video's format is MPEG-4 Visual, and it is not supported by Chrome/Firefox browser. Although, it might be playing in other browsers as mentioned by someone in this thread. https://imwz.io/mp4-mp4v-browser-issues/ Hence, in order to play your video; you have to convert it to MPEG-4/H.264 format, which is supported by almost all browsers. https://caniuse.com/mpeg4 PS: Firefox supports this type of videos with 3GP containers. Reference: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Video_codecs#MP4V-ES

+18

Upload to youtube > click on share below the video > click on embed, and adjust your settings > copy and paste the iframe into your code. This is the best way.

+13

vaibhav while it is true you can play videos from Google drive, it's not recommended. That's why Google has Youtube - it's optimized for video playback, unlike Google Drive. 👍

+10

vaibhav but thats what you asked for

+7

Abhay you're not getting my point , I've mentioned that however your Webview may refused to connect or timeout but I have seen it in other devices it played but only audio it will not show video . Copy URL of Code and open in chrome ( SL playground ) then it may worked ( audio only not video )

+7

follow these instructions: http://sangsoonam.github.io/2019/07/27/how-to-embed-a-google-drive-video.html

+7

Anthony Quick Galaxy-Coding I know to embed 🤦‍♂️🤦‍♂️🤦‍♂️

+7

look up embeddable HTML5 video player

+6

Galaxy-Coding please read my question and description carefully 🙏

+6

PRO PLAYER I've checked all of your codes and remember one thing , downvoting will not make you awesome ☺️

+6

ADITYA KHANDELWAL i appreciate you bro don't worry , I've already tried Google drive , Dropbox and YouTube and some other online sources too . As I already told I know the problem all I wanted to know is why it's not working . Don't worry your suggestion is good however it's not comfortable for now.

+5

Abhay understand language , which video i was trying to play was not playing so I've tried by changing its source . It played however it seems horrible . And please read the question first so you can understand what I meant to say.

+5

Kelvin Paul it worked and provided the googleusercontent link which was mentioned in stackoverflow ( for this problem ) but still video cant be seen . It show audio only .

+5

vaibhav Google drive is not a good option for playing videos, it's just a backup service and hence doesn't have any CDN. The basic reason for google drive not working is absence of a CDN, retrieving data is not optimized in google drive.. you can always download and use but to use it online, google drive doesn't have enough backend facilities. You can always use YouTube if you wanna host any video, it's always free, just make sure you turn on embedding on your videos. And if you don't want people to find your videos on YouTube and to view your videos only via your website, you just have to make the video UNLISTED from PUBLIC. I hope it will clear your doubts as well as fix your problem.

+5

ADITYA KHANDELWAL , PRO PLAYER All of you aren't getting my point how can i discuss then 🤦‍♂️ your valuable suggestions is good but for my question its diffrent , Tegveer Singh Bhatia i request you to read question carefully 🙏

+5

PRO PLAYER I've seen that and you have used a Dropbox link however my problem wasn't solve by it too I've tried Dropbox too as it is explained in my question . And you've used audio tag and audio source in your video and I'm looking solution for a video.

+5

Galaxy-Coding problem is in video not in syntax i guess.....

+5

Sahm what do you want asked ? You can't use this thread like this , you use post section or discussion thread for your doubts .

+5

Thank you so muchh Vinay_GB 🙌 One doubt: 🤔 These same videos that don't work in mobile, work on laptop 🤔 Why? Is it because of the device or because of app and website difference 🤔

+5

Vinay_GB Browser chrome OS windows 7