Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion includes/Integration/BunnyNet.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,13 @@ public static function is_bunnynet_video_source() {
* @return string video content
*/
private static function get_embed_video( $bunny_video_id ):string {
// Ensure the URL uses the embed format
$embed_url = str_replace('https://iframe.mediadelivery.net/play', 'https://iframe.mediadelivery.net/embed', $bunny_video_id);
ob_start();
?>
<div class="tutor-video-player">
<div style="position: relative; padding-top: 56.25%;">
<iframe src="<?php echo esc_attr( $bunny_video_id ); ?>" loading="lazy" style="border: none; position: absolute; top: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe>
<iframe src="<?php echo esc_attr( $embed_url ); ?>" loading="lazy" style="border: none; position: absolute; top: 0; height: 100%; width: 100%;" allow="accelerometer; gyroscope; autoplay; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe>
</div>
</div>
<?php
Expand Down