You are here

interface BrightcoveVideoInterface in Brightcove Video Connect 3.x

Same name and namespace in other branches
  1. 8.2 src/BrightcoveVideoInterface.php \Drupal\brightcove\BrightcoveVideoInterface
  2. 8 src/BrightcoveVideoInterface.php \Drupal\brightcove\BrightcoveVideoInterface

Provides an interface for defining Brightcove Videos.

Hierarchy

Expanded class hierarchy of BrightcoveVideoInterface

All classes that implement BrightcoveVideoInterface

2 files declare their use of BrightcoveVideoInterface
BrightcoveVideo.php in src/Entity/BrightcoveVideo.php
BrightcoveVideoSearch.php in src/Plugin/Search/BrightcoveVideoSearch.php

File

src/BrightcoveVideoInterface.php, line 10

Namespace

Drupal\brightcove
View source
interface BrightcoveVideoInterface {

  /**
   * Denotes that the video is published.
   */
  const PUBLISHED = 1;

  /**
   * Denotes that the video is not published.
   */
  const NOT_PUBLISHED = 0;

  /**
   * Brightcove video thumbnail images path.
   */
  const VIDEOS_IMAGES_THUMBNAILS_DIR = 'brightcove/videos/images/thumbnails';

  /**
   * Brightcove video poster images path.
   */
  const VIDEOS_IMAGES_POSTERS_DIR = 'brightcove/videos/images/posters';

  /**
   * Brightcove thumbnail image type.
   */
  const IMAGE_TYPE_THUMBNAIL = 'thumbnail';

  /**
   * Brightcove poster image type.
   */
  const IMAGE_TYPE_POSTER = 'poster';

  /**
   * Brightcove economics type, free.
   */
  const ECONOMICS_TYPE_FREE = 'FREE';

  /**
   * Brightcove economics type, ad supported.
   */
  const ECONOMICS_TYPE_AD_SUPPORTED = 'AD_SUPPORTED';

  /**
   * Brightcove active state.
   */
  const STATE_ACTIVE = 'ACTIVE';

  /**
   * Brightcove inactive state.
   */
  const STATE_INACTIVE = 'INACTIVE';

  /**
   * Brightcove video tags vocabulary ID.
   */
  const TAGS_VID = 'brightcove_video_tags';

  /**
   * Helper function to save the image for the entity.
   *
   * @param string $type
   *   The type of the image. Possible values are:
   *     - IMAGE_TYPE_THUMBNAIL: Recommended aspect ratio of 16:9 and a minimum
   *                             width of 640px.
   *     - IMAGE_TYPE_POSTER: Recommended aspect ratio of 16:9 and a minimum
   *                          width of 160px.
   * @param \Brightcove\Item\Video\Image|array $image
   *   The image from Brightcove.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   *
   * @throws \Exception
   *   If the type is not matched with the possible types.
   */
  public function saveImage($type, $image);

  /**
   * Returns the video's duration.
   *
   * @return int
   *   Video duration.
   */
  public function getDuration();

  /**
   * Sets the video duration.
   *
   * @param int $duration
   *   The duration of the video.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setDuration($duration);

  /**
   * Returns the video's related link.
   *
   * @return array
   *   An array list of links.
   */
  public function getRelatedLink();

  /**
   * Sets the video's related link.
   *
   * @param array|null $related_link
   *   The related link.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setRelatedLink($related_link);

  /**
   * Returns the long description of the video.
   *
   * @return string
   *   The long description of the video.
   */
  public function getLongDescription();

  /**
   * Sets the video's long description.
   *
   * @param string $long_description
   *   The long description of the video.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setLongDescription($long_description);

  /**
   * Returns the economics state.
   *
   * @return bool
   *   The economics state of the video.
   */
  public function getEconomics();

  /**
   * Sets the video's economics state.
   *
   * @param bool $economics
   *   The economics state of the video.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setEconomics($economics);

  /**
   * Returns the video file.
   *
   * @return array
   *   The video file entity.
   */
  public function getVideoFile();

  /**
   * Sets the video file.
   *
   * @param array|null $video_file
   *   The video file entity.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setVideoFile($video_file);

  /**
   * Returns the video URL.
   *
   * @return string
   *   The video URL.
   */
  public function getVideoUrl();

  /**
   * Sets the video URL.
   *
   * @param string $video_url
   *   The video URL.
   *
   * @return $this
   */
  public function setVideoUrl($video_url);

  /**
   * Returns the video's profile.
   *
   * @return string
   *   The video profile.
   */
  public function getProfile();

  /**
   * Sets the video's profile.
   *
   * @param string $profile
   *   Video's profile.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setProfile($profile);

  /**
   * Returns the video's poster image.
   *
   * @return array
   *   The poster image on the entity.
   */
  public function getPoster();

