File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 160
160
line-height : 6px ;
161
161
}
162
162
163
- .shaka-overflow-quality-mark {
163
+ .shaka-overflow-quality-mark ,
164
+ .shaka-overflow-playback-rate-mark {
164
165
background : @quality-mark-hightlight-color ;
165
166
color : @quality-mark-color ;
166
167
border-radius : 2px ;
167
168
font-family : @general-font-family ;
168
169
font-size : 10px ;
169
170
font-weight : bold ;
171
+ line-height : 10px ;
170
172
text-shadow : none ;
171
173
padding : 1px ;
172
174
position : absolute ;
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ shaka.ui.PlaybackRateSelection = class extends shaka.ui.SettingsMenu {
34
34
this . menu . classList . add ( 'shaka-playback-rates' ) ;
35
35
this . button . classList . add ( 'shaka-tooltip-status' ) ;
36
36
37
+ if ( ! Array . from ( parent . classList ) . includes ( 'shaka-overflow-menu' ) ) {
38
+ this . playbackRateMark = shaka . util . Dom . createHTMLElement ( 'span' ) ;
39
+ this . playbackRateMark . classList . add ( 'shaka-overflow-playback-rate-mark' ) ;
40
+ this . button . appendChild ( this . playbackRateMark ) ;
41
+ }
42
+
37
43
this . eventManager . listen (
38
44
this . localization , shaka . ui . Localization . LOCALE_UPDATED , ( ) => {
39
45
this . updateLocalizedStrings_ ( ) ;
@@ -105,6 +111,9 @@ shaka.ui.PlaybackRateSelection = class extends shaka.ui.SettingsMenu {
105
111
// in the format of '1x', '1.5x', etc.
106
112
this . currentSelection . textContent = rate + 'x' ;
107
113
this . button . setAttribute ( 'shaka-status' , rate + 'x' ) ;
114
+ if ( this . playbackRateMark ) {
115
+ this . playbackRateMark . textContent = rate + 'x' ;
116
+ }
108
117
}
109
118
110
119
/** @private */
Original file line number Diff line number Diff line change @@ -49,12 +49,16 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
49
49
this . qualityMark . classList . add ( 'shaka-current-quality-mark' ) ;
50
50
this . qualityMark . style . display = 'none' ;
51
51
52
- if ( this . parent . parentElement ) {
52
+ if ( ! Array . from ( parent . classList ) . includes ( 'shaka-overflow-menu' ) ) {
53
+ this . overflowQualityMark = shaka . util . Dom . createHTMLElement ( 'span' ) ;
54
+ this . overflowQualityMark . classList . add (
55
+ 'shaka-overflow-playback-rate-mark' ) ;
56
+ this . button . appendChild ( this . overflowQualityMark ) ;
57
+ } else if ( this . parent . parentElement ) {
53
58
const parentElement =
54
59
shaka . util . Dom . asHTMLElement ( this . parent . parentElement ) ;
55
60
this . overflowQualityMark = shaka . util . Dom . getElementByClassNameIfItExists (
56
- 'shaka-overflow-quality-mark' , parentElement ,
57
- ) ;
61
+ 'shaka-overflow-quality-mark' , parentElement ) ;
58
62
}
59
63
60
64
const spanWrapper = shaka . util . Dom . createHTMLElement ( 'span' ) ;
You can’t perform that action at this time.
0 commit comments