Class Track
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.MarkupContainer
-
- org.apache.wicket.markup.html.WebMarkupContainer
-
- org.apache.wicket.markup.html.media.Track
-
- All Implemented Interfaces:
Serializable
,Iterable<Component>
,IEventSink
,IEventSource
,IFeedbackContributor
,IConverterLocator
,IMetadataContext<Serializable,Component>
,IHeaderContributor
,IRequestableComponent
,IHierarchical<Component>
,IClusterable
public class Track extends WebMarkupContainer
The track tag is used to provide subtitles, captions, descriptions, chapters, metadata to a video media component- Since:
- 7.0.0
- Author:
- Tobias Soloschenko
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Track.Kind
To be used for the kind attribute
-
Field Summary
-
Fields inherited from class org.apache.wicket.Component
ENABLE, FLAG_INITIALIZED, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING, RFLAG_CONTAINER_HAS_REMOVALS
-
-
Constructor Summary
Constructors Constructor Description Track(String id)
Creates a trackTrack(String id, String url)
Creates a trackTrack(String id, IModel<?> model)
Creates a trackTrack(String id, IModel<?> model, String url)
Creates a trackTrack(String id, IModel<?> model, ResourceReference resourceReference)
Creates a trackTrack(String id, IModel<?> model, ResourceReference resourceReference, PageParameters pageParameters)
Creates a trackTrack(String id, ResourceReference resourceReference)
Creates a trackTrack(String id, ResourceReference resourceReference, PageParameters pageParameters)
Creates a track
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Track.Kind
getKind()
Gets the kind of the track belongs to the media componentString
getLabel()
The label for this trackPageParameters
getPageParameters()
Gets the page parameter applied to the URL of the trackLocale
getSrclang()
Gets the src langboolean
isDefaultTrack()
If the track is the default trackprotected void
onComponentTag(ComponentTag tag)
Processes the component tag.void
setDefaultTrack(Boolean defaultTrack)
Sets if this track is the default trackvoid
setKind(Track.Kind kind)
Sets the kind of the track belongs to the media component
SUBTITLES: Transcription or translation of the dialogue, suitable for when the sound is available but not understood (e.g.void
setLabel(String label)
Sets the label for this trackvoid
setPageParameters(PageParameters pageParameters)
Sets the page parameter applied to the URL of the trackvoid
setSrclang(Locale srclang)
Sets the src lang-
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainer
getWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
-
Methods inherited from class org.apache.wicket.MarkupContainer
add, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, dequeuePreamble, findChildComponent, findComponentToDequeue, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, getRegionMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onComponentTagBody, onDetach, onInitialize, onRender, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, stream, streamChildren, toString, toString, visitChildren, visitChildren
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, beforeRender, canCallListener, canCallListenerAfterExpiry, 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, getMarkupTag, 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, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isInitialized, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onBeforeRender, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderPart, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlForListener, urlForListener, visitParents, visitParents, warn, wrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Track
public Track(String id, IModel<?> model)
Creates a track- Parameters:
id
- the component idmodel
- the internally used model
-
Track
public Track(String id, ResourceReference resourceReference)
Creates a track- Parameters:
id
- the component idresourceReference
- the resource reference to provide track information - like .vtt
-
Track
public Track(String id, IModel<?> model, ResourceReference resourceReference)
Creates a track- Parameters:
id
- the component idmodel
- the internally used modelresourceReference
- the resource reference to provide track information - like .vtt
-
Track
public Track(String id, ResourceReference resourceReference, PageParameters pageParameters)
Creates a track- Parameters:
id
- the component idresourceReference
- the resource reference to provide track information - like .vttpageParameters
- the page parameters applied to the track URL
-
Track
public Track(String id, IModel<?> model, ResourceReference resourceReference, PageParameters pageParameters)
Creates a track- Parameters:
id
- the component idmodel
- the internally used modelresourceReference
- the resource reference to provide track information - like .vttpageParameters
- the page parameters applied to the track URL
-
Track
public Track(String id, String url)
Creates a track- Parameters:
id
- the component idurl
- an external URL to provide the track information
-
-
Method Detail
-
onComponentTag
protected void onComponentTag(ComponentTag tag)
Description copied from class:Component
Processes the component tag. Overrides of this method most likely should call the super implementation.- Overrides:
onComponentTag
in classComponent
- Parameters:
tag
- Tag to modify
-
getKind
public Track.Kind getKind()
Gets the kind of the track belongs to the media component- Returns:
- the kind
- See Also:
setKind(Kind)
-
setKind
public void setKind(Track.Kind kind)
Sets the kind of the track belongs to the media component
SUBTITLES: Transcription or translation of the dialogue, suitable for when the sound is available but not understood (e.g. because the user does not understand the language of the media resource's soundtrack). Displayed over the video.
CAPTIONS: Transcription or translation of the dialogue, sound effects, relevant musical cues, and other relevant audio information, suitable for when the soundtrack is unavailable (e.g. because it is muted or because the user is deaf). Displayed over the video; labeled as appropriate for the hard-of-hearing.
DESCRIPTIONS: Textual descriptions of the video component of the media resource, intended for audio synthesis when the visual component is unavailable (e.g. because the user is interacting with the application without a screen while driving, or because the user is blind). Synthesized as separate audio track.
CHAPTERS: Chapter titles, intended to be used for navigating the media resource. Displayed as an interactive list in the user agent's interface.
METADATA: Tracks intended for use from script. Not displayed by the user agent.
- Parameters:
kind
- the kind
-
setLabel
public void setLabel(String label)
Sets the label for this track- Parameters:
label
- the label to be set
-
isDefaultTrack
public boolean isDefaultTrack()
If the track is the default track- Returns:
- if the track is the default track
-
setDefaultTrack
public void setDefaultTrack(Boolean defaultTrack)
Sets if this track is the default track- Parameters:
defaultTrack
- if the track is the default track
-
getSrclang
public Locale getSrclang()
Gets the src lang- Returns:
- the src lang
-
setSrclang
public void setSrclang(Locale srclang)
Sets the src lang- Parameters:
srclang
- the src lang to set
-
getPageParameters
public PageParameters getPageParameters()
Gets the page parameter applied to the URL of the track- Returns:
- the page parameter applied to the URL of the track
-
setPageParameters
public void setPageParameters(PageParameters pageParameters)
Sets the page parameter applied to the URL of the track- Parameters:
pageParameters
- the page parameter which are going to be applied to the URL of the track
-
-