You are here

public function FlickrSlideshows::flash in Video Filter 8

Flash video (flv)

Overrides VideoFilterBase::flash

File

src/Plugin/VideoFilter/FlickrSlideshows.php, line 26

Class

FlickrSlideshows
Provides FlickrSlideshows codec for Video Filter.

Namespace

Drupal\video_filter\Plugin\VideoFilter

Code

public function flash($video) {
  $user_name = $video['codec']['matches'][1];
  $set_id = $video['codec']['matches'][2];
  return [
    'src' => "//www.flickr.com/apps/slideshow/show.swf?v=67348" . ($video['autoplay'] ? '&autoplay=1' : ''),
    'params' => [
      'flashvars' => "&offsite=true&lang=en-us&page_show_url=%2Fphotos%2F{$user_name}%2Fsets%2F{$set_id}%2Fshow%2F&page_show_back_url=%2Fphotos%2F{$user_name}%2Fsets%2F{$set_id}%2F&set_id={$set_id}&jump_to=",
    ],
  ];
}