I want my site to open with an MP4 video instead of a JPG as on the sample. I moved the images and put the video first, and it works great on desktop. However, in the mobile responsive version, the video does not play, just a black screen (the title shows, but no video). Does the video NOT work with iPhones? Can this be fixed? My temporary project is at: http://198.1.91.212/~canvas in case you need to see any code - the project is merely in the build stage, so disregard non functional or odd items still on the page. I want to solve the video problem before I go any further with it. thanks.
Gary S.
opening image video not playing on mobile format
1 reply · opened Jan 1, 2017
Hello,
- Apple and Android do not allow autoplay for HTML5 Videos/Audio to prevent unsolicited usage of Bandwidth (which can be Cellular) on the User’s Mobile Device. They can only be played on their native Video Player.
Here is the Official Reference for Apple: https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/Device-SpecificConsiderations/Device-SpecificConsiderations.html .
We are definitely keeping an eye on the Latest Updates by Apple and Android to allow the auto-playing of HTML5 Videos on their respective phones and as soon as they release an Update we will surely make this available. The HTML5 Videos on Mobile Devices do not work on any Website.
Additionally, for User Experience the best practice for this is to use the Video Placeholder Images and not show the Video Play Button which is the case with most the Websites since the Video Plays inside a Different UI (Default Device Player) and leaves the Website Screen. However, if you would like to disable the Video Overlay, you can simply add the Bootstrap Responsive Classes: http://getbootstrap.com/css/#responsive-utilities to the .video-overlay Element to hide it on Mobile Devices.
- Recently, iOS 10 Devices have received support for playing HTML5 Videos. Please consider following the Steps below to make it work:
a. Add the playsinline Attribute to the <video> Tag. Example:
...
b. Then add the .no-placeholder Class to the .video-wrap Container that encloses the <video> Tag. Example:
...
c. Please find the following code in the js/functions.js File:
if( SEMICOLON.isMobile.any() ) {
var placeholderImg = elementVideo.attr('poster');
if( placeholderImg != '' ) {
element.append('')
}
}and replace it with:
if( SEMICOLON.isMobile.any() && !element.hasClass('no-placeholder') ) {
var placeholderImg = elementVideo.attr('poster');
if( placeholderImg != '' ) {
element.append('')
}
}This will definitely work fine. Hope this Helps.
Do let us know if we can help you with anything else or if you find any further issues with Canvas.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard