public static function get_url_embed($url)
    {
        $service = self::identify_service($url);

        $id = self::get_url_id($url);

        if ($service == self::YOUTUBE) {
            return self::get_youtube_embed($id);
        } elseif ($service == self::VIMEO) {
            return self::get_vimeo_embed($id);
        } elseif ($service == self::TWENTYTHREE) {
            return self::get_vimeo_id($id);
        }
        return null;
    }
public static function get_url_embed($url)
    {
        $service = self::identify_service($url);

        $id = self::get_url_id($url);

        if ($service == self::YOUTUBE) {
            return self::get_youtube_embed($id);
        } elseif ($service == self::VIMEO) {
            return self::get_vimeo_embed($id);
        } elseif ($service == self::TWENTYTHREE) {
            return self::get_vimeo_id($id);
        }
        return null;
    }
public static function get_url_embed ( $ url ) { $ service = self :: identify_service ( $ url ) ; $ id = self :: get_url_id ( $ url ) ; if ( $ service == self :: YOUTUBE ) { return self :: get_youtube_embed ( $ id ) ; } elseif ( $ service == self :: VIMEO ) { return self :: get_vimeo_embed ( $ id ) ; } elseif ( $ service == self :: TWENTYTHREE ) { return self :: get_vimeo_id ( $ id ) ; } return null ; }
Determines which cloud video provider is being used based on the passed url,
extracts the video id from the url, and builds an embed url.

@param string $url The url
@return null|string Null on failure, the video's embed url on success
Determines which cloud video provider is being used based on the passed url extracts the video id from the url and builds an embed url .