Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
minor cs fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis authored Nov 26, 2021
1 parent e13876f commit dff0c25
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lib/rex_plyr.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,9 @@ public static function outputMedia($url, $setup = null, $poster = null, $consent
}
if ($setup) {
$control_attr = explode(",", $setup);
if ($control_attr && in_array('nopreload', $control_attr))
{
$nopreload = ' preload="none"';
}
if ($control_attr && in_array('nopreload', $control_attr)) {
$nopreload = ' preload="none"';
}
$player_conf = json_encode($control_attr);
$setup = ' data-plyr-config=\'{"controls":' . $player_conf . '}\'';
$autoplay = ($control_attr && in_array('autoplay', $control_attr)) ? ' autoplay muted' : '';
Expand Down Expand Up @@ -212,12 +211,11 @@ public static function outputMedia($url, $setup = null, $poster = null, $consent
$provider = 'vimeo';
$embed_id = $player->getVimeoId($link);
}

if ($provider!='')
{
$out = '<div class="rex-plyr' . $consent_suffix . '" data-plyr-provider="'.$provider.'" data-plyr-embed-id="' . $embed_id . '"' . $setup . '>' . $consent_content . '</div>';

if ($provider != '') {
$out = '<div class="rex-plyr' . $consent_suffix . '" data-plyr-provider="' . $provider . '" data-plyr-embed-id="' . $embed_id . '"' . $setup . '>' . $consent_content . '</div>';
}

if ($player->checkMedia($url) !== false || $player->checkExternalMp4($url) === true) {
if ($poster) {
$poster = ' data-poster="' . $poster . '"';
Expand Down

0 comments on commit dff0c25

Please sign in to comment.