WordPress.org

Ready to get started?Download WordPress

Forums

Video.js - HTML5 Video Player for WordPress
odd behavior on iPhone (3 posts)

  1. newpixel
    Member
    Posted 1 year ago #

    Hi

    I installed the plugin and it works great in Safari on my MacBook.

    But I just viewed the page on my iPhone - I've got autoplay set to true, and instead of staying embedded on the page, the video goes full screen (by itself) and starts playing. The normal behavior is for the video to autoplay with no controls, embedded on the page: http://www.artistsofliving.com/?page_id=29

    Here is the shortcode I'm using:
    [video mp4="http://www.artistsofliving.com/video/torsoBlue-raw.mp4" width="280" height="240" autoplay="true" loop="true" controls="false" class="alignleft"]

    Anyway to fix this? Maybe a way to conditionally set autoplay to false on mobile devices? If not, no big deal...

    Thanks

    http://wordpress.org/extend/plugins/videojs-html5-video-player-for-wordpress/

  2. Dustin Lammiman
    Member
    Plugin Author

    Posted 1 year ago #

    iOS (and probably other mobile OSes as well) will only play videos in full screen, not embedded in the page, so what you are seeing is the expected behaviour. As you said, there should be a way to detect if the device is mobile (probably using jQuery) and then disable autoplay using the Video.js API. (actually it may be better to do it in reverse - disable autoplay by default and then use the play method to autoplay on regular screens) I can't guide you through this process, but hopefully that link and a bit of Googling will point you in the right direction.

  3. newpixel
    Member
    Posted 1 year ago #

    Thank you Dustin... I'll dust off my jQuery and begin hacking :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic