1
votes

I am trying to use the DailyMotion Embed API in order to play a video on iOS. I have disabled the chrome, because I have custom controls. This works perfectly fine on desktop and other mobile devices, but not on iOS. This has to do with iOS not allowing JS triggering of video playback. However, I need to be able to somehow start the DailyMotion video either through an event or through DailyMotion's embedded iframe (For example, Youtube has a large red play button). I am hoping not to have to disable my custom controls just to get the video to start playing on iOS.

I have made a fiddle with the code: http://jsfiddle.net/recqfww6/

$(function() {

  DM.init();

  embedPlayer = DM.player($('#embed-player')[0], {
    video: 'x2f5zar',
    width: '100%',
    height: '100%',
    params: {
        'api': 1,
        'autoplay': 0,
        'chromeless': 1,
        'background': '000000',
        'html': 1,
        'id': 'embed-player',
        'info': 0,
        'logo': 1,
        'related': 0,
        'webkit-playsinline': 1
    }
  });

  $('#play_btn').on('click', function() {
    embedPlayer.play();
  });
});

You can try playing that on Desktop and then using this link to play on iOS: https://jsfiddle.net/recqfww6/embedded/result/

When clicking the button on iOS, DailyMotion shows a loading icon, but never loads.

Thanks for any help!

1

1 Answers

1
votes

This is something we're working on. The new version of our player is coming soon, stay tuned !