Disabling 'loop' in ytp_video shortcodes

Support Forums for LiveMesh Themes & Plugins Forums Agile Theme Support Disabling 'loop' in ytp_video shortcodes

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by Ernesto Ernesto 5 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6772
    Jjarokerpo
    jjarokerpo
    Member
    Post count: 8

    I would like the ytp_video shortcodes to play a video just once. Currently, this shortcode has ‘loop’ always enabled. The parameter loop="false" has no affect on looping.

    I believe that the mere presence of a ‘loop’ parameter in HTML5 video tag enables looping. Therefore, loop="true", loop="false" and just plain loop will all set this parameter to true. To disable looping, the loop parameter should not appear in the video tag at all. I have a suspicion that the shortcode is miscoded.

    Would you pls tell me how to disable looping in the ytp_video_section shortcode.

    Thank you,
    Jon

    #6806
    Raghavendra
    Raghavendra
    Moderator
    Post count: 4604

    At present, the loop attribute works only for HTML5 videos and not YouTube videos in Agile theme. Will try to incorporate the same into upcoming update. Meanwhile, pls change the line number 63 of the file framework/shortcodes/video-shortcodes.php to

                            < ?php echo '
    '; ?>

    and see if the looping goes away. Pls note that I have added loop: false to the beginning of the video property which the plugin reads to decide on looping. Hope this helps.

    #6807
    Raghavendra
    Raghavendra
    Moderator
    Post count: 4604

    BTW, here is the documentation on the plugin, if it makes things clearer –

    https://github.com/pupunzi/jquery.mb.YTPlayer/wiki

    #6810
    Jjarokerpo
    jjarokerpo
    Member
    Post count: 8

    Hello, the code change did not have any effect. I believe the issue is with the YTPlayer script as another person reported the same problem:

    https://github.com/pupunzi/jquery.mb.YTPlayer/issues/36

    Looping can be disabled by changing the default loop value to false in the jquery.mb.YTPlayer.js script.

    I notice that there is a newer version of this script available that may also resolve the black-bar issue at the top of the player.

    #6853
    Ernesto
    Ernesto
    Member
    Post count: 702

    Hi! This is the name of the plugin file where you can enter those modifications: agile/js/libs/jquery.mb.YTPlayer
    Cheers! Hope that’s useful!

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

You must be logged in to reply to this topic.