MediaLoader Class
Handles retrieval and injection of media in articles and pages
Constructor
MediaLoader
()
Item Index
Properties
Methods
getMediaTemplate
(
-
options
-
cb
Retrieves the media template for rendering media
Parameters:
-
options
Object-
[mediaTemplatePath='elements/media']
String optional
-
-
cb
Function
onMediaAvailable
(
-
articleLayout
-
options
-
cb
Parameters:
-
articleLayout
String -
options
Object -
cb
Function
replaceMediaTag
(
-
layout
-
mediaTemplate
-
mediaCache
-
cb
Replaces an article or page layout's ^media_display^ tag with a media embed
Parameters:
-
layout
StringThe HTML layout of the article or page
-
mediaTemplate
StringThe template of the media embed
-
mediaCache
Object -
cb
FunctionCallback function
scanForFlags
(
Array
-
layout
Scans a string for media flags then parses them to return an array of each one that was found
Parameters:
-
layout
String
Returns:
Array:
start
(
-
articleLayout
-
[options]
-
cb
Processes an article or page to insert media
Parameters:
-
articleLayout
StringThe HTML layout of the article or page
-
[options]
Object optional -
cb
Function