Constructor
(export) new OverflowMenu(parentnon-null, controlsnon-null)
Parameters:
Name | Type | Description |
---|---|---|
parent |
HTMLElement | |
controls |
shaka.ui.Controls |
- Extends:
- Source:
Extends
Classes
Members
(private, non-null) ariaLabels_ :Map.<HTMLElement, string>
Type:
- Map.<HTMLElement, string>
- Source:
(private) backFromCaptionsButton_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) backFromCaptionsSpan_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) backFromLanguageButton_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) backFromLanguageSpan_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) backFromResolutionButton_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) backFromResolutionSpan_ :HTMLElement
Type:
- HTMLElement
- Source:
(private, non-null) backToOverflowMenuButtons_ :NodeList.<!Element>
Type:
- NodeList.<!Element>
- Source:
(private) castCurrentSelectionSpan_ :HTMLElement
Type:
- HTMLElement
- Source:
(private, non-null) controlsContainer_ :HTMLElement
Type:
- HTMLElement
- Source:
(private) currentAudioLanguage_ :HTMLElement
Type:
- HTMLElement
- Source:
(private, non-null) elementNamesToFunctions_ :Map.<string, !function()>
Type:
- Map.<string, !function()>
- Source:
(private, non-null) overflowMenu_ :HTMLElement
Type:
- HTMLElement
- Source:
(protected, non-null) parent :HTMLElement
Type:
- HTMLElement
- Overrides:
- Source:
(private, non-null) textContentToLocalize_ :Map.<HTMLElement, string>
Type:
- Map.<HTMLElement, string>
- Source:
Methods
(private) addAudioLangMenu_()
- Source:
(private) addCaptionButton_()
- Source:
(private) addCastButton_()
- Source:
(private) addLanguagesButton_()
- Source:
(private) addOverflowMenu_()
- Source:
(private) addOverflowMenuButton_()
- Source:
(private) addPipButton_()
- Source:
(private) addResolutionButton_()
- Source:
(private) addResolutionMenu_()
- Source:
(private) addTextLangMenu_()
- Source:
(private) chosenIcon_() → (non-null) {Element}
- Source:
Returns:
- Type
- Element
(private) focusOnTheChosenItem_(menu)
Parameters:
Name | Type | Description |
---|---|---|
menu |
HTMLElement |
- Source:
(private) getLanguageName_(locale) → {string}
Returns the language's name for itself in its own script (autoglottonym),
if we have it.
If the locale, including region, can be mapped to a name, we return a very
specific name including the region. For example, "de-AT" would map to
"Deutsch (Österreich)" or Austrian German.
If only the language part of the locale is in our map, we append the locale
itself for specificity. For example, "ar-EG" (Egyptian Arabic) would map
to "ﺎﻠﻋﺮﺒﻳﺓ (ar-EG)". In this way, multiple versions of Arabic whose
regions are not in our map would not all look the same in the language
list, but could be distinguished by their locale.
Finally, if language part of the locale is not in our map, we label it
"unknown", as translated to the UI locale, and we append the locale itself
for specificity. For example, "sjn" would map to "Unknown (sjn)". In this
way, multiple unrecognized languages would not all look the same in the
language list, but could be distinguished by their locale.
Parameters:
Name | Type | Description |
---|---|---|
locale |
string |
- Source:
Returns:
The language's name for itself in its own script, or as
close as we can get with the information we have.
- Type
- string
(private) initOptionalElementsToNull_()
- Source:
(private) onAudioLanguageSelected_(language)
Parameters:
Name | Type | Description |
---|---|---|
language |
string |
- Source:
(private) onCaptionClick_()
- Source:
(private) onCaptionStateChange_()
- Source:
(async, private) onCastClick_()
- Source:
(private) onCastStatusChange_(e)
Parameters:
Name | Type | Description |
---|---|---|
e |
Event |
- Source:
(private) onEnterPictureInPicture_()
- Source:
(private) onLanguagesClick_()
- Source:
(private) onLeavePictureInPicture_()
- Source:
(private) onOverflowMenuButtonClick_()
- Source:
(async, private) onPipClick_() → (non-null) {Promise}
- Source:
Returns:
- Type
- Promise
(private) onResolutionClick_()
- Source:
(async, private) onTextLanguageSelected_(language) → (non-null) {Promise}
Parameters:
Name | Type | Description |
---|---|---|
language |
string |
- Source:
Returns:
- Type
- Promise
(private) onTracksChange_()
- Source:
(private) onTrackSelected_(tracknon-null)
Parameters:
Name | Type | Description |
---|---|---|
track |
shaka.extern.Track |
- Source:
(private) onVariantChange_()
- Source:
resolveSpecialLanguageCode_(lang) → {string}
Resolve a special language code to a name/description enum.
Parameters:
Name | Type | Description |
---|---|---|
lang |
string |
- Source:
Returns:
- Type
- string
(private) setCurrentCastSelection_()
- Source:
(private) updateAudioLanguages_()
- Source:
(private) updateLanguages_(tracksnon-null, langMenunon-null, languagesnon-null, onLanguageSelected, updateChosen, currentSelectionElementnon-null)
Parameters:
Name | Type | Description |
---|---|---|
tracks |
Array.<shaka.extern.Track> | |
langMenu |
HTMLElement | |
languages |
Array.<string> | |
onLanguageSelected |
function(string) | |
updateChosen |
boolean | |
currentSelectionElement |
HTMLElement |
- Source:
(private) updateLocalizedStrings_()
- Source:
(private) updateResolutionSelection_()
- Source:
(private) updateTextLanguages_()
- Source: