+ 1

How can I embed a video from my computer (iMac) on to a HTML code?

12th Jun 2018, 5:58 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
21 Respuestas
+ 2
Hi you may use the <video> tag to embed videos in HTML... https://www.w3schools.com/html/html5_video.asp As a side note, if you want to have the video be available online, you’ll have to upload video file to your web server. you may even upload to a service like youtube and embed that into your web page.
12th Jun 2018, 6:06 PM
Umair Salam
Umair Salam - avatar
+ 3
lol. ok. share your code please. copy and paste it here 😊
12th Jun 2018, 8:37 PM
Umair Salam
Umair Salam - avatar
+ 2
Umair Salam l so for example I have a MP4 video on my computer what should I do in order to have it on my code(is it possible to put a video without uploading it online)?
12th Jun 2018, 6:23 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 2
Is your HTML code for a website accessible online or is it for local development only on your iMac? So, if you’d like to publish the video on a website for the world to access you’ll need to upload it. if its just for you, then no. hope this makes sense :)
12th Jun 2018, 6:40 PM
Umair Salam
Umair Salam - avatar
+ 2
Check the link i posted above. And take the HTML course here on SoloLearn :) here’s some sample code from the link i provided... <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video>
12th Jun 2018, 6:52 PM
Umair Salam
Umair Salam - avatar
+ 2
you’re welcome 😊 did it work?
12th Jun 2018, 7:55 PM
Umair Salam
Umair Salam - avatar
+ 2
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <video width="320" height="240" controls> <source src="581512571.mp4" type="video/mp4"> </video> </body> </html> lol I just realized that maybe it's because of the width and height but maybe not...
12th Jun 2018, 8:41 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 2
Looks good. you can try without the width & height parameters if you like. is the video file in the same folder as the HTML file? double-check the file name/extension.
12th Jun 2018, 8:56 PM
Umair Salam
Umair Salam - avatar
+ 2
ok I figured it out!! thank you very much Umair Salam! 😊😊😊
12th Jun 2018, 9:06 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 2
sweet. congratulations if it worked 👌🏻
12th Jun 2018, 9:07 PM
Umair Salam
Umair Salam - avatar
+ 2
yeah it works perfectly! 🙌👌👌👌👌
12th Jun 2018, 9:08 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 2
👏🏻 bravo
12th Jun 2018, 9:08 PM
Umair Salam
Umair Salam - avatar
+ 2
thanks Umair Salam and good night! 🌃💤
12th Jun 2018, 9:18 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam it's for local development only on my iMac (and thank you)
12th Jun 2018, 6:42 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam so how do I do it?
12th Jun 2018, 6:45 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam I know I have to use the <video> tag but how?
12th Jun 2018, 6:46 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam thank you!!^_^
12th Jun 2018, 7:15 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam I will check now
12th Jun 2018, 8:12 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
Umair Salam it doesn't work..😐
12th Jun 2018, 8:36 PM
Eli Ben Shimon
Eli Ben Shimon - avatar
+ 1
how can I make a video file in the same folder as my html file?
12th Jun 2018, 8:58 PM
Eli Ben Shimon
Eli Ben Shimon - avatar