SproutCMS

This is the code documentation for the SproutCMS project

class EmbedVideo

No description yet.

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends EmbedVideo {
    
    /**
    * Return the URL for our dynamic thumbnail resizer for a given video url
    * 
    * Arguments are the same as `File::resizeUrl`
    * Size spec only supports crop at this time (e.g. c200x150)
    **/
    public function resizedThumb ($url, $sizespec) {
        // Method code goes here
    }
    
    /**
    * Parse the URL into a video-id and type
    **/
    public function getVideoIdType ($url) {
        // Method code goes here
    }
    
    /**
    * Get a thumbnail as a full absolute URL)
    **/
    public function getThumbFilename ($url, Quality. $quality) {
        // Method code goes here
    }
    
    /**
    * Return HTML for embedding a video, based on the URL.
    * Supports YouTube and Vimeo.
    * 
    * Options include:
    *    bool    autoplay   Begin playing the video straight away
    *    string  title      Title attribute
    **/
    public function renderEmbed (string $url, int $width, int $height, array $options) {
        // Method code goes here
    }
    
}
?>