You are here

Capped.php in Video Filter 8

File

src/Plugin/VideoFilter/Capped.php
View source
<?php

namespace Drupal\video_filter\Plugin\VideoFilter;

use Drupal\video_filter\VideoFilterBase;

/**
 * Provides Capped codec for Video Filter.
 *
 * @VideoFilter(
 *   id = "capped",
 *   name = @Translation("Capped"),
 *   example_url = "http://capped.tv/playeralt.php?vid=some-title",
 *   regexp = {
 *     "/capped\.tv\/([a-zA-Z0-9\-_]+)/",
 *   },
 *   ratio = "425/355",
 * )
 */
class Capped extends VideoFilterBase {

  /**
   * {@inheritdoc}
   */
  public function flash($video) {
    return [
      'src' => 'http://capped.micksam7.com/playeralt.swf?vid=' . $video['codec']['matches'][1],
    ];
  }

}

Classes

Namesort descending Description
Capped Provides Capped codec for Video Filter.