Class Track

    • Constructor Detail

      • Track

        public Track​(String id)
        Creates a track
        Parameters:
        id - the component id
      • Track

        public Track​(String id,
                     IModel<?> model)
        Creates a track
        Parameters:
        id - the component id
        model - the internally used model
      • Track

        public Track​(String id,
                     ResourceReference resourceReference)
        Creates a track
        Parameters:
        id - the component id
        resourceReference - 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 id
        model - the internally used model
        resourceReference - 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 id
        resourceReference - the resource reference to provide track information - like .vtt
        pageParameters - 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 id
        model - the internally used model
        resourceReference - the resource reference to provide track information - like .vtt
        pageParameters - the page parameters applied to the track URL
      • Track

        public Track​(String id,
                     String url)
        Creates a track
        Parameters:
        id - the component id
        url - an external URL to provide the track information
      • Track

        public Track​(String id,
                     IModel<?> model,
                     String url)
        Creates a track
        Parameters:
        id - the component id
        model - the internally used model
        url - 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 class Component
        Parameters:
        tag - Tag to modify
      • 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
      • getLabel

        public String getLabel()
        The label for this track
        Returns:
        the label
      • 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