Okay
  Public Ticket #1005289
Youtube embeded player parameters
Closed

Comments

  •  2
    emma started the conversation

    Hi! I would like to use the player parameters rel=0 and loop=1 on my lightbox video embedded player. I set loop to true in the theme settings but it didn't have an effect on this.

    Ideally I'd like to hardcode this setting into the php ( I want to loop and disable related videos for all my embedded videos) but I cannot find the file where to make the change. 

    Thanks in advance!

  • [deleted] replied

    Hi Emma,

    I understand what you are talking about so I've figured out a solution for you.

    Can you please add the following code in functions.php (end of file):

    // YouTube Player Lightbox Params
    function youtube_player_options_lightbox( $opts ) {
    $opts['youtubePlayerParams'] = array(
    'rel' => 0,
    'loop' => 1
    );

    return $opts;
    }

    add_filter( 'kalium_lg_options', 'youtube_player_options_lightbox' );

    This should work for you, so let me know if it did.

  •  2
    emma replied

    Thanks!! The rel=0 works great! 

    But it's not looping, I think I need to add ?playlist=VIDEOID to tell it to loop the same video. Do you know how I can add that? Does this function have access to that variable?

  • [deleted] replied

    Hi emma,

    We're sorry but this option is not possible.

    Will set this ticket as closed from here.