I have two vimeo ebmed videos on my page. both are set to autoplay, and are inside a hidden div.
In windows, on all browsers - no problem.
In mac - the two videos start to play automatically as I enter the page...
I'm using fancybox also
Maybe the video at the mac uses HTML5 video and on Windows it uses Flash? A difference between the two is that HMTL5 video/audio will autostart even if the element is hidden.
Related
I've seen some website have a video in multiple video streaming websites like Fembed or vidcast and some of the time the links are broken for whatever reason but I've seen a website that actually detects if the video source is broken and changed to a new one I wonder how can I detect broken link in Iframe?
Is it possible to make an external play button for a video without the play button in the video?
For example when you want to start a youtube video you see a red button in the middle of it. I want that hidden and a button outside of the video to start the video. It doesn't matter what video player it is.
I want to do this because iPad does not allow autoplay. And using the external button I want to trick it to autoplay.
This is a website that does "autoplay" on the iPad.
http://24hoursofhappy.com/
There is a reason why YouTube doesn't allow autoplay on mobile/tablet devices, video's use up alot of bandwith which may become expensive for the user.
U can trick it like u mentioned with a custom play button or even force it to start playing without a custom button. There is alot of detailed information on YouTube's API page.
Check out this page: https://developers.google.com/youtube/
I'd refrain from always autoplaying a video though if not just for bandwith reasons. In your case u could check if the device is a tablet.
I finally found an answer for this using HTML5 videos. It allows me to use the control buttons externally so I can use an overlay and hide the overlay when the play button is clicked so it will seem like it is auot played.
I'm trying to get it understand but after 2 days of digging the code I thought that I will post my issue here...
According to Apple's documentation, autoplaying videos on iOS devices cannot be done without user interaction first (e.g. tap on video). Despite that, mobile YouTube (m.youtube.com) is able to autoplay its videos just after loading a page with video.
Does anyone know how they are doing it?
PS. I've checked all available JS/HTML techniques of autoplaying videos on website on iOS (e.g. iframe, fake click, triggering touch event on video, fetching video with XHR).
I believe that youtube.com is a single page app. So when the user clicks on the video from the list view the page is not loading and their javascript uses that initial click, that leads to the video page, as the click that starts the video. It's not actually autoplaying, it's just a trick.
I am creating an iPad app for running YouTube video using IFrame.
I referred to many questions regarding YouTube integration in UIWebView and understand that:
Autoplay is not possible
Apple doesn't allow to run video without user interaction (starting).
In my simple app, I have a JavaScript button in the first page, and in the next page integrated YouTube with IFrame.
If I click on the JavaScript button, is there any way to pass this click event to the next page for running YouTube?
Is event bubbling in HTML helps this?
As far as I know no, you can't do anything about it. Event triggering can be easily simulated (some example) without user interaction which can't work on iOS devices (because of the policy you mentioned).
iOS video tag (used by YouTube in this case) is handled by iOS browser. Mobile version is showing placeholder with play button which you need to 'tap'. And only this action can play the video. Notice that you can't even overlay video tag with anything, because it will simply not work.
Is there a way to configure shadowBox to open up videos in fullscreen directly? I want this when you surf on the site with a mobile device instead of a popup.
If you are embeding flash based video players then answer is no.
Since there are security restrictions by which you can not call video full screen mode from javascript or from any other place that is outside of flash environment.
But you can make some pseudo full screen by placing your video player in some DIV that has width and height 100% and make some GUI elements and javascript logic to close that DIV on some event like onclick.
In case your video is HTML based, video tag you can call full screen mode from javascript.
More on calling full screen on video tag from javascript can be found here: https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode?redirectlocale=en-US&redirectslug=DOM%2FUsing_full-screen_mode