How to add Audio/Video in Code Playground (web)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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?

22nd Apr 2017, 5:59 AM
Pao
Pao - avatar
12 Answers
+ 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)
22nd Apr 2017, 6:13 AM
Pao
Pao - avatar
+ 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 😜
22nd Apr 2017, 7:02 AM
Pao
Pao - avatar
+ 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.
1st Nov 2018, 6:07 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 8
yo.... but I already knew it...
22nd Apr 2017, 6:01 AM
Ronit Kumar
Ronit Kumar - avatar
+ 8
I use d public_html folder from my hosting site www.000webhost.com
22nd Apr 2017, 6:55 AM
Ronit Kumar
Ronit Kumar - avatar
+ 8
www.000webhost.com is free
22nd Apr 2017, 2:10 PM
Ronit Kumar
Ronit Kumar - avatar
+ 2
I tried... its not working using <video> tag but it is working with <iframe> tag. Any solutions??? Using on <video> tag?
8th Oct 2020, 7:46 AM
minal mukarande
minal mukarande - avatar
+ 2
Hi minal mukarande Sorry for the late response. It seems to be working fine with the video tag too.
8th Oct 2020, 4:59 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 1
This may help- <iframe width="420" height="345" src="https://www.youtube.com/embed/tgbNymZ7vqY"> ignore the link in (src)
25th Oct 2020, 9:53 AM
Siriki Lohit
0
Is it same for the video tag?
7th Oct 2020, 11:41 AM
minal mukarande
minal mukarande - avatar
0
Kishalaya Saha ok i'll try...Thank you
9th Oct 2020, 6:05 AM
minal mukarande
minal mukarande - avatar
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">
9th Oct 2020, 7:09 AM
minal mukarande
minal mukarande - avatar