API/libsapojs/SAPO/Utility/VideoEmbed

[Elements] are optional

Class SAPO.Utility.VideoEmbed


class SAPO.Utility.VideoEmbed
This class has several functions that check links from known video websites and generates the appropriate embed code for those videos.
Defined in Utility/VideoEmbed/0.1/lib.js

Function Summary
generates embedding html from an url of a video hosted on dailymotion
Returns the large dimensions for a movie from a given service
Returns the small dimensions for a movie from a given service
generates embedding html from an url of a video hosted on google videos
generates embedding html for a video from a given url
generates embedding html from an url of a video hosted on metacafe
generates embedding html from an url of a video hosted on sapo videos
generates embedding html from an url of a video hosted on vimeo
generates embedding html from an url of a video hosted on youtube

Function Details

function dailymotion

String dailymotion(String url)
generates embedding html from an url of a video hosted on dailymotion
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized

function getLargeDimensions

Array getLargeDimensions(String service)
Returns the large dimensions for a movie from a given service
Parameters:
service - the name of the function used to process links of a service on this same module
Returns:
An array with the new dimensions

function getSmallDimensions

Array getSmallDimensions(String service)
Returns the small dimensions for a movie from a given service
Parameters:
service - the name of the function used to process links of a service on this same module
Returns:
An array with the new dimensions

function googleVideo

String googleVideo(String url)
generates embedding html from an url of a video hosted on google videos
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized

function makeEmbedHTML

String makeEmbedHTML(String url)
generates embedding html for a video from a given url
Parameters:
url - video url
Returns:
Object with parameters service (service name) and html, which has the code for embedding a video in a page. false if the link is not valid or unrecognized

function metacafe

String metacafe(String url)
generates embedding html from an url of a video hosted on metacafe
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized

function sapoVideos

String sapoVideos(String url)
generates embedding html from an url of a video hosted on sapo videos
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized

function supportedServices

String supportedServices()
Returns:
A string with a list of currently supported services

function vimeo

String vimeo(String url)
generates embedding html from an url of a video hosted on vimeo
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized

function youtube

String youtube(String url)
generates embedding html from an url of a video hosted on youtube
Parameters:
url - video url
Returns:
Code for embedding a video in a page, false if the link is not valid or unrecognized