Ustream.php in Video Filter 8
File
src/Plugin/VideoFilter/Ustream.php
View source
<?php
namespace Drupal\video_filter\Plugin\VideoFilter;
use Drupal\video_filter\VideoFilterBase;
class Ustream extends VideoFilterBase {
public function iframe($video) {
$attributes = [
'html5ui' => 'html5ui',
'autoplay' => isset($video['autoplay']) ? 'autoplay=' . (int) $video['autoplay'] : 'autoplay=0',
];
return [
'src' => '//www.ustream.tv/embed/recorded/' . $video['codec']['matches'][1] . '?' . implode('&', $attributes),
'properties' => [
'allowfullscreen' => 'true',
'webkitallowfullscreen' => 'true',
],
];
}
public function options() {
$form = parent::options();
$form['autoplay'] = [
'#title' => $this
->t('Autoplay'),
'#type' => 'checkbox',
];
return $form;
}
}
Classes
Name |
Description |
Ustream |
Provides Ustream codec for Video Filter. |