OtakuDisease Posted September 23, 2020 Share Posted September 23, 2020 Hey, I wanted to insert a video on a page. I used the video code from w3schools for this but it only shows me the black screen. I used the following code. <video width="480" height="360" controls> <source src="video model.mp4" type="video/mp4"> Your browser does not support the video tag. </video> Link to comment Share on other sites More sharing options...
shaili_shah Posted October 2, 2020 Share Posted October 2, 2020 (edited) Give the full source of video where it is stored. I've also done the same code for video and it displayed. <video width="500px" height="300" align="right" controls> <source src="C:\....\Agra.mp4" type="video/mp4"> </video> Hope you get it. Thanks! Edited October 2, 2020 by shaili_shah Link to comment Share on other sites More sharing options...
Bev20 Posted January 14, 2021 Share Posted January 14, 2021 Hi I am a newbie... Just trying to do the same here with a youtube video... but only shows me a black screen This is the code i used <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> <video controls width="620"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/webm"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/mp4"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/ogg"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/avi"> Sorry, your browser doesn't support embedded videos. </video> </body> </html> Really appreciate some help on this:) MT Link to comment Share on other sites More sharing options...
melahi Posted January 29, 2021 Share Posted January 29, 2021 On 1/15/2021 at 12:30 AM, Bev20 said: <video controls width="620"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/webm"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/mp4"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/ogg"> <source src="https://www.youtube.com/embed/7-OAyM_LNLc&t=13s?autoplay=1&controls=0" type="video/avi"> Sorry, your browser doesn't support embedded videos. </video> Really appreciate some help on this:) MT Click the share link in Youtube and choose <> (embed) You get this code: <iframe width="560" height="315" src="https://www.youtube.com/embed/7-OAyM_LNLc" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> They evidently don't use the video tag but instead host their own player in an iframe. By sheer coincidence I've been playing with embedding portrait orientation videos from both Youtube and Bitchute and managed to make them scale with the page. You can try it here and use "view source" to see the code my php generated. http://ngaro.online/angelica.php/home2 (youtube) http://ngaro.online/angelica.php/home3 (bitchute) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now