• Resolved sunwine

    (@sunwine)


    Hello I’m trying to get vertical videos to work on PrestoPlayer but no solution seems to be working.

    I’ve read the past help requests and saw the php code suggested to add to functions.php to solve the issue.

    But for me the code doesn’t seem to be doing anything.

    add_action(‘wp_footer’, function () { ?>
    <script>
    jQuery(function() {
    if (!wp || !wp.hooks) return;
    wp.hooks.addFilter(‘presto.playerSettings’, ‘pp-set-aspect-ratio’, function(settings) {
    
    if (settings.id === 497	) { // this is the video id of that first video
    settings.ratio = ‘9:16’;
    }
    
    return settings;
    });
    });
    </script>
    <?php });

    I’ve also tried the other code:

    add_action(‘wp_footer’, function () { ?>
    <script>
    jQuery(function() {
    if (!wp || !wp.hooks) return;
    wp.hooks.addFilter(‘presto.playerSettings’, ‘pp-set-aspect-ratio’, function(settings) {
    settings.ratio = ’16:9′;
    return settings;
    });
    });
    </script>
    <?php });

    I’m not sure what im doing wrong and would appreciate some assistance.

    I’ve changed the settings.id to the correct media.

    I’ve disabled other plugins.

    and still getting no results, what am i missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • paulam11

    (@paulam11)

    Hello there,

    You can use this snippet to add a new aspect ratio to match what they are using:

    add_action('wp_footer', function () { ?>
    	<script>
    		jQuery(function() {
    			if (!wp || !wp.hooks) return;
    			wp.hooks.addFilter('presto.playerSettings', 'pp-set-aspect-ratio', function(settings) {
    				settings.ratio = '9:16';
    				return settings;
    			});
    		});
    	</script>
    <?php });
    

    If there’s anything else, please let me know.

    Have a great day ahead ??

    Thread Starter sunwine

    (@sunwine)

    Perfect that finally worked!

    paulam11

    (@paulam11)

    You’re most welcome!

    If you have any further queries, don’t hesitate to raise a new ticket.

    Have a great day ahead ??

    davidjohnbrunner

    (@davidjohnbrunner)

    Hi there,

    I’m having the same problem and code snipet from @paulam11 works! However, I am using both types of videos, 16:9 and 9:16. How could that be achieved? Now, the horizontal videos appear in a vertical frame.

    Thank you in advance!

    David

    @davidjohnbrunner are you able to resolve this issue? I am facing the same issue right now.

    @riadmahmud46 I got hold of Presto Support and they told me to use the following link example:
    From youtube studio I get: https://www.youtube.com/shorts/ZibkDt1Cmb4
    Then I replace “shorts” with “watch”, place it in the browser and I get the following:
    https://www.youtube.com/watch?v=ZibkDt1Cmb4
    Then I use this link. As soon as the link is “healthy” I get to see the preview in the Media Hub.
    I do not remember all details, but it was all about the correct link.

    Plugin Support prajna

    (@prajnajogi)

    @riadmahmud46 @davidjohnbrunner If the snippet above doesn’t work for you, as per the forum guidelines, please start your own topic. We will do our best to assist you there. Thank you for understanding.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.