+ 29
How to add Audio/Video in Code Playground (web)?
To add audio/video in Code Playground we have to host our files somewhere that will allow Cloud Playing, like Dropbox. 1. The original shared link URL may contain query string paremeters already, like: "dl=0" 2. Replace that in your URL with "dl=1" to force the browser to download the file. 3. Or replace it with "raw=1" to force the browser to render the file. 4. Or use both "dl=1&raw=1" My code with examples: https://code.sololearn.com/WaPd2fHQY9Gs/?ref=app Do you know where else we could host them?
12 Respuestas
+ 19
I'm glad you knew @TonyStark :) my real question for you is, do you know any other place we could host our files besides Dropbox? (Drive for instance, won't work)
+ 13
Oh yeah, your own hosting is a good option 😊👌 though I was thinking more of a free hosting platform. Like an imgur/photobucket but for audio/video files 😜
+ 10
Hi Pao! I'm from the future 😂
Someone recently asked me about uploading audio from Drive, and I came across your thread. I think I have found a way with the help of some internet search and experimentations. In case you're still looking for it, here 'tis. Please let me know if it doesn't work:
If the sharing link looks likes this:
https://drive.google.com/file/d/XXXXXXXXXXXXXXXXXX/view?usp=drivesdk
or this:
https://drive.google.com/open?id=XXXXXXXXXXXXXXXXXX
we'd need to change it to this:
http://drive.google.com/uc?id=XXXXXXXXXXXXXXXXXX
where XXXXXXXXXXXXXXXXXX is the id of the file.
+ 8
yo....
but I already knew it...
+ 8
I use d public_html folder from my hosting site
www.000webhost.com
+ 8
www.000webhost.com is free
+ 2
I tried... its not working using <video> tag but it is working with <iframe> tag. Any solutions??? Using on <video> tag?
+ 2
Hi minal mukarande
Sorry for the late response. It seems to be working fine with the video tag too.
+ 1
This may help-
<iframe width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY"> ignore the link in (src)
0
Is it same for the video tag?
0
Kishalaya Saha ok i'll try...Thank you
0
Kishalaya Saha can u look at this code...I have copied the link from my googel drive app and when i run the code...it doesn't show the video...is something wrong with my code?
<video controls>
<source src=" https://drive.google.com/file/d/10isZNcDr5_6RqunsXKFuXYnK-nOAysN4/view?usp=drivesdk" type="video/mp4">