• Resolved champdor

    (@champdor)


    Dear futtta,

    We love your plugin, we are using it on several sites.

    On this one however the design calls for 1432px width player size. The biggest 1280px width is breaking the look of the pages. Without Lyte the player window will be very tall on mobile.

    How can I register a custom player size, if it’s possible anyway?

    Regards,
    Champdor

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmmm, easiest solution would be to use the lyte_match_postparse_template filter to change e.g.

    style="width:1280px;max-width:100%
    into
    style="width:1432px;max-width:100%

    hope this helps ??
    frank

    Thread Starter champdor

    (@champdor)

    Hi Frank,

    Thank you for the help. It was flattering you assumed that from this info I can do it but I lived up o the task.

    It works.

    For others to help here is my code to copy:

    // YT LYTE: custom player size (replacing 1280px!)
    add_filter( 'lyte_match_postparse_template', 'piq_custom_yt_playersize', 10, 2 );
    function piq_custom_yt_playersize( $lytetemplate, $templateType ) {
    	$newtemplate = str_replace( 'style="width:1280px;max-width:100%', 'style="width:1432px;max-width:100%', $lytetemplate );
    	return $newtemplate;
    }

    All the best,
    Champdor

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    great job champdor ??

    feel free to leave a review of the plugin and support here!

    I was about to ask this question and came across this post.

    What file do we put that code in?
    Also, is it possible to change the width to 100% and height and just use max-width to limit the max size of the player? I’d like the player to fill the width of the content area it’s in on my site, but not exceed 960px wide.

    Sorry, would also like to remove the 5px margin. Can that just be added to the style area of the code snippet, margin: 0px?

    Thanks in advance!

    • This reply was modified 2 years, 10 months ago by onmrc.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    What file do we put that code in?

    The easiest & safest solution is using the code snippets plugin.

    Also, is it possible to change the width to 100% and height and just use max-width to limit the max size of the player? I’d like the player to fill the width of the content area it’s in on my site, but not exceed 960px wide.

    well, max-width is set to 100%, so if you choose the 1280px wide in the configuration, the max-width will ensure the player remains in the 960px wide content area?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom player size’ is closed to new replies.