Class s7sdk.video.AudioCaptions
The AudioCaptions
is a composite user interface component that combines the audio captions button with audio captions menu.
The component can be added to ControlBar
and grouped with other video UI components.
Currently this component does not support any modifiers.
Defining Appearance using CSS
You can define the appearance of the AudioCaptions
component using CSS rules. All Adobe Experience Viewers HTML5 SDK components use class selectors for styling. You can style the body of the AudioCaptions
component by using
the .s7audiocaptions
class selector. The styles that are associated with this class selector are applied to all instances of the AudioCaptions
component. You can style particular instances by prefixing
the class rule with the instance #id. For example, styling rules for #myComp.s7audiocaptions
are applied only to the particular AudioCaptions
instance.
The styling of the sub-elements using class selectors, like .s7audiocaptionsbutton
for example, must be specified in the form of the descendant class selectors. That is,
they must follow the main class selector separated by a space, such as .s7audiocaptions .s7audiocaptionsbutton
.
For more information on component styling see the Adobe Experience Viewers HTML5 SDK User Guide and the default styles section.
CSS Class | Attribute Selector | Description |
.s7audiocaptions | (None) | Define appearance of AudioCaptions container. |
.s7audiocaptionsbutton | (None) | Define appearance of audio caption button component |
.s7audiocaptionsmenu | (None) | Define appearance of audio caption menu |
Localizable Symbols
AudioCaptions
also has a text symbol that you can localize either in a preset or in the viewer page though the mechanisms
provided by the ParameterManager
. For more information on localization consult the ParameterManager
API documentation and Adobe Experience Viewers HTML5 SDK User Guide.
Symbol | Description |
AudioCaption.OFF | Defines a localized text for "off" item in subtitle list |
Constructor Attributes | Constructor Name and Description |
---|---|
s7sdk.video.AudioCaptions(container, settings, compId)
|
Method Attributes | Method Name and Description |
---|---|
dispose()
Dispose is used to remove itself and all sub-elements from the DOM
|
|
Gets all tracks
|
|
hideMenu()
Used to hide menu
|
|
setTracks(audioTracks, textTracks)
Sets audio and subtitle tracks
|
|
Used to toggle menu
|
Default styles for AudioCaptionsMenu:
.s7audiocaptions {
position:absolute;
width:28px;
height:28px;
top:4px;
-webkit-touch-callout:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
-webkit-tap-highlight-color:rgba(0,0,0,0);
}
.s7audiocaptions .s7audiocaptionsbutton {
position:absolute;
width:100%;
height:100%;
display:block;
}
.s7audiocaptions .s7audiocaptionsmenu {
position:absolute;
bottom:30px;
right:0;
}
- Parameters:
- {String|Container} container
- The reference to
Container
instance,ControlBar
instance or the ID of the parent DOM element to which the component is added as a child - {s7sdk.ParameterManager} settings
- A parameter manager instance that represents the desired configuration.
- {String} compId
- An optional parameter that specifies the ID of the component DOM element.
- Parameters:
- {Array} audioTracks
- List of audio tracks
- {Array} textTracks
- List of text tracks