| @@ 60-70 (lines=11) @@ | ||
| 57 | * |
|
| 58 | * @return array |
|
| 59 | */ |
|
| 60 | private static function getMainOptions(array $options = []): array |
|
| 61 | { |
|
| 62 | $mainOptions = [ |
|
| 63 | 'controls' => 'controls', |
|
| 64 | 'width' => Module::ORIGINAL_PREVIEW_WIDTH, |
|
| 65 | ]; |
|
| 66 | if (isset($options['main']) && is_array($options['main'])) { |
|
| 67 | $mainOptions = ArrayHelper::merge($mainOptions, $options['main']); |
|
| 68 | } |
|
| 69 | return $mainOptions; |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * Get source options of the mediafile. |
|
| @@ 80-90 (lines=11) @@ | ||
| 77 | * |
|
| 78 | * @return array |
|
| 79 | */ |
|
| 80 | private static function getSourceOptions(string $src, array $options = []): array |
|
| 81 | { |
|
| 82 | $sourceOptions = [ |
|
| 83 | 'src' => $src, |
|
| 84 | 'preload' => 'auto' |
|
| 85 | ]; |
|
| 86 | if (isset($options['source']) && is_array($options['source'])) { |
|
| 87 | $sourceOptions = ArrayHelper::merge($sourceOptions, $options['source']); |
|
| 88 | } |
|
| 89 | return $sourceOptions; |
|
| 90 | } |
|
| 91 | ||
| 92 | /** |
|
| 93 | * Get track options of the mediafile. |
|