You are here

public function MySpace::flash in Video Filter 8

Flash video (flv)

Overrides VideoFilterBase::flash

File

src/Plugin/VideoFilter/MySpace.php, line 29

Class

MySpace
Provides MySpace codec for Video Filter.

Namespace

Drupal\video_filter\Plugin\VideoFilter

Code

public function flash($video) {

  // The last match is the ID we need.
  $last = count($video['codec']['matches']);
  return [
    'src' => '//mediaservices.myspace.com/services/media/embed.aspx/m=' . $video['codec']['matches'][$last - 1],
  ];
}