Video format in Post on mobile Safari / Youtube embed issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • #20604
    uberkarl
    Participant

    Hi there,

    I’m having trouble getting a YouTube video to playback on mobile Safari on an iPhone. I’ve created a post with the format ‘video’ and added the URL for the YouTube video.

    The embedded video/preview image shows fine but when I press play it momentarily tries to launch the YouTube playback and then fails. Oddly this is only an issue in Portrait mode (in Landscape it plays fine). If I start playback in Landscape and then turn the phone to Portrait it stops playback.

    Any help is appreciated.

    Thanks,
    Karl

    #20605
    uberkarl
    Participant

    Have done some further investigation:

    The video is embedded under function pinboard_first_embed() in functions.php. I tried removing the surrounding div class “entry-attachment” and although I lost my formatting of the embed image the playback started working again.

    I haven’t had a time to review what the class .entry-attachment might be doing to stop playback in portrait mode though.

    #20608
    uberkarl
    Participant

    Have ended up commenting out a line of code under pinboard_move_elements() within functions.php.

    var video = $(‘.entry-attachment’, container);
    if(‘undefined’ !== typeof video)
    //$(‘.entry-container’, container).before(video);

    I don’t know what it doesn’t like specifically about Portrait mode on iPhone in Safari but the fix will have to do for now.

    Happy to hear from anyone else that may have had this same problem or if there’s a solution that doesn’t require changing the code.

    Cheers.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.