| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Theme: Live Stream. |
| 5 |
* |
| 6 |
* @link https://plugins360.com |
| 7 |
* @since 1.6.4 |
| 8 |
* |
| 9 |
* @package Automatic_YouTube_Gallery |
| 10 |
*/ |
| 11 |
|
| 12 |
$livestream_settings = get_option( 'ayg_livestream_settings' ); |
| 13 |
|
| 14 |
$player_ratio = ! empty( $attributes['player_ratio'] ) ? (float) $attributes['player_ratio'] : '56.25'; |
| 15 |
|
| 16 |
$params = array( |
| 17 |
'uid' => sanitize_text_field( $attributes['uid'] ), |
| 18 |
'autoplay' => (int) $attributes['autoplay'], |
| 19 |
'muted' => (int) $attributes['muted'], |
| 20 |
'controls' => (int) $attributes['controls'], |
| 21 |
'modestbranding' => (int) $attributes['modestbranding'], |
| 22 |
'cc_load_policy' => (int) $attributes['cc_load_policy'], |
| 23 |
'iv_load_policy' => (int) $attributes['iv_load_policy'], |
| 24 |
'hl' => sanitize_text_field( $attributes['hl'] ), |
| 25 |
'cc_lang_pref' => sanitize_text_field( $attributes['cc_lang_pref'] ), |
| 26 |
'is_live' => 1 |
| 27 |
); |
| 28 |
?> |
| 29 |
|
| 30 |
<div id="ayg-<?php echo esc_attr( $attributes['uid'] ); ?>" class="ayg ayg-theme-livestream" data-params='<?php echo wp_json_encode( $params ); ?>'> |
| 31 |
<!-- Player --> |
| 32 |
<div class="ayg-player"> |
| 33 |
<div class="ayg-player-wrapper" style="padding-bottom: <?php echo (float) $player_ratio; ?>%;"> |
| 34 |
<div class="ayg-player-iframe" style="display: none;" width="100%" height="100%" src="about:blank" data-id="<?php echo esc_attr( $response->id ); ?>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></div> |
| 35 |
</div> |
| 36 |
</div> |
| 37 |
|
| 38 |
<!-- Fallback Message --> |
| 39 |
<div class="ayg-fallback-message" style="display: none;"> |
| 40 |
<?php echo wp_kses_post( $livestream_settings['fallback_message'] ); ?> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
|
| 44 |
|