The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

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

  1. newpixel
    Posted 3 years ago #


    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...



  2. Dustin Lammiman
    Plugin Author

    Posted 3 years 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
    Posted 3 years 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

  • Video.js - HTML5 Video Player for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic