public abstract class MediaComponent extends WebMarkupContainer
| Modifier and Type | Class and Description |
|---|---|
static class |
MediaComponent.Cors
To be used for the crossorigin attribute
|
static class |
MediaComponent.Preload
To be used for the preload attribute
|
ENABLE, FLAG_AFTER_RENDERING, FLAG_INITIALIZED, FLAG_PREPARED_FOR_RENDER, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RENDERING, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Constructor and Description |
|---|
MediaComponent(String id)
Constructor.
|
MediaComponent(String id,
IModel<?> model)
Constructor.
|
MediaComponent(String id,
IModel<?> model,
ResourceReference resourceReference)
Creates a media component
|
MediaComponent(String id,
IModel<?> model,
ResourceReference resourceReference,
PageParameters pageParameters)
Creates a media component
|
MediaComponent(String id,
IModel<?> model,
String url)
Creates a media component
|
MediaComponent(String id,
IModel<?> model,
String url,
PageParameters pageParameters)
Creates a media component
|
MediaComponent(String id,
ResourceReference resourceReference)
Creates a media component
|
MediaComponent(String id,
ResourceReference resourceReference,
PageParameters pageParameters)
Creates a media component
|
MediaComponent(String id,
String url)
Creates a media component
|
| Modifier and Type | Method and Description |
|---|---|
MediaComponent.Cors |
getCrossOrigin()
Gets the cross origin settings
|
String |
getEndTime()
Gets the position at which the media component stops the playback
|
String |
getMediaGroup()
Gets the media group.
|
PageParameters |
getPageParameters()
Gets the page parameter applied to the URL of the media component
|
MediaComponent.Preload |
getPreload()
The type of preload
|
String |
getStartTime()
Gets the position at which the media component starts the playback
|
String |
getType()
Gets the type
|
boolean |
hasControls()
If the controls are going to be displayed
|
boolean |
isAutoplay()
If the playback is autoplayed on load
|
boolean |
isLooping()
If the playback is looped
|
boolean |
isMuted()
If the playback is muted initially
|
protected void |
onComponentTag(ComponentTag tag)
Processes the component tag.
|
void |
setAutoplay(boolean autoplay)
Sets the playback to be autoplayed on load
|
void |
setControls(Boolean controls)
Sets if the controls are going to be displayed
|
void |
setCrossOrigin(MediaComponent.Cors crossOrigin)
Sets the cross origin settings
ANONYMOUS: Cross-origin CORS requests for the element will not have the credentials flag set. USER_CREDENTIALS: Cross-origin CORS requests for the element will have the credentials flag set. NO_CORS: The empty string is also a valid keyword, and maps to the Anonymous state. |
void |
setEndTime(String endTime)
Sets the position at which the media component stops the playback
t=10,20 t=npt:10,20 t=120s,121.5s t=npt:120,0:02:01.5 t=smpte-30:0:02:00,0:02:01:15 t=smpte-25:0:02:00:00,0:02:01:12.1 t=clock:20090726T111901Z,20090726T121901Z |
void |
setLooping(boolean loop)
Sets the playback to be looped
|
void |
setMediaGroup(String mediaGroup)
Sets the media group
|
void |
setMuted(boolean muted)
Sets the playback muted initially
|
void |
setPageParameters(PageParameters pageParameters)
Sets the page parameter applied to the URL of the media component
|
void |
setPreload(MediaComponent.Preload preload)
Sets the type of preload.
|
void |
setStartTime(String startTime)
Sets the position at which the media component starts the playback
t=10,20 t=npt:10,20 t=120s,121.5s t=npt:120,0:02:01.5 t=smpte-30:0:02:00,0:02:01:15 t=smpte-25:0:02:00:00,0:02:01:12.1 t=clock:20090726T111901Z,20090726T121901Z |
void |
setType(String type)
Sets the type
* The following list shows some examples of how to use the codecs= MIME parameter in the type attribute. H.264 Constrained baseline profile video (main and extended video compatible) level 3 and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'> H.264 Extended profile video (baseline-compatible) level 3 and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="avc1.58A01E, mp4a.40.2"'> H.264 Main profile video level 3 and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="avc1.4D401E, mp4a.40.2"'> H.264 'High' profile video (incompatible with main, baseline, or extended profiles) level 3 and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="avc1.64001E, mp4a.40.2"'> MPEG-4 Visual Simple Profile Level 0 video and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="mp4v.20.8, mp4a.40.2"'> MPEG-4 Advanced Simple Profile Level 0 video and Low-Complexity AAC audio in MP4 container <source src='video.mp4' type='video/mp4; codecs="mp4v.20.240, mp4a.40.2"'> MPEG-4 Visual Simple Profile Level 0 video and AMR audio in 3GPP container <source src='video.3gp' type='video/3gpp; codecs="mp4v.20.8, samr"'> Theora video and Vorbis audio in Ogg container <source src='video.ogv' type='video/ogg; codecs="theora, vorbis"'> Theora video and Speex audio in Ogg container <source src='video.ogv' type='video/ogg; codecs="theora, speex"'> Vorbis audio alone in Ogg container <source src='audio.ogg' type='audio/ogg; codecs=vorbis'> Speex audio alone in Ogg container <source src='audio.spx' type='audio/ogg; codecs=speex'> FLAC audio alone in Ogg container <source src='audio.oga' type='audio/ogg; codecs=flac'> Dirac video and Vorbis audio in Ogg container <source src='video.ogv' type='video/ogg; codecs="dirac, vorbis"'> Theora video and Vorbis audio in Matroska container <source src='video.mkv' type='video/x-matroska; codecs="theora, vorbis"'> |
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSessionadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, createConverter, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrappublic MediaComponent(String id)
id - The component idpublic MediaComponent(String id, IModel<?> model)
id - The component idmodel - The component modelpublic MediaComponent(String id, ResourceReference resourceReference)
id - The component idresourceReference - the resource reference of the media filepublic MediaComponent(String id, IModel<?> model, ResourceReference resourceReference)
id - The component idmodel - the internally used modelresourceReference - the resource reference of the media filepublic MediaComponent(String id, ResourceReference resourceReference, PageParameters pageParameters)
id - The component idresourceReference - the resource reference of the media filepageParameters - the page parameters to be used to be prepended to the media URLpublic MediaComponent(String id, IModel<?> model, ResourceReference resourceReference, PageParameters pageParameters)
id - The component idmodel - the internally used modelresourceReference - the resource reference of the media filepageParameters - the page parameters to be used to be prepended to the media URLpublic MediaComponent(String id, String url)
id - The component idurl - an external URL to be used for the media componentpublic MediaComponent(String id, IModel<?> model, String url)
id - The component idmodel - the internally used modelurl - an external URL to be used for the media componentpublic MediaComponent(String id, IModel<?> model, String url, PageParameters pageParameters)
id - The component idmodel - the internally used modelurl - an external URL to be used for the media componentpageParameters - the page parameters to be used to be prepended to the media URLprotected void onComponentTag(ComponentTag tag)
ComponentonComponentTag in class Componenttag - Tag to modifypublic boolean isAutoplay()
public void setAutoplay(boolean autoplay)
autoplay - If the playback is autoplayed on loadpublic boolean isLooping()
public void setLooping(boolean loop)
loop - If the playback is loopedpublic PageParameters getPageParameters()
public void setPageParameters(PageParameters pageParameters)
pageParameters - the page parameter which are going to be applied to the URL of the media componentpublic boolean isMuted()
public void setMuted(boolean muted)
muted - If the playback is muted initiallypublic boolean hasControls()
public void setControls(Boolean controls)
controls - if the controls are going to displayedpublic MediaComponent.Preload getPreload()
#setPreload(Preload)}public void setPreload(MediaComponent.Preload preload)
preload - the type of the preloadpublic String getStartTime()
#setStartTime(String)}public void setStartTime(String startTime)
startTime - the time at which position the media component starts the playbackpublic String getEndTime()
#setEndTime(String)}public void setEndTime(String endTime)
endTime - the time at which position the media component stops the playbackpublic String getMediaGroup()
public void setMediaGroup(String mediaGroup)
mediaGroup - to be setpublic MediaComponent.Cors getCrossOrigin()
#setCrossOrigin(Cors)}public void setCrossOrigin(MediaComponent.Cors crossOrigin)
crossOrigin - the cross origins settings to setpublic String getType()
#setType(String)}public void setType(String type)
type - the type of this media elementCopyright © 2006–2021 Apache Software Foundation. All rights reserved.