Jump to content

video autoplay - chrome


ramiwahdan

Recommended Posts

Hi,

I have a video to play at the load of the page but I have a problem. autoplay is set and i don't want to start muted as i need the sound to be heard. The weird part is, if the page is loaded it won't start but if i moved to different page then go back to the main page, it will start the video with sound!

Quote

 

	<div align="center">
		<video width="100%" height="25%" controls poster="img\thumb\overview.jpg" autoplay>
			<source src="vids\cs-cdi\overview.mp4">
		</video>
		<br>
		<b>Featured Video from student to classmates - G12A1 - CDI</b>
	</div>

Please help.

Link to comment
Share on other sites

You really don't need to use a DIV in the HTML code. Your video is at 100% and centering is unresponsive. To center the <B> text use:

 style="text-align:center;display:block;margin: 0 auto;" to the tag

 

I found a hack for you to try.

Add an ID to the video (ID="myvideo").

Then use JAVASCRIPT:

<script> document.getElementById('myvideo').play(); </script>

See if that works.

 

Edited by NotSunfighter
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.