You are here

YoutubeStream.php in Video 8.2

Same filename and directory in other branches
  1. 8 src/StreamWrapper/YoutubeStream.php

File

src/StreamWrapper/YoutubeStream.php
View source
<?php

namespace Drupal\video\StreamWrapper;

use Drupal\Core\StreamWrapper\ReadOnlyStream;
use Drupal\Core\StreamWrapper\StreamWrapperInterface;

/**
 * Defines a YouTube (youtube://) stream wrapper class.
 */
class YoutubeStream extends VideoRemoteStreamWrapper {
  protected static $base_url = 'http://www.youtube.com/watch';

  /**
   * {@inheritdoc}
   */
  public function getName() {
    return t('YouTube');
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return t('Video served by the YouTube services.');
  }

  /**
   * {@inheritdoc}
   */
  public static function baseUrl() {
    return self::$base_url;
  }

}

Classes

Namesort descending Description
YoutubeStream Defines a YouTube (youtube://) stream wrapper class.