2018-05-15 @ 08:29: Autoplay HTML5 videos with sound in Chromium based browsers BrowsersJavaScript

UPDATE: Unfortunately, the following does no longer work with the latest Chromium version. 🙁
 

So, the autoplay policy for HTML5 videos in Chromium based browsers has been changed some time ago to disallow autoplay if the video contains audio. The intent was to not bother the user with sound being played automatically upon visitin a website, and in turn give him an option to selectively choose to have sound turned on/off for HTML5 videos. Well, I’ve found a nifty workaorund which allows you to play videos with sound automatically.

Create a video element as usual:

<video id="myvideo" src="myvideo.mp4" preload="auto" autoplay loop muted></video>

 

As you see the video is muted and will therefore play automatically in Chromium based browsers.

Now add this small JavaScript to unmute the video:

setTimeout(function() {
	var video = document.getElementById("myvideo");
	video.muted = false;
	console.log('Video unmuted.');
}, 1000);

 

This will unmute the video after one second. Bingo! Works like a charm. 🙂

Comments Off on Autoplay HTML5 videos with sound in Chromium based browsers
2018-03-15 @ 14:00: Chromium based browsers seem to calculate the height of HTML5 videos wrong BrowsersBugs

I just experienced and issue where the height of the container of an HTML5 video (1080px, mp4) was calculated wrong. The respective stylesheet had set video width to 100% and no height (defaults to height:auto). The browser rendered the video container to a height of >6000px while maintaining the width of the surrounding div and the actual aspect-ratio of the video. Really strange behaviour. The issue seems to occur in Chrome 64 and Opera 51. Firefox and Edge are not affected by the issue.

Comments Off on Chromium based browsers seem to calculate the height of HTML5 videos wrong
2015-05-24 @ 17:18: dancing dots BrowsersFun

Recently, I did some nice experiment with HTML 5 and CSS on the mediaplayer site. No animated GIFs, no JavaScript, no Java and no Flash have been used. The stream is embedded using the audio HTML tag, while the rest makes use of the CSS animation property. Works fine in Firefox and Webkit based browsers (Chromium, Opera, Safari, …). Enjoy! 🙂

Comments Off on dancing dots
2014-08-22 @ 10:31: Opera? Next! Browsers

For a long time I used Opera as my main browser, but then some jerk had the idea to totally mess it up by replacing it with Chromium with mouse gestures added. Well, no, that’s not totally correct. They also managed to remove the bookmark manager and introduced the useless stash instead, which doesn’t allow to import your old bookmarks from Opera 12 and/or other browsers (e.g. Firefox). And please, don’t force people to use Opera Sync. I don’t want my bookmarks to be synched to the cloud. So, why should anybody want to use Opera anymore?

Comments Off on Opera? Next!
2011-05-06 @ 20:21: Firefox add-on to redirect seized domains BrowsersPlugins

This article on Wired.com made me a little curious so, I decided to take a closer look on that add-on they talk about. Read more …

Comments Off on Firefox add-on to redirect seized domains
2011-04-09 @ 12:27: Chromium 12.0.731.x has broken scrollbars BrowsersBugs

Regardless of the build number currently all version 12.0.731.x builds of Chromium which I checked (80976, 81012, 81026 and 81028) have the scrollbars broken. Actually the scrollbars do work as intended, but they are not displayed correctly as they flicker and display rubbish. This bug does not appear in the earlier version 12.0.730.x builds that I currently stick to.

Comments Off on Chromium 12.0.731.x has broken scrollbars

  • About

    We never asked for this.