GameVideos.php in Video Filter 8
File
src/Plugin/VideoFilter/GameVideos.php
View source
<?php
namespace Drupal\video_filter\Plugin\VideoFilter;
use Drupal\video_filter\VideoFilterBase;
class GameVideos extends VideoFilterBase {
public function flash($video) {
return [
'src' => '//gamevideos.1up.com/swf/gamevideos12.swf?embedded=1&fullscreen=1&autoplay=' . (!empty($video['autoplay']) ? '1' : '0') . '&src=http://gamevideos.1up.com/do/videoListXML%3Fid%3D' . $video['codec']['matches'][1],
];
}
public function options() {
$form = parent::options();
$form['autoplay'] = [
'#title' => $this
->t('Autoplay (optional)'),
'#type' => 'checkbox',
];
return $form;
}
}
Classes
Name |
Description |
GameVideos |
Provides GameVideos codec for Video Filter. |