Slideshare.php in Video Filter 8
File
src/Plugin/VideoFilter/Slideshare.php
View source
<?php
namespace Drupal\video_filter\Plugin\VideoFilter;
use Drupal\video_filter\VideoFilterBase;
class Slideshare extends VideoFilterBase {
public function instruction() {
return $this
->t('You need to construct your own URL, using the "Wordpress Embed" code from Slideshare, extract the "id", and form the URL like this: slideshare.net/1759622');
}
public function iframe($video) {
return [
'src' => '//www.slideshare.net/slideshow/embed_code/' . $video['codec']['matches'][1],
];
}
}
Classes
Name |
Description |
Slideshare |
Provides Slideshare codec for Video Filter. |