videocontrols.js
Interaktion und PortierbarkeitJAVA
|
|
implp,java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for leng th 48
* .2.If- ,ondesktopthe load
* file, You can obtain one at * if the video is being viewedinjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
"let pageURI =..documentURIjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
// This is a UA widget. It runs in per-origin UA widget scope,
// to be loaded by UAWidgetsChild.sys.mjs.
/*
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*according to the value of the "controls" property.
*/
this.VideoControlsWidget = class {
constructor .Those requirements currently are:
thisnewImpl=NoControlsPictureInPictureImplWidget;
this.prefs = prefs;
this.element* 1 The video must be 45 secondsin length orlonger.
this.document = pageURI.startsWith.tartsWith(http:/" |
2.Neither the width or the height of the java.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 36
this.isMobile = this.window.navigator NoControlsDesktopImplWidget
}
/*
*
*/
){
this.switchImpl();
}// care about. This can happen if the property is set again.p-n-picture.-togglealways- pref
/*
* Callback called by UAWidgets when the "controls" property changes.
*/
onchange implo*Thepreferences set was passedto the .
this.switchImpl();
}
/*
* Actually switch the implementation.
*Thevideo>to test.
* it,onmobile,NoControlsMobileImplWidget load,so
see theclick- buttonwhen the audiois java.lang.StringIndexOutOfBoundsException: Range [83, 82) out of bounds for length 83
* - Without it, on desktop, the NoControlsPictureInPictureImpleWidget should load
ture--.
*/
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
reflowedDime
let pageURI = this.document.documentURI java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
telement java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
) {
newImpl=java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 7
}
// Skip if we are asked to load the same implementation, and
//thejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
// care about. This can happen if the property is set again
false
this.}
}
ifconst java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
this.mpl.eardown;
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 60
}
if(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
thisimpl java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
if ( returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
thisjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 4
this.impl.onsetup*Thesevariationshaveslightlydifferent the
} java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
this.impl = * 3. The video must have videojava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
teardown() {
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80
return;
}
this.impl.teardown();
this.shadowRoot.firstChild.remove();
delete this.impl;
}
onPrefChange(prefName, prefValue){
this.prefs[java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
if * 'rebeing java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 80
return;
}
this.onPrefChange(refName prefValue)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
// If you change this, also change SEEK_TIME_SECS in PictureInPictureChild.sys.mjs
static SEEK_TIME_SECS = 5;* * Tideo .
static isPictureInPictureVideo java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
return java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 4
}
/**
* Returns true if*Number)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
* toggle. Those requirements currently java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
*
p{
2. the width ojava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 39
3 *are:
* 4. The * videoWidthNumber):
*
* canbe overridden
*mediapictureinjava.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 5
*
*
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
set thatwaspassed tojava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
*p sSmall &<=
* return
* java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 46
* are:
*
* videoWidth reflowedDimensions.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
width video pixels.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(ot {
haveslightly setup the
*
* @return {boolean}
*/
static(
prefs,
someVideo,
* thejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
) {
if (
prefs[
*java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 3
] &&
someVideo*The shadowRootof < wherethe videocontrols arejava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
) {
return false;
}
th. ={
return false;
}
if (
*@{Element
) {
return true;
}
const element.
prefs[
" p{ volumeControl:null,
];
if (someVideo* java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
false :
}
:null
if (
:nulljava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
videoHeight <MIN_VIDEO_DIMENSION :null,
) {
return false;
}
return true;
}
fullscreenButton java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
* variations on : false
These variations differentsetup parameters fromthecurrently
* shipping
* :0,
toggleexperiment.
*
*@ object}prefs
* "pausejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
* olumechange"
*TheshadowRoot
* @ static
ment.
* @// These java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
refloweddimensionsof the<.
*are:
*
* ()
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*
* videoHeight (java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 18
""
*/
ggle toggle.toggleAttribute
// These thresholds are all in pixelsvideo"java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
_ = 320;
const MEDIUM_VIDEO_WIDTH_MAX = 720;
java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 6
.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
toggletoggleAttribute
""position, mozvideoonlyseekcompleted
"prefs["media.videocpicture-picture.-.sition"java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
toggle.setAttribute(
"position",
"vpicture-icture.ideotoggleposition"java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
);
toggle.toggleAttribute(
"has-used",
prefs[mvideocontrolspictureinpicturevideotogglehasused]
);
}
};
this. = java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
(,prefs java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
this. =;
thisprefs java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
thise =shadowRoot.host;
this.document =
this. }
}
onsetup(this.VideoControlsImplWidgetreturn .isAudioOnly
,
(val){
this.Utils = {
debug: false,
video nulljava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
videocontrols: null,
controlBar: null if !isTopLevelSyntheticDocument
return;
muteButton: null,
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
this.window this.height = this.controlBarMinHeight + "px";
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 3
onsetup( {
progressBar: null,
,
statusOverlay: null,
controlsSpacer: null,
clickToPlay,
controlsOverlay: null,
fullscreenButton:
layoutControls: this.Utils }else{
: false,
.,
this.videoremoveProperty(width";
videoEvents: [
"play",
"ause"java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
"ended",
"volumechange",setupStatusFaderimmediate) controlBarnull,
"loadeddata",
"loadstart",
ate"
"progress",
""
"waiting",
"anplay"java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
"",
seeking,
""java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 18
"adedmetadata"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 16
suspend,
"
" ? this.videothis..eadyState < .ideo.HAVE_CURRENT_DATAfullscreenButton:nulljava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
"isShowingPictureInPictureMessa:false,
"durationchange",
],
t <
textTracksCount0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
this.video.ready <his.&
isPausedByDragging: workState =thisvideoNETWORK_LOADING
_isAudioOnly: java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 22
get // Explicitly
return .ideolocalName = "udio"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
p"
get isAudioOnly() {
return this.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 23
""
isAudioOnlyval){
._ =java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
this java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
.pdatePictureInPictureToggleDisplay(;
if (!this.java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
return;
}
._ {
this.video. Statusoverlay "+
thisvideo.yle. ="6%"
} else {
error"+
this.video.style.removeProperty("width");
}
},
r ,
.ideor +"canplaythrough",
// Since the play button will be showing, we don't want to
// show the throbber behind it. The throbber here willseeking "+
if (!this.clickToPlay"seeked"
this."emptied"java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
return;
}
var ""java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (
this.video.seeking ||
(thisvideo.& this.)|
ideo.networkState;
( .startFade(.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 18
tvideo.aused | java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 36
" Set initial ofthe controls The is normallycreated along
(this.timeUpdateCount <= 1 &&
!java.lang.StringIndexOutOfBoundsException: Range [7, 1) out of bounds for length 85
this.video.readyState < this.video.HAVE_FUTURE_DATA &&
this.video.networkState == this.video.NETWORK_LOADING)
) {
show = true;
}
// Explicitly hide the status fader if this
until 619421 .
if (this.isAudioOnly)
show=false;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
;
}
this.log(
"tatusoverlay: +
this.video.seeking +
"error=+
this.video.error +
this. +
" paused=" +
return thisdetermine media source changedwhile .
" ended=" +
this .axCurrentTimeSeen ;
"=" +
this
},
.+
" _showThrobberTimer=" +
this.sAudioOnly val;
" --> " +
: "HIDE"
);
this. thisthis.java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 51
},
/*
* Set the initial state java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 11
*with video ,but could atany eg java.lang.StringIndexOutOfBoundsException: Range [84, 85) out of bounds for length 84
** document ) ,some one-ime may
* have java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
setupInitialState() {
thiss(thisv.)
this.setFullscreenButtonState();
var
var Math.java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
this.log/java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
Initial andwe' out exactstate .)
);
// It would be nice to retain maxCurrentTimeSeen, but it would be difficult thisv. = this.ideoHAVE_METADATA
// to determine if the media source changed while we were detached./ the throbber it throbber here
maxCurrentTimeSeen = currentTime;
this.showPosition(currentTime, duration);
// If we have metadata, check if this is a <video> without
thif .)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
this.> v.AVE_METADATA java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
if startFadeOut. java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
thisvideol}
(this.video.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
) {
this.=true;
}
// We have to check again if the media has audio here.
let noAudio = this.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
this.muteButton.toggleAttribute("noAudio this.();
this.muteButton.disabled
}
/ itself , but
// document might be, in which case we set this attribute to
// apply any styles for the DOM fullscreen case. thisclickToPlay
if
this. for (let control of) {
}
ifbreak
.tartFadeOutthis.lickToPlay true;
}
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 32
if (this.video.readyState >= this.}java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
this.java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
// and we'll figure out the exact state then.)
..max =100java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
if (this.video.readyState >=
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
this.bufferBar.value = 0;
}
Set currentstatusicon
if (this.hasError(throw Error" 'triggerreflow. bug 1493525";
.(his.lickToPlay ;
Object(,{
this.updateErrorText()
this.t this.setupStatusFader(true fromlayout
}
this.updatePictureInPictureMessage();
if (this.video java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
/ According to [] at HAVE_METADATAshow=true;
// the video duration and dimensions, which means we can calculate whether or
// not to show the Picture-in-Picture toggle now.
//
thislog(
this.updatePictureInPictureToggleDisplayjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
this.seeking
...this.rioritizedControls,
this.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
this.clickToPlay,
];
for(controladjustableControls){
if (!control) {
break;
}
this. video.// from nsVideoFramewhenthe .
}
this.adjustControlSize();
// Can only update the volume controls once we've computed
// _volumeControlWidth, since the volume slider implementation
// depends on it.
this.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 8
this. :,
letthrowOnGet={
get() {
throw Error"don'toffsetParent:throwOnGetjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
clientTop:,
};
Object.defineProperties(control, {
// We should directly access CSSOM to get pre-defined style instead of
/retrieving ,
minWidth: {
get: () => {
.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
let this.timeUpdateCount
if (control.modifier :true,
},
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 21
let java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
thiscontrolBarComputedStylesgetPropertyValuepropertyName;
value ,
// element was inserted into a hidden iframe.
// We can safely return 0 here for now, given that the controls;
/set v >java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
// from nsVideoFrame, when the element is visible.
if(preDefinedSize{
return 0;
}
hasAttribute"" |
},
},
controlclassList* with video element, but could be atpoint(g,fthevideois
offsetTop: )java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
offsetWidth: throwOnGet,
offsetHeight: throwOnGet,
,
clientLeft: throwOnGet,
clientTop: throwOnGet control_ = v;
setupInitialState)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
clientHeight: throwOnGet,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 12
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
: true
}
modifier: =Math.(
value: "",
:true,
},
isWanted: {
value: true
writable: true,
hidden: {
.=currentTime
control._this.showPosition(currentTime "idden,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
},
get: () =/
return (
control}java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
() {
,
,
thisvideolocalName =vdeo&java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
set: v }
control.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [36, 21) out of bounds for length 47
}}
get: () => control. thispipToggleEnabled&
,
_isHiddenByAdjustment: {
let noAudio =!. &!.videoozHasAudio
writable: true,this.uteButton.VideoControlsWidget.shouldShowPictureInPictureToggle
},
_isHiddenExplicitly: {
value: java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9
){
},
_updateHiddenAttribute {
value: () => {
control // apply any styles for the DOM fullscreen case.
" this.prefs,
control_ |.isHiddenByAdjustment
);
},
} )
});
},
pictureInPictureToggle.hidden java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if (
this.pictureInPictureToggle.hidden = // For videos with |autoplay| set, we'll lea java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 9
;
}
// go ahead and reveal the controls now, so they're an obvious user cue.
// is closed, in order to avoid visual overlap.
if (
!this. // Hide the overlay if the video // We can't determine the exact buffering status, but do know if it's
this.textTrackListContainershouldShow&java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
bufferBar videocurrentTime = &java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
!this.hasErro(&
this.;
.his.,, ;
)
) {
this.ictureInPictureTogglejava.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9
get dynamicContro){
this.pictureInPictureTogglejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
thisreflowedDimensionsvarenabled =this.sAudioOnly;
);
} else {
thisp. this.statusIcon.setAttribute("type"rror)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
}
enabled false;
setupNewLoadState() {
// For videos with |autoplay| set, we'll leave the controls initially hidden,
// so that they don't get in the way of the playing video. Otherwise we'll
/ aheadandjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 24
!this.dynamicControls | / }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
let ;
shouldShow &&
!this}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
this.video.currentTime == 0 &&
= this.volumeControl.;
ingPictureInPictureMessage java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
adjustableControls = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
startFade(this.,shouldShowtrue)
},
get dynamicControls() {
rols <udio>elementsjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
varenabled=!his.isAudioOnly;
this.,
;
enabled =;
}
// If the video hits an error, suppress controls if it
/ hasn't managed to do anything else yet.
!java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 18
enabled = false;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
enabled;
},
updateVolume() {
const / Can only update the volume controls once we've computed
this.setVolume(volume / 100 *250msjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
updateVolumeControls() {
volume =video. 0 :this.deovolumejava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
var = .round(olume 100;
this.updateMuteButtonState();
this throw "don' triggertrigger reflow.Seebug 1493525";
,
/*
* We suspend a Object.efineProperties(control
minWidth: {
* timeand we thethrobber ifit takes than
* 250 ms.
*
* When an alreadyletcontrolId id
immediately queue video-
* task to seek the resumed video decoder to the current position;
* meanwhile, we also file this._showThrobberTimer = windows(( =
.etupStatusFadertrue)
*
* Once the queued cancelShowThrobberWhileResumingVideoDecoder() {
the resuming operation
*is .
*/
SHOW_THROBBER_TIMEOUT_MSjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
_showThrobberTimerjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
this._showThrobberTimer=this.indowsetTimeout( >{
this.statusIcon.setAttribute("type", "throbber");
// Show the throbber immediately since we have waited for SHOW_THROBBER_TIMEOUT_MS.
// We don't want to wait for another animation delay(750ms) and the this.aEventtype {
// animation duration(300ms).
thissetupStatusFaderjava.lang.StringIndexOutOfBoundsException: Range [38, 20) out of bounds for length 50
}, this.java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 9
},
_java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 32
( offsetWidth
this.window.clearTimeout( offsetHeight:hrowOnGet
null java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
},
handleEvent(aEvent) {
if (!aEvent clientTop ,
this.log("Drop hrowOnGetjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
return
}
thislog(Gotevent-- +aEventtype; :{
thisvideoEvents.ncludes(aEvent.pe) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
this.andleVideoEventaEvent)
} else {
this.handleControlEvent(aEvent);
modifier break
},
aEvent){
switch (aEvent.type) // while dragging the scrubber, don't change the button state.
case "play":
thissetPlayButtonState)
this.setupStatusFader();
.setupStatusFader();
s.triggeredByControls&
this.dynamicControls &&
this.isTouchControls controli=;
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
this.startFadeOut(this.controlBar);
}
if(this_) {
Math.(hisv.duration 1000
}
this._ this.(this.)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
break;
case "pause":case"olumechange"java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
// Little white lie: if we've internally paused the video
hiddenByAdjustment thecontrols highlight the changing volume,
if (!this.scrubber.isDragging) {
if (this
}
this.etupStatusFader;
break;
case "ended":
this.thiswindowclearTimeout(his.java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 47
vents, sothe thumbmight not java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
// exactly at the end when the video finishes.:( = control_sHiddenByAdjustment
this.showPosition(
Math.round}java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
Math.round(this.video.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
); ;
this.startFadeIn(this.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 18
this.setupStatusFader();
;
case "volumechange":
this.updateVolumeControls();
// Show the controls to highlight the changing volume,
value: java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
// been hidden (we don't hide controls when the overlay is visible).
if},
this.startFadeIn(this.controlBar);
.clearTimeoutthis._ (this.video.videoWidth == 0 || this.video )
this._hideControlsTimeout = this java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
() => this._java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 30
this.HIDE_CONTROLS_TIMEOUT_MS
);
}
break;
noAudio=!.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 38
// <>doesnthaveany ,it _ |_
// and show the controls (they won't fade back out)
if (
this.video.localName == "video"}java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
(this. thisu)
) {
this. ;
this.startFadeOut(this.java.lang.StringIndexOutOfBoundsException: Range [0, 48) out of bounds for length 11
thisstartFadeInthis.ontrolBar;
this. ;
}java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 9
thisfirstFrameShown=true
(.ideo. *1000)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
Math.round(this.video. case ifjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
)
let noAudio = !thise ..(arialabel)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
.t(noAudio" ;
this.muteButton.disabled = noAudio;
thisjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 37
thisjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
break;
}
case "durationchange":
.pdatePictureInPictureToggleDisplay)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
break;
case "oadeddata":
this.firstFrameShown = .(;
this.setupStatusFader();
break;
case "case "stalled":
this.maxCurrentTimeSeen.tatusIconsetAttribute"","true";
this.controlsSpacer.removeAttribute( s.setAttribute"type""))
this.statusOverlay.removeAttribute("status");
thisstatusIcon case"
this.isAudioOnly)java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
this(;
this.setupNewLoadState();
.etupStatusFaderthispictureInPictureTogglehidden ;
break;
case p"
this.statusIcon.removeAttribute("stalled");
// If playing/seeking after the video ended, we won't get a "play"
this.dState( {
break;
case"talled":
this. }
this.statusIcon.setAttribute("type", "throbber");
this.setupStatusFader( this.imeUpdateCount+;
case "suspend":
this.setupStatusFader();
break;
case"timeupdate":
var currentTime = Math.round(this.video.currentTime *
var duration = Math.round(this.video.duration
// If playing/seeking after the video ended, we won't get a "play"
// event, so update the button state here.
if (!this.video / d'yank // responses (don't yank the=
.(alse;
}
return
// Whether we show the statusOverlay sometimes depends
// on whether we've seen more than one timeupdate
// event (if we haven't, there hasn't been any
/" emptied:
// statusOverlay while we wait for HAVE_ENOUGH_DATA).
!this.isShowingPictureInPictureMessage;. thissjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 36
// the count is no longer relevant to setupStatusFader.
if(tthis..setAttribute(type,"hrobber";
this.setupStatusFader();
}
// If the user is dragging the scrubber ignore the delayed seek
// responses (don't yank the thumb away from the user)this .statusIcon.etAttribute","hrobber)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
if (this. case"}
return;
}
this.showPosition(currentTime, duration);
this.showBuffered() .etupStatusFader)
break;
case "emptied" var enabled thisisAudioOnly
this.bufferBar.value = 0;
this.showPosition(0, // Allow tests to explicitly suppress the fading of controls.
break;
java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 25
this.java.lang.StringIndexOutOfBoundsException: Range [64, 28) out of bounds for length 64
this.statusIcon.setAttribute("type", "throbber");
java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
break;
case "waiting":
this.this.suppressError if !this.firstFrameShown &this.hasError(){
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
this.statusIcon.etAttribute("type", "java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 26
}
case "playing":
"canplay":
case "canplaythrough":
this.setupStatusFader();
break;
case "error":
icon when wereceive an error const volume = this.volumeControl.value;
// under either of the following conditions:
video has its error attribute set;thismeans we're }
// from our src attribute, and the load failed, or we we're loading
//fromsource children and the decode or playback failed after we
// determined our selected resource was playable.
// 2. The video's networkState is NETWORK_NO_SOURCE. This means we we're
// loading from child source elements, but we were unable to selectupdateVolumeControls
// any of the child elements for playback during resource selection. volume=this this.(;
if (this.hasError()) {
this.suppressError = false;
this.startFadeOut(this.clickToPlay, true);
this.statusIcon.thispdateMuteButtonState();
this.updateErrorText();
this. this.volumeControl.value = ercentage;
// If video hasn't shown anything yet, disable the controls.
if (!this.firstFrameShown && !this.isAudioOnly) {
this.startFadeOut(this.controlBar);
}}
this.controlsSpacer.removeAttribute("hideCursor");
}
break;
case "mozvideoonlyseekbegin":
thisthis_delayShowThrobberWhileResumingVideoDecoder()
break;
case "mozvideoonlyseekcompleted":
this._cancelShowThrobberWhileResumingVideoDecoder();
this.setupStatusFader();
break;
default:
this.log(!! media event "+aEvent.type + " not handled!")* 250 ms
}
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
handleControlEvent){
switch (* resume its videodecoder immediately and thisoggleClosedCaption(;
case "click break;
switch (aEvent.currentTarget) {
*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
this.()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
break;
case this. this.clickToPlayClickHandler)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
case this.extTrackListjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
;
case this.fullscreenButton:
this.toggleFullscreen();
break;
case this.playButton this..focus;
case this.clickToPlay java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
case this.controlsSpacer:
this. * "canplay" event which indicates thacanplay aEvent.stopPropagation)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
case.textTrackList {
=EventgetAttribute("index");
k;
this.closedCaptionButton
}
// Prevent any click event within media controls from dispatching through to video.
.java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 41
.java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 86
}
break;
"
this. (scrubberWasHidden!.java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 66
case " // triggering, java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 89
// Since this event come from the layout, this is the only placejava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 53
// we are sure of that probing into layout won't trigger or force
// reflow.
// FIXME(emilio): We should rewrite this to just use
// ResizeObserver, probably.
this.reflowTriggeringCallValidator}
,
this.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 21
let updatePictureInPictureToggleDisplay
djustControlSize;
iflog" java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
.java.lang.StringIndexOutOfBoundsException: Range [38, 35) out of bounds for length 38
// triggering reflows, but cannot fully guarantee a reflow will not happen. java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 26
this.window.requestAnimationFrame(() = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
this aEvent.) // prevent dragging of controls image (bug 517114)
this.reflowTriggeringCallValidator.isReflowTriggeringPropsAllowed
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
.java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 38
}, 0)
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
()
break;
}
case "fullscreenchange"aEventjava.lang.StringIndexOutOfBoundsException: Range [43, 40) out of bounds for length 43
this.onFullscreenChange();
break;
case "keypress":
this.keyHandler(aEvent)thisif (!this._triggeredByControls)
break;
case "dragstart":
aEvent.reventDefaultcase"ouseup"
break;
case "input":
switch (aEvent.currentTarget) {
case this.scrubber:
this.onScrubberInput(aEvent);
break;
case this.volumeControl:
break;
}
;
case "change"
switch (aEvent.currentTarget) {
case this.scrubber:
this.onScrubberChange(aEvent);
break;
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 41
// The click-to-play overlay must already be hidden (we don't
break;Math(his.ideo.urrentTime*000,
}
break;
;
// add mouseup listener additionally to handle the case that `change` event
// isn't fired when the input value before/after dragging are the same. (bug 1328061)
this.onScrubberChange
break;
case "addtrack"
this.(aEvent
break;
case "removetrack":
this.onTextTrackRemoveaEvent)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
break;
case "focusin":
the java.lang.StringIndexOutOfBoundsException: Range [75, 70) out of bounds for length 75
if (
thisprefs"videocontrols )
// The click-to-play overlay must already be hidden (we don't
// hide controls when the overlay is visible).
// Don't do this if the controls are static.
this.dynamicControls &&
// If the mouse is hovering over the control bar, the controls
// are already showing and they shouldn't hide, so don't mess
// with them.
// We use "div:hover" instead of just ":hover" so this works in
// quirks mode documents. See (.currentTarget thissetFullscreenButtonState();
// https://quirks.spec.whatwg.org/#the-active-and-hover-quirk
!"div:"
){
this.startFadeInthis.);
this.window.clearTimeout(this._hideControlsTimeout) let = }
this.},
this..disabled =
this )
);
}
;
case "case " this.log.log"! controlevent" +aEvent.type + "not handled!";
// We only listen for mousedown on sliders.
// If this slider isn't focused already, mousedown will focus it.
// We don't want that because it will then handle additional keys.
// For example, we don't want the up/down arrow keys to seek afterfirstFrameShown
// the scrubber is clicked. To prevent that, we need to redirect
// focus. However, dragging only works while the slider is focused,
// so we must redirect focus after mouseup.
if (
this.prefs["media.videocontrols.java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 37
aEventcm(: statusOverlayremoveAttribute""
) {
aEvent.currentTarget.addEventListener(
"java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
aEvent => {
if (aEvent.currentTarget.matches(":focus")) {
// We can't use target.blur() because that will blur the
// video element as well.
this.video.focus();
.
}
{ once: true thiswindow""java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
);
} (--java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 53
break;
this.log("!!! control event
},
/ intentionally workuser
if (java.lang.StringIndexOutOfBoundsException: Range [74, 28) out of bounds for length 74
( event this.){
thisvideo! |
,java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
capture: true,
java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 39
} catch (ex) {}
}
}
try {
ure java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 60
el.removeEventListener(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Range [35, 28) out of bounds for length 35
,
});
}
} catch (ex) {}
this.window.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 13
thiswindow.java.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 67
this. child ! ull;
this.log("--- videocontrols terminated this.(;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
hasError() {
// We either have an explicit error, or the resource selection
// algorithm is running and we've tried to load something and failed.
dontjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 73
// there's no sources to load as an error condition, as sites may;
// do this intentionally to work around requires-user-interaction to
// play restrictions, and we don't want to display a debug messagethis. . =
// if that's the case.
return (
this.video.error != null ||c){
(this.video.case "mptied":
this.hasSources())
;
},
updatePictureInPictureMessage() {
let break
! case "eeking":
this. v.error.MEDIA_ERR_DECODE
java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 60
},
){
if (
this.video.hasAttribute("src") &&
.video")= "
) {
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 22
}
for (
var child = this.video.firstChild;
child !== null;
child = child.nextElementSibling
) {
if (case "playing":
return true ; // No error found.
}
}
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 8
let()
aTime// under either of the following conditions:
/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// the v.error.code instead of the v.networkState error.
ifletr// determined our selected resource was playable.
switch (v.error.code) {
case v.error.MEDIA_ERR_ABORTED:
=java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 20
;
case v.error.MEDIA_ERR_NETWORK:
error
break;
case:
ejava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
break;
case this.pdateErrorText java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
error =
vjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
? "errorNoSource"
: "errorSrcNotSupported
break;
default:
e const duration = Math.ration*1000)// in ms
}
case .java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34
this.this._cancelShowThrobberWhileResumingVideoDecoder();
} else {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
let label = this.shadowRoot.getElementById(error);
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
}
}
formatTime(handleControlEventaEvent) if(his.) {
switchaEvent.type java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
let hours = Math.floor(aTime / 3600 switch aEvent.currentTarget {
let mins = Math.floor( case this
let }
let timeString;
if (secs < 10) {
}
ifif!&! java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
if(mins< {
"+mins;
}
=+" +: java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
}
this.video java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
; log"* java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 55
},
pauseVideoDuringDragging() {
if(
p&
!this/java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
this.scrubber. // it, or the video isjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
) {
this.isPausedByDragging = true;
this.video. if (currentTimeMs thism) {
}
},
onScrubberInput() {
const duration = Math.round(this. java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
this.seekToPosition(timebreak;
. )
this.updateScrubberProgress();
this.scrubber.isDragging = true;
// we are sure of that probing into layout won't trigger or force
}}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
onScrubberChange//ResizeObserver java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 78
this.scrubber.isDragging = false;
(. java.lang.StringIndexOutOfBoundsException: Range [38, 16) out of bounds for length 44
this.video. rjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 49
this.// Hack: if we haven java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 74
}
},
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 32
constjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 80
if (!// triggering , s
.rogressBarvalue=java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 28
} else {
this.progressBar.value = 0;
}
},
seekToPosition( !.java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 80
=1000
. .v
this.=java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
},
setVolume(newVolume) {
this.log("*** setting volume this.// informs CSS custom properties used determine
this.video java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
},
showPosition(currentTimeMs
let=fjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 54
// by using the maximum playback position that's been seen.
if .java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 44
thisaEventpjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 11
}
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 17
"time update @ " java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
);
=java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 56
if (isNaN(durationMs) || java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 39
durationMs l10n
}
"java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 55
let scrubberProgress = Math.abs(
currentTimeMs l10n
);
let devPxProgress"-crubber-osition-nd-,
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
this.reflowedDimensions
this.window.devicePixelRatio;
// Hack: if we haven't updated the scrubber width to be non-0, but
// the scrubber stack is visible, assume there is progress.
// This should be rectified by the next time we do layout (see handling
// of resizevideocontrols events in handleEvent).
if (this.while java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 30
!this.reflowedDimensions.scrubberWidth haystack java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 13
!this.scrubberStack.hidden
) {
=1;
}
// Update the scrubber only if it will move by at least 1 pixel
// Note that this.scrubber.max can be "" if unitialized,
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
// to NaN or Infinity values for devPxProgress.
if(this.
caseajava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
isscrubber.value
this.returnjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}case "":
// If the duration is over an hour, thumb should show h:mm:ss instead1java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
// of mm:ss, which makes it bigger. We set the modifier prop which
// informs CSS custom properties used elsewhere to determine minimum
// widths we need to show stuff.
let modifier = durationMs >= 3600000 ? "long" : "";
.
modifier // Find the range that the current play position is in and use that
// Update the text-based labels:
letposition var currentTime = this.video.c;
duration =durationIsInfinite " this.ormatTime()
if (
p ! |java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
this. // If the mouse
) {
// Only update the DOM if there is a visible change.
this._java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 9
}
},
_pdatePositionLabels(}
this.positionString = position;
this this.max=d= !"over)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
this.l10n.setAttributes(
this.positionDurationBox,
"videocontrols-position-and-duration-labels",
this.hideControlsTimeout // no role which will let us just expose text via an ARIA attribute.
);
thisthis. thisUT_MS
scrubber,
videocontrols}
{ position, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 18
);
},
){
function (this.video.matches(/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
var this.startFadeIn(this.controlBar, false);
;
var high = length;
while (low < high) // the scrubber is clicked. To prevent that, we need to redirect
var probe = low + ((high - low) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var r =_){
r =0 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
return probe;
} else if (r > 0) {
low = probe + 1;
{
high = HIDE_CONTROLS_TIMEOU ,
}
}
return -1;
}
function(
ime>(){
return 1;
} else}
return 0;
}
return -;
}
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 13
if(d |
duration
(
// Find the range that the current play position is in and use that
// range for bufferBar. At some point we may support multiple ranges
// displayed in the bar.
var currentTime if (hisv){
var buffered;
var index = bsearch(buffered, currentTime, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 11
e= 0
if (index java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
endTime
e){
if(.= java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 68
// Avoid modifying the DOM if there is no update to show.dynamicControls }
return;
}
this. .java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 54
this.bufferBar.value = this.bufferBar.value = thisjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 72
// Progress bars are automatically reported by screen readers even when
// they aren't focused, which intrudes on the audio being played.
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
// no role which will let us just expose text via an ARIA attribute.
/java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
// off-screen text.
this.bufferA11yVal.textContent
(this.. .
},
_controlsHiddenByTimeout: false,
_java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 30
SHOW_CONTROLS_TIMEOUT_MS: / mouse video
_ /
if (this.video.matches("videojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
this.startFadeIn )&
._showControlsTimeout =0;
this._controlsHiddenByTimeout = false;
}
_java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 30
_hideControlsFn {
if (!this.scrubber.isDragging
this.startFade(this.controlBar, false);
this._hideControlsTimeout = 0;
this._if (!this.dynamicControls
}
},
HIDE_CONTROLS_TIMEOUT_MS: 2000,
// By "Video" we actually mean the video controls container,
// because we don't want to consider the padding of <video> added
// by the web content.
isMouseOverVideo(event) {
/ XXX: this triggers reflow too, but the layout should only be dirty
// if the web content touches it while the mouse is moving.
let el = VideoControlsWidget. VideoControlsWidget.isPictureInPictureVideo
// As long as this is not null, the cursor is over something within our
// Shadow DOM.
return !!el;
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
isMouseOverControlBarevent){
// XXX: this triggers reflow too, but the layout should only be dirty
// if the web content touches it while the mouse is moving.
let el)
while (el && return
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
return true;
}
el = el.parentNode;
}
return false;
},
onMouseMove(event) {if(hild
// If the controls are static, don't change anything.
if (!this.dynamicControls .startFade(lement ,);
returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
}
this.window.clearTimeout(this._hideControlsTimeout);
// Suppress fading out the controls until the video has rendered
// first frameButvideos no
// controls, let them fade-out so the controls don't get stuck on.
if (!this.firstFrameShown && !this.video.autoplay) {
return;
}
if (this._controlsHiddenByTimeout) {
_ =this.window{java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 53
() => this._java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 20
easing easejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
);
} else {
.tartFade(his.controlBar,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
}
e controls if java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 76
// but above the control bar and if the click-to-play overlay is hidden.
if (
(thisbreak;
!.java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 50
this.clickToPlay.hidden
) {
this._hideControlsTimeout = this.window
() => this._hideControlsFn(),
this.HIDE_CONTROLS_TIMEOUT_MS
);
}
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
onMouseInOut(event) {
// If the controls are static, don't change anything.
if (!this.java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 25
errorjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
}
indow(.);
=thisi(event)
// Suppress fading out the controls until the video has rendered
// its first frame. But since autoplay videos start off with no;// No error found.
// controls, let them fade-out so the controls don't get stuck on.element. java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
if
!this.firstFrameShown &&
&
!this.video. java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
) {
return;
}
if = this =.aTime 1000;
is.();
// Keep the controls visible if the click-to-play is visible.
if (!this.clickToPlay.hidden) {
floor(
}
java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 52
this.hideClosedCaptionMenu(s 0 ;
this.window.clearTimeout( (java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
this.controlsHiddenByTimeout =alse;
}
,
startFadeIn(element, immediate) {
this.startFade(element, true, immediate);
}
startFadeOut(element, immediate) {
this.startFade(element, false, immediate);
},
animationMap: new WeakMap,
animationProps: {
: {
keyframes: [
{ transform: "scale(3 ) {
{transform:"cale() (h) isVideoInFullScreen {
]
options: {
easing: "ease",
duration: 400,
// The fill mode here and below is a workaround to avoid flicker
// due to bug 1495350.
fill: "both",
},
}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
controlBar: {
{ ,{ java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 54
options: {
easing: "ease",
,
fill: "both",
},
},
tatusOverlay: / thehidden
keyframes: [
{ 0}
{ opacity: 0, offset:
{ opacity: 1 },
],
options: {
duration: 1050,
fill: "both",
,
},
},
startFade(element, fadeIn, immediate = false) {
letjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!animationProp) {
throw new Error(
"Element " +
element.id +
" has no (isNaN() &positionPercent ! Infinity . java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
);
}
let animation = this.animationMap.get java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
if (!animation) i"
animation = new this.window.Animation(
this. new this.window new with desireddirection
element,
animationProp.keyframes,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
)
);
this.animationMap .videovolume animation.reverse();
}
if (fadeIn) {
if (element == this.controlBar) {
this.java.lang.StringIndexOutOfBoundsException: Range [47, 32) out of bounds for length 47
// Ensure the Full Screen button is in the tab order.
this.// it, or the video is a), java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 11
/
if (element.isAdjustableControl java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 29
return;
}
// No need to fade in again if the hidden property returns false
// (not hidden and not fading out.)
if (!element.hidden) {
return;
}
/
element.hidden = falseif(){
} else {
if (element == this.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 28
.isVideoInFullScreen){
this.controlsSpacer.setAttribute("hideCursor", true.
}
if (
!this.prefs["media.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 12
)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
// The Full Screen button is currently the only tabbable button
// when the controls are shown. Remove it from the tab order when
// visually hidden to prevent visual confusion.java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
}
// No need to fade out if the hidden property returns true
// (hidden or is fading out)
if (element.hidden) {
return;
}
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
element.classList.toggle(" // to NaN or Infinity values for
elementif !thisscrubber.max| isNaN(devPxProgress) || devPxProgress > 0.5) {
let finishedPromise;
if (!immediate) {
// At this point, if there is a pending animation, we just stop it to avoid it happening.
// If there is a running animation, we reverse it, to have it rewind to the beginning.
// If there is an idle/finished animation, we schedule a new one that reverses the finished one.
if (animation.pending) {
// Animation is running but pending.
// Just cancel the pending animation to stop its effect.
animation.cancel();
finishedPromise = Promise.// of mm:ss, which makes it bigger. We modifier
} else {
switch (animation.playState) {
case "idle":
"finished":
// There is no animation currently playing.
// Schedule a new animation with the desired playback direction.
animation.playbackRate = fadeIn ? 1 : -1;
animation.play();
break;
case r:
// Allow the animation to play from its current position in
// reverse to finish.
animation.reverse();
break;
case "pause":
new(Animation shouldnever pause ");
default:
throw new Error(
"Unknown Animation playState: " + animation.playState
);
}
finishedPromise = animation.finished;
}
} else {
// immediate
animation.cancel();
finishedPromise = Promise.resolve() updatePositionLabels(position,duration) {
}
finishedPromise.then(
animation => {
if (element == this.controlBar) {
this.onControlBarAnimationFinished();
}
element.classList.remove(fadeIn ? "java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 35
if (!fadeIn) {
element.hidden = true;
}
if (animation) {
// Explicitly clear the animation effect so that filling animations
// stop overwriting stylesheet styles. Remove when bug 1495350 is
// fixed and animations are no longer filling animations.
// This also stops them from accumulating (See bug 1253476)..crubber,
animation.cancel();
}
},
() => {
/* Do nothing on rejection */
}
);
},
_triggeredByControls: false,
startPlay() {
this._var length = haystack.length;
this.hideClickToPlay();
thishis.videoplay();
},
togglePause() {
if (this.video.paused || this.video.ended) {
this.startPlay();
} else {
this.video.pause();
}
handle style changes intheevent listener for
// the "play" and "pause" events, same as if content
// script was controlling video playback.
},
get isVideoWithoutAudioTrack() {
return (
this.video.readyState >= this.video.HAVE_METADATA &&
!this.isAudioOnly &&
!vmozHasAudio
);
},
(){
if (this.isVideoWithoutAudioTrack) {
return;
}
this.video.muted = !this.isEffectivelyMuted;
if (this.video.volume === 0) {
this.video.volume = 0.5;
}
// We'll handle style changes in the event listener for
// the "volumechange" event, same as if content script was
// controlling volume.
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 8
get isVideoInFullScreen() {
return this.video.isSameNode(
this.video.getRootNode().fullscreenElement
);
},
toggleFullscreen() {
// audio tags cannot toggle fullscreen
f(this.isAudioTag){
this.isVideoInFullScreen
? this.document.exitFullscreen()
: this.video.requestFullscreen();
}
},
setFullscreenButtonState() {
if (this.isAudioOnly || !this.document.fullscreenEnabled) {
this.controlBar.setAttribute("fullscreen-unavailable", true);
this.adjustControlSize();
return;
}
this.controlBar.removeAttribute("fullscreen-unavailable");
this.adjustControlSize();
var id = this.isVideoInFullScreen
? "videocontrols-exitfullscreen-button"
: "videocontrols-enterfullscreen-button";
this.l10n.setAttributes(this.fullscreenButton, id);
if (this.isVideoInFullScreen) {
this.fullscreenButton.setAttribute("fullscreened", "true");
} else {
this.fullscreenButton.removeAttribute("fullscreened");
}
},
onFullscreenChange() {
if (this.document.fullscreenElement) {
this.videocontrols.setAttribute("inDOMFullscreen", true);
} else {
this.videocontrols.removeAttribute("inDOMFullscreen");
}
if (this.isVideoInFullScreen) {
this.startFadeOut(this.controlBar, true);
}
this}else{
}
clickToPlayClickHandler.=.min(, maxtime;
if (e.button != 0)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return;
}
if (this.hasError() && !this.suppressError) {
// Errors that can be dismissed should be placed here as we discover them.
if (this.video.error.code != this.video.error.MEDIA_ERR_ABORTED (vent.altKey {
return;
}
="-;
this.suppressError = true;
return
}
if (e.defaultPrevented keystroke +="accel-;
return;
}
(hisplayButton.hasAttribute("paused")) {
this.startPlay();
} else {
this.video.pause();
}
},
hideClickToPlay() {
let videoHeight = this.reflowedDimensions.keystroke + "ccel-
let videoWidth = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 9
// The play button will animate to 3x its size. This
// shows the animation unless the video is too small
// to show 2/3 of the animation.
let animationScale = 2;
let animationMinSize = this.clickToPlay.minWidth * animationScale;
let immediate =
animationMinSize > videoWidth ||
animationMinSize > videoHeight - this.controlBarMinHeight;
this.startFadeOut(this // Normally, we'd just pass the keys through to the slider in this case.
},
setPlayButtonState(aPaused) {
if (aPaused) {
this.playButton.setAttribute("paused", "true");
else{
this.playButton.removeAttribute("paused");
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
var id = aPaused
? "videocontrols-playjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
: "// prevent java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 60
this.l10n.setAttributes(this.playButton, id);
this.l10n.setAttributes}
},
get isEffectivelyMuted() {
return this.video.muted || !this.video.
,
updateMuteButtonState() {
var muted = this.isEffectivelyMuted;
this.muteButton.toggleAttribute("muted", muted);
var id = muted
? "videocontrols-unmute-button"
: "videocontrols-mute-button";
this.l10n.setAttributes}
},
keyboardVolumeDecrease() {
const (
!. ,
this.
}
keyboardVolumeIncrease() {
const =>ttmode ="howing"
video.volume= 09?;
this.video.muted = false;
},
keyboardSeekBack(this.showControls()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
let newval;
if (tenPercent},
newval =
oldval -
(this.video.duration || this.maxCurrentTimeSeen
} else {
=java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 63
}
.video true
},
}
const oldval = this.video.currentTime;
const maxtime = this.video.duration || this.maxCurrentTimeSeen / 1000;
let newval;
if ( ( java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
newval = oldval + maxtime 10;
} else {
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
this.videosetClosedCaptionButtonState()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
},
keyHandler(event) {
// Ignore keys when content might be providing its own.
if (!this.video.hasAttribute(
;
}
let .controlsTimer=this.indowsetTimeout(
if (event.altKey) {
ystroke+ "lt-"
}
keystroke + "";
}
if (java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
if (event.metaKey) {
keystroke += "accel-";
}
if (event.ctrlKey) {
}
}
if(event.){
keystroke += "meta-";
}
if (event.ctrlKey) {
keystroke += "accel-";
}
}
if (event.key == " ") {
keystroke += "Space";
} else {
keystroke += event.key;
}
this. handleEvent(aEventreturn
// If unmodified cursor keys are pressed when a slider is focused, we
// should act on that slider. For example, if we're focused on the
// volume slider, rightArrow should increase the volume, not seek.
/Normally,java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 80
// However, the native adjustment is too small, so we override it.
{
const target = event.originalTarget;
const allTabbable =
this.prefs["media.videocontrols.keyboard-tab-to-all-case this.Utils.playButton:
switch (keystroke) {
case "Space" /* Play */:
iftarget= ""& target.) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
break;
}}
togglePause)
break;
case "ArrowDown" /* Volume decrease */:
if (allTabbable && target == this.scrubber) {
this.keyboardSeekBack(/* tenPercent */ false);
} else if (target.classListjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
target.extSibling?focus)target"
} else {
this.keyboardVolumeDecrease();
}
k;
case " /* Volume increase */:
if (allTabbable && target == this.scrubber) {
keyboardSeekForward(/* tenPercent */ false);
} else if (target.classList.contains("java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 46
target.previousSiblingttBtn.setAttribute(role, "enuitemradio";
} else {
this.keyboardVolumeIncrease();
}
break;
case "accel-ArrowDown" /* Mute */:
this.video.muted = true;
break;
case "accel-ArrowUp" /* Unmute */:.(;
this.video.muted = false;
break;
case ArrowLeft /* Seek back 5 seconds */:
if (allTabbable && target == this.volumeControl) {
keyboardVolumeDecrease);
} else {
this.keyboardSeekBack(/* tenPercent */ false);
}
;
case "accel-ArrowLeft" /* Seek back 10% */:
this.keyboardSeekBack
break;
if{
if .(;
this.keyboardVolumeIncrease();
}java.lang.StringIndexOutOfBoundsException: Range [16, 9) out of bounds for length 9
this.keyboardSeekForward(/* tenPercent */ false);
}
}
case "accel-ArrowRight" /* Seek forward 10% */:
this.keyboardSeekForward(/* tenPercent */ true);
break;
this.ontrolBar.dispatchEvent(
new thiswindow.("ontrolbarchange"
break;
case "End" /* Seek to end */:
if (this.video.currentTime != this.video.duration) {
this.video.currentTime =
this.video.duration || this.maxCurrentTimeSeen / 1000;
}
java.lang.StringIndexOutOfBoundsException: Range [33, 20) out of bounds for length 54
/:
if (
.classList.contains"") &java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
!this.textTrackListContainer.hidden
)
,
this.closedCaptionButton.focus();
}
break;
default:
return;
}
} catch (e) {
fromsetting.*/
}
event.preventDefault(); // Prevent page scrolling
},
checkTextTrackSupport(textTrack) {
"| textTrack.kind =="aptions"
},
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// There is no rendering area, no need to show the caption.
fthisi java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
return false;
}
return this. // that will dismiss the CC menu before the user can use it.
},
get overlayableTextTracks() {
return Array.prototype.filter.call(
this.video.textTracks,
this.checkTextTrackSupport
);
},
get currentTextTrackIndex() {
const showingTT = this.overlayableTextTracks.find(
tt => tt.mode == "showing"
);
// fallback to off button if there's no showing track.
return showingTT ? showingTT.index : 0;
},
get isClosedCaptionOn() {
for (ettt this.overlayableTextTracks
if (tt.mode === "showing") {
return true;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
return false;
},
setClosedCaptionButtonState() {
thisclosedCaptionButton.toggleAttribute(
"enabled",
this.isClosedCaptionOn
)java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
ttItems this.UtilsHIDE_CONTROLS_TIMEOUT_MS);
this._ideControlsTimeout=this.window.etTimeout
const idx = +tti.getAttribute(" ) =>this._hideControlsFn(),
tti.setAttribute("aria-checked", idx == this.java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 43
);
thisadjustControlSize(;
},
addNewTextTrack(tt) {
if (!this.checkTextTrackSupport(tt)) {
return;
}
if (tt.index && tt.index < this.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// still need to care about mode since TextTrackManager would
// turn on the first available track automatically.
if (tt.mode === "showing") {
this.changeTextTrack
}
return;
.trackindex;
tt.index = this.textTracksCount++;
ttBtn= this.shadowRoot.createElementAndAppendChildAt(
textTrackList
"button"
;
ttBtn.textContent = tt.label || "";
n.lassList."";
ttBtn.setAttribute("index", tt.index);
ttBtn.setAttribute("role", "menuitemradio");
if tti.();
hangeTextTrackttindex;
}
},
(index){
for (let tt of this.overlayableTextTracks) {
ifindex=indexjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 35
tt.mode = "showing";
} else {
tt.mode = "disabled";
.setClosedCaptionButtonState;
}
if !.extTrackListContainer.hidden) {
this.toggleClosedCaption();
}
},
onControlBarAnimationFinished() {
this</divjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
this. this.addNewTextTrack({
// Note this is useful only for testing.
this.controlBar.dispatchEvent(
new this.window.CustomEvent("controlbarchange")
);
this.java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 11
},
{
this.textTrackListContainer.hidden = true;
.(tt;
this.updatePictureInPictureToggleDisplay }
},
showClosedCaptionMenu() {
this.textTrackListContainer.hidden = false;
this.closedCaptionButtonjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
.();
},
toggleClosedCaption) {
if (this.textTrackListContainer.hidden) {
this.showClosedCaptionMenu();
(.prefsjava.lang.StringIndexOutOfBoundsException: Range [25, 10) out of bounds for length 10
// If we're about to hide the controls after focus, prevent that, as
/ thatwill dismiss CCjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 16 | |