You are here

public function Jw_player::getSettings in JW Player 8

Returns the preset settings.

Return value

array The preset settings.

Overrides Jw_playerInterface::getSettings

1 call to Jw_player::getSettings()
Jw_player::settingsDisplay in src/Entity/Jw_player.php
Helper function to display JW Player preset settings.

File

src/Entity/Jw_player.php, line 73

Class

Jw_player
Defines the JW Player preset entity.

Namespace

Drupal\jw_player\Entity

Code

public function getSettings() {
  if (isset($this->settings['responsive']) && $this->settings['responsive']) {
    unset($this->settings['height']);
    $this->settings['width'] .= '%';
  }
  else {
    unset($this->settings['aspectratio']);
  }
  return $this->settings;
}