Chrome's updated it auto play policy which block user from autoplaying the video. I am having signage board where it is most important feature for my application. Is there any way I can autoplay the video? Please let us know if any solution or workaround is available. As per google document you can run video with sound in PWA app. I have tried that as will but unable to play the video. Thank you in advance. (https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#new-behaviors)
I have also referred multiple stack overflow question but haven't found any solution yet.
Related
I am currently working on a google chrome extension that features a content script for altering youtube pages. I have done some work with altering the DOM already and all of that works, however, I have been looking for solutions to have the youtube video pause when the page loads.
I initially thought perhaps I could simulate a keystroke as the spacebar pauses youtube videos. I also tried using javascript to pause the video but I don't think it works with Youtube's custom video player.
Don't feel obligated to write any code for this but if someone could point me in the right direction I would be very grateful.
On the main page of a video, the HTML5 video element playing the video has a specific class, so you can target that; and as an HTML5 video element, it has the play() and pause() methods already.
document.querySelectorAll('.html5-main-video').forEach(vid => vid.pause());
That will pause all HTML5 main videos on the page. Helpfully enough, that's the same class used by the little autoplaying video on some channel pages, so it should work for those as well :)
(Don't worry about Flash videos; YouTube hasn't supported those for years now.)
We are sharing jwplayer videos on facebook. The vidoes played fine on all other browser except chrome.
Please share below link on facebook on chrome and play the video, you will see player is disorderd and video is not played.
http://isp-dev.deliveredoncloud.com/facebook-video?v_key=atHlbXDD
The link is verified on facebook and OG debugger, it return response:206.
Any help, why video is not played in chrome.
player condition in chrom when played
From the error in your comments it looks like Chrome is enforcing content security policies.
These are described quite well here: https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives and here: http://content-security-policy.com
Note in particular the browser support table in the first link (this will hopefully be updated regularly so is not a good thing to show here as it would just be a current snapshot).
You can experiment wit different settings, maybe trying a very open policy initially to make sure this is not masking some other issue.
I'm trying to make a chrome extension that involves detecting whether or not an adobe flash player video is current playing or is paused. I'm fairly sure this can be done quite easily with HTML5, but any ideas about other video players?
Thanks!
I highly doubt there is a universal method.
Flash video players are opaque "programs" that differ from site to site, they don't have a universal play/paused state for the video in them exposed anyhow.
Your question is therefore like "can I detect whether there is a video player currently playing or paused in Windows", and you can guess that there is little chance for a universal solution.
There is a play/pause state of the flash object itself, I suppose, but this is not connected to the video playback. It's whether the flash object is completely frozen or not. At most you can detect if a flash object is present.
I am creating all in one music app using multiple APIs. I want to stream only audio of youtube song. As i searched a lot but could not find actual solution. many of them says it will be against Youtube TOS. If it is so than how "StreamUs" chrome extension is working. I am not creating something this but i want to stream a song audio only as it is in above extension.
Thanks in advance.
author of Streamus here. Just dropping in to give a definitive answer.
Chrome extensions can utilize both an invisible, permanent background page as well as a visible, temporary foreground page. When the foreground page loses focus - it is destroyed and all content is unloaded from memory.
Streamus hosts the YouTube video player on the background page which gives the illusion that the video is not loaded. It pipes all commands from the foreground UI to the background page.
However, it's worth noting that this is a violation of YouTube's Terms of Service. I've been working with YouTube to figure out a good solution to the problem and am almost there with a clever way to present video in the foreground without losing the audio. :)
Unfortunately it does pull the video as well for bandwidth, but good question.
as quoted by the author in
https://www.reddit.com/r/streamus/comments/1w64wj/question/ .
I am developing an iPad app that embeds YouTube videos in HTML5 format into a UIWebView. The problem is that I want to pause the video when a user brings up modal dialog windows, rather than clear or stop the video as many have suggested. This is critical to a good user experience. Does anyone know any JavaScript or API that I can run to simply pause the video when an action that presents a modal dialog will occur?
The method I use to embed is described here.
http://apiblog.youtube.com/2010/07/new-way-to-embed-youtube-videos.html
This blog explains hot to build a video in HTML 5.
http://blog.steveheffernan.com/2010/04/how-to-build-an-html5-video-player/
Then interact with the video player via the method [myWebView stringByEvaluatignJavaScriptFromString:#"playVideo()"].
I didn't tested but it seems straightforward.
Are you sure we can play embedded YouTube videos in mobile Safari?
Good luck!
Have you tried going through official docs?
https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/ControllingMediaWithJavaScript/ControllingMediaWithJavaScript.html