Video
\nn\t3::Video()
Everything that is important and helpful on the subject of videos.
Overview of Methods
\nn\t3::Video()->getEmbedUrl($type, $videoId = NULL);
Return the embed URL based on the streaming platform. Classically, the URL that is used in the src attribute of the is used.
\nn\t3::Video()->getEmbedUrl( 'youtube', 'nShlloNgM2E' );
\nn\t3::Video()->getEmbedUrl( 'https://www.youtube.com/watch?v=wu55ZG97zeI&feature=youtu.be' );
Copied!
Also exists as ViewHelper:
{my.videourl->nnt3:video.embedUrl()}
Copied!
| @return string
\nn\t3::Video()->getExternalType($url = NULL);
Returns an array with information about the streaming platform and code for embedding a video.
\nn\t3::Video()->getExternalType( 'https://www.youtube.com/watch/abTAgsdjA' );
Copied!
| @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( 'https://www.youtube.com/watch?v=wu55ZG97zeI&feature=youtu.be' );
// => https://www.youtube-nocookie.com/watch?v=kV8v2GKC8WA
Copied!
| @return string
\nn\t3::Video()->isExternal($url = NULL);
Checks whether the URL is an external video on YouTube or Vimeo. Returns an array with data for embedding.
\nn\t3::Video()->isExternal( 'https://www.youtube.com/...' );
Copied!
| @return array