• Resolved tropicalista

    (@tropicalista)


    The video is not displaying if I try to insert a video before my content as the code below.

    function test( $content ) {
    $test = do_blocks( '
    <!-- wp:presto-player/reusable-display {"id":49} -->
    <div class="wp-block-presto-player-reusable-display"></div>
    <!-- /wp:presto-player/reusable-display -->
    ' );

    return $test . $content;
    }

    add_filter( 'the_content', 'test' );

    After checking your code it seems that you are checking the presence of the block in the hasPlayer() function of the Scripts.php class.

    You better enqueue scripts using block.json.

Viewing 1 replies (of 1 total)
  • HI @tropicalista ,

    Thanks for sharing the details and code snippet.

    We appreciate you looking into how the plugin handles block detection and script loading. If you’re seeing issues with the video not displaying when inserting it this way, the best next step would be to open a support ticket so we can take a closer look at your specific setup and provide more targeted help.

Viewing 1 replies (of 1 total)

The topic ‘Video not displaying if it’s dynamically inserted using do_blocks()’ is closed to new replies.