Everything that is important and helpful on the subject of videos.

Overview of Methods

\nn\t3::Video()->getEmbedUrl($type, $videoId = NULL);

Return embed URL based on the streaming platform. Classically, the URL used in the src attribute of the <iframe> is used.

\nn\t3::Video()->getEmbedUrl( 'youtube', 'nShlloNgM2E' );
\nn\t3::Video()->getEmbedUrl( '' );

Also acts as a ViewHelper:

@return string

\nn\t3::Video()->getExternalType($url = NULL);

Returns an array with info about the streaming platform and code to embed a video

\nn\t3::Video()->getExternalType( '' );
@return array

\nn\t3::Video()->getWatchUrl($type, $videoId = NULL);

Link URL to the video on the external platform. E.g. to display an external link to the video

\nn\t3::Video()->getWatchUrl( $fileReference );
\nn\t3::Video()->getWatchUrl( 'youtube', 'nShlloNgM2E' );
\nn\t3::Video()->getWatchUrl( '' );

// =>
@return string

\nn\t3::Video()->isExternal($url = NULL);

Perceives whether the URL is an external video on YouTube or Vimeo. Returns an array with data to embed.

\nn\t3::Video()->isExternal( '' );
@return array