TED.php in Video Filter 8
File
src/Plugin/VideoFilter/TED.php
View source
<?php
namespace Drupal\video_filter\Plugin\VideoFilter;
use Drupal\video_filter\VideoFilterBase;
class TED extends VideoFilterBase {
public function instructions() {
return $this
->t('Click in Embed and copy the link -Link to this talk- and paste here.');
}
public function iframe($video) {
$video_id = $video['codec']['matches'][3];
if (empty($video_id)) {
$video_id = $video['codec']['matches'][1];
}
return [
'src' => '//embed-ssl.ted.com/talks/' . $video_id . '.html',
'properties' => [
'webkitAllowFullScreen' => 'true',
'mozallowfullscreen' => 'true',
'allowFullScreen' => 'true',
'scrolling' => 'no',
],
];
}
}
Classes
Name |
Description |
TED |
Provides TED codec for Video Filter. |