| Server IP : 172.67.75.225 / Your IP : 216.73.216.185 Web Server : nginx/1.27.1 System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 User : vinodai ( 3134) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v1396/chatgptkafila/public_html/wp-content/plugins/presto-player/inc/ |
Upload File : |
<?php
namespace PrestoPlayer;
use PrestoPlayer\Services\ReusableVideos;
use PrestoPlayer\Blocks\AudioBlock;
use PrestoPlayer\Blocks\SelfHostedBlock;
use PrestoPlayer\Blocks\VimeoBlock;
use PrestoPlayer\Blocks\YouTubeBlock;
use PrestoPlayer\Pro\Blocks\BunnyCDNBlock;
class Playlist {
/**
* Parses the attributes with respect to the provider.
*
* @param string $block_name Block name.
* @param array $attributes Attributes of the block.
*
* @return array
*/
public function parsed_attributes( $block_name, $attributes ) {
$attributes = wp_parse_args(
$attributes,
array(
'id' => '',
'src' => '',
'title' => '',
'provider' => '',
'class' => '',
'custom_field' => '',
'poster' => '',
'preload' => 'auto',
'preset' => 0,
'autoplay' => false,
'plays_inline' => false,
'chapters' => array(),
'overlays' => array(),
'tracks' => array(),
'muted_autoplay_preview' => false,
'muted_autoplay_caption_preview' => false,
),
);
switch ( $block_name ) {
case 'presto-player/self-hosted':
return ( new SelfHostedBlock() )->getAttributes( $attributes, '' );
case 'presto-player/youtube':
return ( new YouTubeBlock() )->getAttributes( $attributes, '' );
case 'presto-player/vimeo':
return ( new VimeoBlock() )->getAttributes( $attributes, '' );
case 'presto-player/bunny':
return class_exists( BunnyCDNBlock::class ) ? ( new BunnyCDNBlock() )->getAttributes( $attributes, '' ) : '';
case 'presto-player/audio':
return ( new AudioBlock() )->getAttributes( $attributes, '' );
}
}
}