VideoMediaRenderer Class
Constructor
VideoMediaRenderer
()
Item Index
Methods
- getEmbedUrl static
- getIcon static
- getMediaId static
- getMeta static
- getName static
- getNativeUrl static
- getStyle static
- getSupportedExtensions static
- getSupportedTypes static
- getThumbnail static
- getType static
- isSupported static
- render static
- renderByUrl static
Methods
getEmbedUrl
-
mediaId
Retrieves the source URI that will be used when generating the rendering
Parameters:
-
mediaId
StringThe unique (only to the type) media identifier
Returns:
A properly formatted URI string that points to the resource represented by the media Id
getIcon
-
type
Retrieves the Font Awesome icon class. It is safe to assume that the type provided will be a supported type by the renderer.
Parameters:
-
type
String
Returns:
getMediaId
()
static
Retrieves the unique identifier from the URL provided. The value should distinguish the media resource from the others of this type and provide insight on how to generate the embed URL.
getMeta
-
urlStr
-
isFile
-
cb
Retrieves any meta data about the media represented by the URL.
Parameters:
-
urlStr
String -
isFile
Booleanindicates if the URL points to a file that was uploaded to the PB server
-
cb
FunctionA callback that provides an Error if occurred and an Object if meta was collected. NULL if no meta was collected
getName
()
String
static
Retrieves the name of the renderer.
Returns:
getNativeUrl
()
static
Retrieves the native URL for the media resource. This can be the raw page where it was found or a direct link to the content.
getStyle
-
viewType
Retrieves the style for the specified type of view
Parameters:
-
viewType
StringThe view type calling for a styling
Returns:
a hash of style properties
getSupportedExtensions
()
Array
static
Retrieves the supported extension types for the renderer.
Returns:
getSupportedTypes
()
Object
static
Retrieves the supported media types as a hash.
Returns:
getThumbnail
-
urlStr
-
cb
Retrieves a URI to a thumbnail for the media resource
Parameters:
-
urlStr
String -
cb
FunctionA callback where the first parameter is an Error if occurred and the second is the URI string to the thumbnail. Empty string or NULL if no thumbnail is available
getType
-
urlStr
Gets the specific type of the media resource represented by the provided URL
Parameters:
-
urlStr
String
Returns:
isSupported
-
urlStr
Determines if the URL to a media object is supported by this renderer
Parameters:
-
urlStr
String
Returns:
TRUE if the URL is supported by the renderer, FALSE if not
render
-
media
-
[options]
-
cb
Renders the media resource via the media descriptor object. It is only guaranteed that the "location" property will be available at the time of rendering.
Parameters:
-
media
Object-
location
StringThe unique resource identifier (only to the media type) for the media resource
-
-
[options]
Object optional-
[attrs]
Object optionalA hash of all attributes (excluding style) that will be applied to the element generated by the rendering
-
[style]
Object optionalA hash of all attributes that will be applied to the style of the element generated by the rendering.
-
-
cb
FunctionA callback where the first parameter is an Error if occurred and the second is the rendering of the media resource as a HTML formatted string
renderByUrl
-
urlStr
-
[options]
-
cb
Renders the media resource via the raw URL to the resource
Parameters:
-
urlStr
String -
[options]
Object optional-
[attrs]
Object optionalA hash of all attributes (excluding style) that will be applied to the element generated by the rendering
-
[style]
Object optionalA hash of all attributes that will be applied to the style of the element generated by the rendering.
-
-
cb
FunctionA callback where the first parameter is an Error if occurred and the second is the rendering of the media resource as a HTML formatted string
Properties
STYLES
Object
private
static
Provides the styles used by each type of view
SUPPORTED
Object
private
static
The list of supported extensions
TYPE
String
private
static
The media type supported by the provider