  /**
   * Sets the video's poster image.
   *
   * @param array|null $poster
   *   The poster image which needs to be saved on the entity.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setPoster($poster);

  /**
   * Returns the video's thumbnail image.
   *
   * @return array
   *   The thumbnail image on the entity.
   */
  public function getThumbnail();

  /**
   * Sets the video's thumbnail image.
   *
   * @param array|null $thumbnail
   *   The thumbnail image which needs to be saved on the entity.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setThumbnail($thumbnail);

  /**
   * Returns the schedule starts at date.
   *
   * @return string
   *   The datetime of the schedule starts at date.
   */
  public function getScheduleStartsAt();

  /**
   * Returns the custom field values.
   *
   * @return array
   *   Each field's value keyed by it's field ID.
   */
  public function getCustomFieldValues();

  /**
   * Sets the custom field values.
   *
   * @param array $values
   *   Field values keyed by field's ID.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setCustomFieldValues(array $values);

  /**
   * Sets the video's schedule starts at date.
   *
   * @param string $schedule_starts_at
   *   The datetime of the schedule starts at date.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setScheduleStartsAt($schedule_starts_at);

  /**
   * Returns the schedule ends at date.
   *
   * @return string
   *   The datetime of the schedule ends at date.
   */
  public function getScheduleEndsAt();

  /**
   * Sets the video's schedule ends at date.
   *
   * @param string $schedule_ends_at
   *   The datetime of the schedule ends at date.
   *
   * @return \Drupal\brightcove\BrightcoveVideoInterface
   *   The called Brightcove Video.
   */
  public function setScheduleEndsAt($schedule_ends_at);

}

Members

Namesort descending Modifiers Type Description Overrides
BrightcoveVideoInterface::ECONOMICS_TYPE_AD_SUPPORTED constant Brightcove economics type, ad supported.
BrightcoveVideoInterface::ECONOMICS_TYPE_FREE constant Brightcove economics type, free.
BrightcoveVideoInterface::getCustomFieldValues public function Returns the custom field values. 1
BrightcoveVideoInterface::getDuration public function Returns the video's duration. 1
BrightcoveVideoInterface::getEconomics public function Returns the economics state. 1
BrightcoveVideoInterface::getLongDescription public function Returns the long description of the video. 1
BrightcoveVideoInterface::getPoster public function Returns the video's poster image. 1
BrightcoveVideoInterface::getProfile public function Returns the video's profile. 1
BrightcoveVideoInterface::getRelatedLink public function Returns the video's related link. 1
BrightcoveVideoInterface::getScheduleEndsAt public function Returns the schedule ends at date. 1
BrightcoveVideoInterface::getScheduleStartsAt public function Returns the schedule starts at date. 1
BrightcoveVideoInterface::getThumbnail public function Returns the video's thumbnail image. 1
BrightcoveVideoInterface::getVideoFile public function Returns the video file. 1
BrightcoveVideoInterface::getVideoUrl public function Returns the video URL. 1
BrightcoveVideoInterface::IMAGE_TYPE_POSTER constant Brightcove poster image type.
BrightcoveVideoInterface::IMAGE_TYPE_THUMBNAIL constant Brightcove thumbnail image type.
BrightcoveVideoInterface::NOT_PUBLISHED constant Denotes that the video is not published.
BrightcoveVideoInterface::PUBLISHED constant Denotes that the video is published.
BrightcoveVideoInterface::saveImage public function Helper function to save the image for the entity. 1
BrightcoveVideoInterface::setCustomFieldValues public function Sets the custom field values. 1
BrightcoveVideoInterface::setDuration public function Sets the video duration. 1
BrightcoveVideoInterface::setEconomics public function Sets the video's economics state. 1
BrightcoveVideoInterface::setLongDescription public function Sets the video's long description. 1
BrightcoveVideoInterface::setPoster public function Sets the video's poster image. 1
BrightcoveVideoInterface::setProfile public function Sets the video's profile. 1
BrightcoveVideoInterface::setRelatedLink public function Sets the video's related link. 1
BrightcoveVideoInterface::setScheduleEndsAt public function Sets the video's schedule ends at date. 1
BrightcoveVideoInterface::setScheduleStartsAt public function Sets the video's schedule starts at date. 1
BrightcoveVideoInterface::setThumbnail public function Sets the video's thumbnail image. 1
BrightcoveVideoInterface::setVideoFile public function Sets the video file. 1
BrightcoveVideoInterface::setVideoUrl public function Sets the video URL. 1
BrightcoveVideoInterface::STATE_ACTIVE constant Brightcove active state.
BrightcoveVideoInterface::STATE_INACTIVE constant Brightcove inactive state.
BrightcoveVideoInterface::TAGS_VID constant Brightcove video tags vocabulary ID.
BrightcoveVideoInterface::VIDEOS_IMAGES_POSTERS_DIR constant Brightcove video poster images path.
BrightcoveVideoInterface::VIDEOS_IMAGES_THUMBNAILS_DIR constant Brightcove video thumbnail images path.