2

I am using jwplayer in my site, I have included the player using iframe. I have included the player js script.

<script src="//content.jwplatform.com/libraries/playerid.js"></script>

then iframe with the source.

<div style="position:relative; padding-bottom:56.25%; overflow:hidden;">
    <iframe src="//content.jwplatform.com/players/MEDIAID-PLAYERID.html" width="100%" height="100%" frameborder="0" scrolling="auto" allowfullscreen style="position:absolute;"></iframe>
</div>

When the user clicks on a cover image, I will reload the source of the iframe

video_block.attr("src", src);

It was worked on my mobile till last week.(15-March-2017). Now it is not working on mobile devices, I saw they are saying support for autostart on mobile devices. I am not sure the latest release has an effect.

My extracted testing code(this simple code itself not autostart on mobiles, although the corresponding player is autostart enabled):

<html>
<head>
    <title>
        IFRAME SAMPLE
    </title>

</head>

<body>
<div style="position:relative; padding-bottom:56.25%; overflow:hidden;"><iframe src="//content.jwplatform.com/players/mediaid-playerid.html" width="100%" height="100%" frameborder="0" scrolling="auto" allowfullscreen style="position:absolute;"></iframe></div>
<script src="https://content.jwplatform.com/libraries/playerid.js"></script><!-- Featured Video Card Player -->
</body>

Abel
  • 2,371
  • 3
  • 15
  • 29

1 Answers1

0

Unfortunately auto-play is officially disabled in android and has been disabled in IOS for a long time. There is no option to play a video automatically in any major mobile device anymore. ( of course on a web page )

serdar.sanri
  • 2,217
  • 1
  • 17
  • 21
  • No, check this link, https://www.jwplayer.com/blog/mobile-web-autoplay/ I tried it on my android mobile it works. – Abel Mar 21 '17 at 19:43
  • so I think your answer is at https://developers.google.com/web/updates/2016/07/autoplay most probably because of iframe. – serdar.sanri Mar 21 '17 at 19:47
  • But again, the links using iframe only. :( – Abel Mar 21 '17 at 20:37
  • Also you need to give a physical filepath as source to video tags. But with iframes you can use youtube, facebook and more URLs. – Abel Mar 21 '17 at 20:40