So,
A few days ago, Google Chrome started to block Flash advertisement from auto-playing, by default.
The problem is that I'm using videojs media player to play an HLS live stream on my page.
And, since Chrome does not support HLS protocol natively, the player falls back to a small Flash file to play the video.
But Chrome thinks this Flash file is an AD - thus not allowing it to auto-play as it should.
Is there any way to tell Chrome that this file is actually an important part of my page, and not an AD?
Add an empty Flash file larger than 398x298 to the bottom of your page. I found once you have at least one Flash file above their minimum Chrome will not pause any of your Flash. You cannot hide this extra Flash file with CSS. Optionally use a javascript timeout (3 seconds) to hide the empty Flash file in case it messes with your page layout. I'm using swfObject for embedding.
I am dealing with the same issue, but I think the size of the video and location on the page are factors. Try making the video player bigger. When I went up to 410x308 the problem went away.
Related
How does chrome know which tabs are playing some sound? Alternatively, how does chrome know which tabs to put the speaker sign on?
This article may be useful:
From ghacks.net:
"Google Chrome uses an internal version of Adobe Flash which Google can use to determine when Flash is being used for audio playback.
Mozilla does not have that luxury. While it is working on a patch to display indicators when HTML5 is being used for audio playback, it cannot do anything about plug-in contents on its own."
Assuming that's correct, then from there it's not hard to imagine that if they know of every single instance of flash being used for audio playback, that they probably have an associated property indicating which tab it is on.
We created a little chat client in our office that runs in the browser. It handles people posting pictures and gifs and embeds them. Recently we added support for imgur and gfycat's html 5 video (it auto converts gifs to mp4/webm). An unintented side effect of this is now anyone using chrome or firefox will find that their monitor will never turn off.
You can see in powercfg the culprit is these videos:
C:\WINDOWS\system32>powercfg /requests
DISPLAY:
[PROCESS] \Device\HarddiskVolume2\Program Files (x86)\Google\Chrome\Application\chrome.exe
Playing video
[PROCESS] \Device\HarddiskVolume2\Program Files (x86)\Mozilla Firefox\firefox.exe
If you pause the videos, the entries in powercfg disappear. Switching to another tab, minimizing chrome, even locking the screen don't allow the system to turn the monitor off. Internet Explorer seems to be the only browser that behaves like you'd expect and only prevents sleep when a video is fullscreen.
Is there some way to mark a video tag as 'unimportant' and basically tell the browser that it's OK to let the computer sleep while this video is playing?
It seems there is a bug in Google Chrome 38 (current release as of this writing) that causes the screen saver to be suppressed when playing HTML5 video. Normally, screensaver suppression should only occur when the video is playing in full-screen mode.
This issue appears to be resolved in the beta release of Google Chrome version 39 as it looks like a temporary fix was made.
So I was recently trying to learn html5 stuff and got to the audio tag. It seems to work just fine on my PC's browser, Chrome, but not so much on my android (4.0, using both the stock browser and dolphin). It will play the audio once, but never again. Take this site for example:
http://www.stefanvignir.de/rimshot/
Very basic, it has a button that plays audio every time you press it, but not on my android. It only plays the first time you press it. How do you get around this? Just wait for mobile browsers to update?
I heard a workaround is to set audio.currentTime = 0; but that didn't seem to solve anything.
Apparently you can reset the source (audio.src = audio.src) and that will allow you to play it more than once, but it has to re-download the file. A workaround, I guess, but not acceptable.
Any suggestions? Thanks.
this works in desktop and andriod browsers for multiple presses - and you can wrap in a div etc for styling:
<a onclick="this.firstChild.play()"><audio src="1.mp3"></audio>play</a>
More than just the audio tag so you have more control over what the play button looks like. If you need more buttons you can change the code for pause etc
I have an h264 mp4 video that is 960x540, 1000kbps and 30 minutes long. This will be playing off of a disc. I noticed only in chrome that when I open the web page it is embedded in, my computer slows way down and the video gets all choppy for a solid 5 seconds every time...almost like it is loading the entire resource.
I tested playing the file in IE9 and Firefox and these seem to play ok when I first open it. I really wish chrome would ditch their version of flash and just use the plugin version that all the other browsers use. I love chrome, but this is unacceptable.
I am looking for a solution to this resource loading problem. Things to note, I am using the OSMF framework and using a simple MediaPlayerSprite to show the video. Not a heavyweight element whatsoever. Thanks.
I'm setting up a website which ultimately displays videos. The video files are all .mpg and requirements prevent me from converting these to another format such as flv. So far I have been playing around with Windows Media Player but have found that it doesn't play nice with non IE browsers. The problem which arises is that although the video will play, it doesn't shrink itself to fit in the WMP container and so only the top corner is visible. This problem goes away if I download the np-mswmp plugin for Firefox however it is a manual install and I'd rather not leave it to the user. Once the Firefox plugin is installed, Chrome also plays the files correctly but I doubt that the average user would ever think to do this.
Is there a better way to embed .mpg files into a web page, an alternative player which doesn't require file conversion? I have had a play with Quicktime but it only ever shows a Q with a question mark imposed over it, even when I associate Quicktime with .mpeg files. Any advice would be appreciated!
Thanks,
James
I'm sorry to say there isn't a good way to do cross-browser video without being able to force your users to install something. That is why every video site uses flash, since it's the nearest thing to a standard - but of course flash has some gaps in coverage, the most significant being iPhones.
Windows Media Player has only about 70% penetration and Internet Explorer somewhat less. By going this route you will end up with 1 in 3 users unable to view your videos.
Either bite the bullet and move to Flash as a video player or just give your users a download link. A download link is a very easy way to support almost every user, if you can do that.