+ 22

[ 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

9th Oct 2020, 12:52 PM
vaibhav
vaibhav - avatar
39 Answers
+ 9
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
11th Oct 2020, 2:13 AM
Vinay_GB
Vinay_GB - avatar
+ 19
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.
9th Oct 2020, 2:35 PM
Tony
Tony - avatar
+ 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. 👍
9th Oct 2020, 2:09 PM
Tony
Tony - avatar
+ 11
vaibhav but thats what you asked for
9th Oct 2020, 5:25 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 10
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 )
9th Oct 2020, 2:29 PM
vaibhav
vaibhav - avatar
+ 10
Anthony Quick Galaxy-Coding I know to embed 🤦‍♂️🤦‍♂️🤦‍♂️
9th Oct 2020, 5:03 PM
vaibhav
vaibhav - avatar
+ 9
Galaxy-Coding please read my question and description carefully 🙏
9th Oct 2020, 5:26 PM
vaibhav
vaibhav - avatar
+ 8
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.
9th Oct 2020, 12:58 PM
vaibhav
vaibhav - avatar
+ 8
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 .
9th Oct 2020, 1:42 PM
vaibhav
vaibhav - avatar
9th Oct 2020, 2:33 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 8
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 🙏
10th Oct 2020, 3:30 PM
vaibhav
vaibhav - avatar
+ 8
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.
10th Oct 2020, 3:35 PM
vaibhav
vaibhav - avatar
+ 8
PRO PLAYER I've checked all of your codes and remember one thing , downvoting will not make you awesome ☺️
10th Oct 2020, 3:39 PM
vaibhav
vaibhav - avatar
+ 8
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.
10th Oct 2020, 3:45 PM
vaibhav
vaibhav - avatar
+ 8
look up embeddable HTML5 video player
10th Oct 2020, 7:33 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 8
Galaxy-Coding problem is in video not in syntax i guess.....
10th Oct 2020, 10:33 PM
vaibhav
vaibhav - avatar
+ 8
Sahm what do you want asked ? You can't use this thread like this , you use post section or discussion thread for your doubts .
10th Oct 2020, 11:38 PM
vaibhav
vaibhav - avatar
+ 7
Abhay see that again now I've update it with old source 😔
9th Oct 2020, 1:07 PM
vaibhav
vaibhav - avatar
+ 7
Anthony Quick in one of my attempt , it shows an error in which youtube was mentioned . so we can say that Google drive videos are somehow have something with youtube.
9th Oct 2020, 2:26 PM
vaibhav
vaibhav - avatar
+ 7
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.
10th Oct 2020, 12:24 PM
ADITYA KHANDELWAL
ADITYA KHANDELWAL - avatar