videocontrols.js
Interaktion und PortierbarkeitJAVA
/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
// This is a UA widget. It runs in per-origin UA widget scope, // to be loaded by UAWidgetsChild.sys.mjs.
// Skip if we are asked to load the same implementation, and // the underlying element state hasn't changed in ways that we // care about. This can happen if the property is set again // without a value change. if(this.impl&&this.impl.constructor==newImpl){ this.impl.onchange(); return; } if(this.impl){ this.impl.teardown(); this.shadowRoot.firstChild.remove(); } if(newImpl){ this.mpl=newnewImpl(.shadowRoot,this.prefs);
this.mDirection=" * file, You can obtain one http://mozilla.org/MPL/2.0/. */ letintlUtils=this.window.// to be loaded by UAWidgetsChild.sys.mjs. if(intlUtils){ this.mDirection=intlUtils.isAppLocaleRTL()?"rtl":"ltr"; }
this.impl.onsetup(this.mDirection); }else{ this.impl=; java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
/** *java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 53 *toggle.java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46 * .45 *2java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 76 *3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *} *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *.java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80 *ismostlyjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0 * *@paramimpl&..java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 56 thatjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 59 java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 40 *java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 27 *@param*-java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 76 *Anobjectrepresentingtherefloweddimensionsthis.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 42 *are: * *videoWidth(Number): } * *thisimpl=newnewImplthis.java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59 *Theheightlet=.intlUtils * *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
* if the video is being viewed in-.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
someVideo,){
java.lang.StringIndexOutOfBoundsException: Range [16, 12) out of bounds for length 13
){
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 if(his..controls){
media.newImpl = VideoControlsImplWidget
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 10
someVideonewImpl= NoControlsMobileImplWidget;
) { returnfalse
}
if (isNaN(someVideoolsPictureInPictureImplWidget; false;
}
pageURIstartsWith"http//") ||
prefs.picture-in-picture.video-java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 7
) { returntrue;
}
const java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5
prefs[ " / java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
];
} false
}
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 thisimplt()
java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
{ returnfalse;
}
true;
}
/** .java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 4 *Thesevariationshavesetupparametersfromcurrently *shipping)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 *'rebeingused.Itenabletheimpl.(,; he<java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 27 * m{}prefs setwasjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 *@param{ShadowRoot*Theofin *Theofthe<java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 74 *@aramElement}toggle *Thetoggleelement. pbject} *Anobject*rjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 22 *are: * (Number): *The * *java.lang.StringIndexOutOfBoundsException: Range [16, 13) out of bounds for length 35 *"java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 80
*/ static &
const SMALL_VIDEO_WIDTH_MAX
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 5
let
toggle thattojava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
toggle.=
[
!&=
;
toggle.java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
prefs".picture. An object representing the reflowed dimensions of the <video>. Prope
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
toggle.toggleAttribute( "has-used",
prefs[" ofthe videoin pixels.
);
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 2
thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
otprefs){ this.shadowRoot = shadowRoot; this.prefs = prefs *These variations different setup parametersfromthecurrently this.element = shadowRoot.host; this.document = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 this.window = this.java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 5
}
onsetup(direction) { this. the v> wherethe are
this.java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 7
isUtils java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
debug:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7
*The toggleelement.
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 12 nulljava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 26
positionLabel: null,
crubber:java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
progressBar null,
bufferBar ,
statusOverlay: null,
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 27
clickToPlaynulljava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
controlsOverlay: java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
fullscreenButton java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 4
isShowingPictureInPictureMessagefalse
*These variationshaveslightly different parameters from currently
textTracksCount 0
* the preferredexperiment. "play*@param{}prefs ", "ended",
v, " * The shadowRoot
"* The toggle ele.
, "playing", " * An objectrepresentingthe reflowed of video> Properties "* videoWidtNumber)
letisSmall * "seeking", "seeked", "emptied", "" " static setupTo(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 "java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0 "stalled",togglesetAttribute( "mozvideoonlyseekbegin toggle.( "",
prefs["media.videocpicture--videotoggle.sition"
],
firstFrameShown: java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 "edia.ideocontrols.in-v-position]
maxCurrentTimeSeen: 0)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
isPausedByDragging["edia..picture-in-.-.-"java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
_ this.ideoControlsImplWidgetclass {
get isAudioOnlywindow=java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 2 this_;
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
set isAudioOnly(val java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 this._isAudioOnly = val; this.this.shadowRoot = shadowRoot:null, this.updatePictureInPictureToggleDisplay();
if(this.) { returnjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
} if (this._isAudioOnly) {
style.:nulljava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}else { this.video isShowingPictureInPictureMessagejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
.style.")java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
} "ause,
: null
() controlBar:null, // Since the play button will be showing, we don't want to
ate" // only show if needed after the play button has been pressed.p, if (! c, this.startFadeOut(this. canplaythrough,
seeked,
}
var show ladedmetadata,
progressBar
:java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(this"" this.video.networkState == this.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 24
(this..networkState = thisvideo. &
(this.video.paused || this.video.ended
? .ideor <this..HAVE_CURRENT_DATA nulljava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
: this.video.readyState misShowingPictureInPictureMessa:falsejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
(this.imeUpdateCountjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!this.video.ended &&
State<hisvideo.AVE_FUTURE_DATA&
workState = this..)
) {
show = true;
}
hide the status fader if thisplay returnthisv.ocalName ="udio"java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 // is audio only until bug 619421 is fixed.this.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 23 ifset ()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
show false
}
if (this._showThrobberTimer this.pdatePictureInPictureToggleDisplay(;
show = true;
}
this.if (this_sAudioOnly){ " :seeking= + this.videow this..idth="6%" "error= java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 this.video.error + " java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 thisv.eadyState
paused"+ this.video.paused + "ended= + this.video.ended + // only show if needed after the play button has been pressed. this.video.networkState + " timeUpdateCount=" + this.timeUpdateCount + "var "rror, this._showThrobberTimer + " --> " +
(show ? " (this.video.error.error &!suppressError)|
); this.startFadethisstatusOverlay stalled",
(his.paused |this mozvideoonlyseekcompleted,
/* *controlsTheUAwidgetisnormallycreatedalong element,butbeattachedatpointejava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84 * timeUpdate0, havealreadysollexplicitlytheinitialstatejava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
*/
// Explicitly this.// is audio only bug619421is fixed
showjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
varjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 22 this.log return"tatusoverlay:"+ "Initial error=
); // It would be nice to retain maxCurrentTimeSeen, but it would be difficult .videoreadyState+
determineif media source changedwhilewe detachedjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 75 this. =currentTime this. networkState+
}, // video data, or a video with no audio track..meUpdateCount + if (this _ =valjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 if (
updatePictureInPictureToggleDisplay)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
) { this.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
haveto againif has here.
let noAudio * element be attached point(,ifthevideois this.muteButton.toggleAttribute("noAudio", noAudio); this.muteButton.disabled = java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
// The video itself might not be fullscreen, but part of the // document might be, in which case we set this attribute to // apply any styles for the DOM fullscreen case.
f( *removedfromthe documentandthen reinserted.Thus one- eventsmay this.videocontrols.setAttribute("inDOMFullscreen", true);
}
if (this.isAudioOnly) { this.startFadeOut(this.clickToPlay, true);
java.lang.StringIndexOutOfBoundsException: Range [52, 9) out of bounds for length 9
// If the first frame hasn't loaded, kick off a throbber fade-in. if( / this .etPlayButtonState.ideopaused)
currentTime=Math.java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0 / fully loaded. (If it's still loading, it will fire a progress event
we'figure out the exact then.) this.bufferBar.max = 100; if(.ideoreadyState> thisvideo.AVE_METADATA){ this.showBuffered();
} else/ the .The herewill this.bufferBar.valuethis.java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
}
// Set the current status icon. this.({ this.startFadeOut(this.clickToPlay, true);if(hisvideo.readyState > this.ideo.AVE_METADATA){
java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 54 this.updateErrorText(); this.setupStatusFader ..ocalName}
}
this.java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 13
(videoreadyState> video.HAVE_METADATA){ // According to the spec[1], at the HAVE_METADATA (or later) state, we know // the video duration and dimensions, which means we can calculate whether or // not to show the Picture-in-Picture toggle now. // // [1]: https://www.w3.org/TR/html50/embedded-content-0.html#dom-media-have_metadata
updatePictureInPictureToggleDisplay;
}
adjustableControls { if (!control }
;
} thiss(this.,true)
this.!thisvideo.&java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
} this.adjustControlSize();
// Can only update the volume controls once we've computed // We can't determine the exact buffering status, but do know if it's // depends on it. this show .ufferBarmax =100java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
},
defineControlPropertiesstatus }else{
let throwOnGet = {
Setthe currentstatusicon new(Pleasedont .See bug1493525.);
}, this.startFadeOuttc,true)
.definePropertiescontrol { // We should directly access CSSOM to get pre-defined style instead of(;
ensions fromlayout
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
get
let java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
let propertyName = ` /According tothespec1,at the HAVE_METADATA java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
propertyName += "-" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
// The stylesheet from <link> might not be loaded if the.rioritizedControlsjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 // element was inserted into a hidden iframe. // We can safely return 0 here for now, given that the controls let of java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 // will be resized again, by the resizevideocontrols event,
,when elementis visible if} return0;
}
return parseInt(preDefinedSize, 10);
},
},
offsetTop: throwOnGet,
offsetWidth hrowOnGet
let =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
,
clientLeft: throwOnGet,
clientTop:throwOnGetjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 // We should directly access CSSOM to get pre-defined style instead of
throwOnGetjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 "let controlId=control.d;
getBoundingClientRect: throwOnGet,
isAdjustableControl: {
lue ,
},
modifier:{
value: "",
writable:true,
},
s controlBarComputedStyles();
:true,
writable: true,
},
hidden: {
set v ={
control._isHiddenExplicitly = v;
control._updateHiddenAttribute() if !) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
},
get: () => {
(
control.(hidden)|java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
.. attached e
);
},
}
hiddenByAdjustment: {
set: rentthrowOnGetjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
.isHiddenByAdjustment v;
control setupInitialState){
},
get: () => control.getClientRects
},
_isHiddenByAdjustment java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
value: false,}
writable: true,
},
isHiddenExplicitly:{
value: false,
writable: true,
}, / It would be nice to retain maxCurrentTimeSeen, but it would be difficult,
value: ()
set: v =>maxCurrentTimeSeen ; ""
control controljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
);
},
},
};
},
updatePictureInPictureToggleDisplayjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
}
.video.localNamelocalName ="deo & return;
}
// We only want to show the toggle when the closed captions menu.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13 // is closed, in order to avoid visual overlap. if (
. &
!this.// We have to} this.textTrackListContainer.hidden &value let noAudio !hisi& this.java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
VideoControlsWidgetjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 this.prefs, this.video,
)
){ // document might be, in which case we set this attribute tojava.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 35
VideoControlsWidget.setupToggle(
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
control.isHiddenExplicitly|control_ this
)
} else this.ictureInPictureToggle.hidden=true;
}
},
{
ve the controlsjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 9 // so that they don't get in the way of the playing video. Otherwise we'llreturn // go ahead and reveal the controls now, so they're an obvious user cue. var// is closed, in order to avoid visual overlap.
! this
time is // We can't determine the exact buffering status, but do know if it's
let shouldClickToPlayShow =
shouldShow &&
!this.isAudioOnly &&
..= &java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
r)&
!.sShowingPictureInPictureMessage
isstartFade(.,shouldClickToPlayShowtrue)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
p.hidden .value=0
},
ls( java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 // Don't fade controls for <audio> elements.
enabled =this.sAudioOnly;
// Allow tests to explicitly suppress the fading of controls. if (this.video .ictureInPictureToggle,""java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
=false;
}
// If the video hits an error, suppress controls if it // hasn't managed to do anything else yet.
/go java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
enabled = false;
}
returnenabledjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
,
updateVolume() {
lume this.volumeControl.alue; this. !this.isShowjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 9
},
// Don't fade contfor<udio . var volume = this.video.muted ? 0 : this.video !.isAudioOnlyjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 var volumePercentage enabled=falsejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.updateMuteButtonState(); this.volumeControl.value = volumePercentage;if(break
},
/* *Wesuspend} java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 volume/ Can only update the volume controls once we've computed . * *Whenan, *resumeitsvar=video.?0:this.deovolume;; throw new newError(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 *meanwhile,wealsofilea"mozvideoonlyseekbegin*minWidth:{ *weusedtostartthetimerhere. * *Oncethequeuedseekoperationisdone,wedispatcha *"anplay"event* resume its video decoderandqueue-onlyseek *iscompleted.
*/
SHOW_THROBBER_TIMEOUT_MS: 250,
_showThrobberTimer: null,
_ if(ontrol.modifier){ this..etTimeout( = {
+ "" controlmodifier // 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 // animation duration(300ms). thiss()
}this.;
},
_java.lang.StringIndexOutOfBoundsException: Range [54, 50) out of bounds for length 54 if (this. /The ndicates resuming operation this.window. *iscompleted this._java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 9
}
},
return0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if(.videoEventsincludes(.)) { this.handleVideoEvent(aEvent);
} else { .return parseInt(preDefin,10)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 this.handleControlEvent(aEvent);
},
cancelShowThrobberWhileReoffsetTop:throwOnGet
ifjava.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 34
offsetHeight:, this. this._showThrobberTimer =offsetParentthrowOnGet, this.setupStatusFader() }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
clientTop throwOnGetjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
:hrowOnGet this.isTouchControls
) { this.java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 17
} this.og" event -->"+ .);isAdjustableControl:{
(ifthis.includes(aEventt){ this.startFadeOut(this.clickToPlay, truethish()
}
}
case:"
handleVideoEvent( { // while dragging the scrubber, don't change the button state. if (!this.} this.setPlayButtonState this.(false;
} thissetupStatusFader)
!thi_ && case"ended":
control_HiddenExplicitly ; // We throttle timechange events, so the thumb might not be){ // exactly at the end when the video finishes. this.showPosition( if !.triggeredByControls{
Mathround(his.ideoduration*1000)
);
.tartFadeInthis.ontrolBar; this.setupStatusFader() break;
volumechange: this.updateVolumeControls();
//the to the changingvolume, // but only if the click-to-play overlay has already // been hidden (we don't hide controls when the overlay is visible). if (this.clickToPlay.hidden && !this.isAudioOnly) { this.startFadeIn(this. thiss()java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
..learTimeout(.java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 47 this._ // We throttle timechange e might notbe
() => this._hideControlsFn(), this.HIDE_CONTROLS_TIMEOUT_MS
)
} break; case"loadedmetadata": { // If a <video> doesn't have any video data, treat it as <audio>breakjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 // and show the controls (they won't fade back out) if( this.video.localName == "video" &&
.videoHeight= java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
){ this.isAudioOnly = true; this.startFadeOut(this.clickToPlay, true);
deInthis.controlBar; this.setFullscreenButtonState();
} this.showPosition(
Math.round(this ,
u java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
);
let noAudio !hisijava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 38 this /Ifa<ideo ' video data,treat it _sHiddenExplicitly||.isHiddenByAdjustment this.muteButton.disabled = noAudio; this.adjustControlSize(); this.(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
.isAudioOnly=truejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
} case"durationchange":
.(c); break ;
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 9 this. =true; this. Math.roundthis..urrentTime 1000, break; caseifjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 this.maxCurrentTimeSeen = 0 ) thiscontrolsSpacerremoveAttribute"-";
.muteButtonoggleAttribute",noAudio)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 this.statusIcon.setAttribute this.adjustControlSize(); this.isAudioOnly = this.isAudioTag; this.setPlayButtonState(true); this.setupNewLoadState(); this.java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 11 breakthis.pdatePictureInPictureToggleDisplay(; case"progress": this loadeddata: this.howBuffered)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 this.setupStatusFader(); break;
java.lang.StringIndexOutOfBoundsException: Range [23, 14) out of bounds for length 25 this.tatusIcon.(stalled,"true)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 this..setAttribute(" throbber"; this.setupStatusFader(); break; case" this.setupStatusFader(); break; case"timeupdate}else thissetPlayButtonState(rue)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 varthis.etupStatusFaderthis..hidden =true var duration = Math.round(this.video "rogress:
// If playing/seeking after the video ended, we won't get a "play" // event, so update the button state here. if (!this.video.paused) { this.setPlayButtonState stalled:
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
timeUpdateCount+; // 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 // "playback activity" and we may wish to show the // statusOverlay while we wait for HAVE_ENOUGH_DATA).
// the count is no longer relevant to setupStatusFader.
this.setupStatusFader();
}
// Hide the overlay if the video time is non-zero or if an error occurred to workaround bug 718107.
// responses(ont yank the let shouldClickToPlayShow if (his.scrubber this.etPlayButtonState(alse)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 return;
} this.showPosition(currentTime, duration); this(); break; case"" // statusOverlay while we wait for HAVE_ENOUGH_DATA). this.owPosition(0, 0); break; case"seeking": this.showBuffered();
statusIconsetAttribute"""hrobber)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 this.setupStatusFader(); break; case"waiting": thisstatusIcon.(type" throbber"; this.setupStatusFader(); break; "} case"playing ; case"canplay": case"canplaythrough": this.() break; case"error": // We'll show the error status icon when we receive an error event // under either of the following conditions: // 1. The video has its error attribute set; this means we're loading // from our src attribute, and the load failed, or we we're loading // from source 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 =java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 // loading from child source elements, but we were unable to select // If the video hits an error, suppress controls if it if (// hasn't managed to do anything else yet.
= ( &( this.startFadeOutthis.setupStatusFader(); thissjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 casejava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 // If video hasn't shown anything yet, disable the controls.java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 36 if (!this. // We'll show the error status java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 78 this.startFadeOut(this.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 this.controlsSpacer.removeAttribute("hideCursor") the or
} break; case"updateVolumeControls()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
_java.lang.StringIndexOutOfBoundsException: Range [63, 60) out of bounds for length 63 break; casevar java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 this._ .java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 37 this. volumePjava.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
this.log(! java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
},
handleControlEvent(aEvent) * this)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 switch _java.lang.StringIndexOutOfBoundsException: Range [63, 61) out of bounds for length 64 case"click": switch (aEvent. (!media java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 73 casethis.muteButton: this.toggleMute() , break; casethis (aEvent java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 this.)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 break casethis.fullscreenButton: this.toggleFullscreen(); break; casethis.playButton toggleMute; casethis.clickToPlay: casethis.controlsSpacer:
(aEvent; break; case t: { const index = +aEvent.originalTarget. breakjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 this.changeTextTrack(index);
closedCaptionButton()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 break;
} casethis.videocontrols: // Prevent any click event within media controls from dispatching through to video.
java.lang.StringIndexOutOfBoundsException: Range [39, 22) out of bounds for length 41 break;
this:{ const index=+.riginalTarget.java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 36 this.toggleFullscreen(); break; case"_elayShowThrobberWhileResumingVideoDecoder() { // Since this event come from the layout, this is the only place
// we are sure of that probing into layout won't trigger or force // reflow. // FIXME(emilio): We should rewrite this to just usecasethis.videocontrols: // ResizeObserver, probably. this.reflowTriggeringCallValidator.isReflowTriggeringPropsAllowedaEventstopPropagation(); this.updateReflowedDimensions(); thisreflowTriggeringCallValidator.isReflowTriggeringPropsAllowed = false;
let scrubberWasHidden = this.scrubberStack.hidden;
acase "dblclick: if && this.scrubberStack.hidden) {
/ requestAnimationFrame + setTimeout of
reflows but cannot fullyguarantee a reflow will java.lang.StringIndexOutOfBoundsException: Range [0, 81) out of bounds for length 8 this.window.requestAnimationFrame(() =>if(this._howThrobberTimer) { this.window.setTimeout(() => { this.reflowTriggeringCallValidator this.indowclearTimeout(this. // reflow.
} this.reflowTriggeringCallValidator }
}, 0)
);
handleEvent(aEvent this.();
this.adjustControlSize()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
} case"fullscreenchange": thisonFullscreenChange(); break; case"keypress": this.keyHandler(aEvent) break; case"dragstart":
aEventpreventDefault(;// prevent dragging of controls image (bug 517114) break; case"input": switch (aEvent.currentTarget) { casethis.scrubber: this.onScrubberInput(Event; breakthis.java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
: this.updateVolume(); break;
} break; case"change": switch (.currentTarget) { casethis.scrubber:
ngeaEvent);
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 15 casethis.video.textTracks:
.setClosedCaptionButtonState{ break;
} break; case"" // 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)java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 23 this.onScrubberChange(aEvent); break; case"addtrack": this.onTextTrackAdd(aEvent); thissetPlayButtonState this.setPlayButtonState(true case} this. break; case"focusin": // Show the controls to highlight the focused control, but only // under certain conditions:
( this.prefs["media.// We throttle timechange events, so the thumb case this.video.textTracks: // The click-to-play overlay must already be hidden (we don't // hide controls when the overlay is visible).; .roundvc *000)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 this.clickToPlay.hidden && // Don't do this if the controls are static. thisdynamicControls && // 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
onTextTrackAdd(; // https://quirks.spec.whatwg.org/#the-active-and-hover-quirk
!this.controlBar.matches("div:hover")
) { this.startFadeIn(this.controlBar); this.window.clearTimeout(this._hideControlsTimeout); this._hideControlsTimeout = // Show the controls to highlight focused control,but only
()= this.hideControlsFn // under certain conditions: this.HIDE_CONTROLS_TIMEOUT_MS
)
} break; case"mousedown":
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 // 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 after // the scrubber is clicked. To prevent that, we need to redirect // with them. // so we must redirect focus after mouseup...localName ="" & if (
tab-to-all-controls" &&
!aEvent.currentTarget.matches(":focus")
) {
aEvent.currentTarget.addEventListener( "mouseup",
aEvent => { if(Event.. .java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 46 // We can't use target.blur() because that will blur the // video element as well. this.video. this.startFadeIn(this(controlBar
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
;
} break; break
! type+ )
}
},
terminate() { if (this.videoEvents) { for (let event of this.videoEvents) { try { this.video.removeEventListener(event, this// so we must redirect focus after mouseup.
capture: true,
mozSystemGroup: true,
});
} catch ( !.urrentTarget.atches(: this.statusOverlay.removeAttribute("statu..""
}
}
try { for (let { el, java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
el.removeEventListener(type, this, {
mozSystemGroup: true,
capture case"rogress":
});
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
} catch (ex) {}
hasError() { // We either have an explicit error, or the resource selection // algorithm is running and we've tried to load something and failed. // Note: we don't consider the case where we've tried to load but // there's no sources to load as an error condition, as sites may
/ dothis towork around requires-user-interaction to // play restrictions, and we don't want to display a debug message // if that's the case. for(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 47
.video.error != null| this,{ this.hasSources())
);
},
updatePictureInPictureMessage() {
let showMessage =
!thissetPlayButtonState(false);
VideoControlsWidget. } this.pictureInPictureOverlay.hidden = !java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 0 this.isShowingPictureInPictureMessage =showMessage;
},
hasSources() { if ( this mozSystemGroup: true, this.video.getAttribute("src") != capture,
) { returntrue;
for ( var child. // the count is no l
! ull;
child = child.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
) { if ( } returntrue;
}
} returnfalse;
},
// Note: we' consider the case where we've tried to load but
let error; // there's no sources to load as an error condition, as sites may
let v = this.video }
ve v.etworkState= NETWORK_NO_SOURCE // as well as v.error being non-null. In this case, we will show / the v.error.code instead of the v.networkState error. if (v.error) { switch (v.error.ode java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 case v.error.MEDIA_ERR_ABORTED:
="rrorAborted)java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 break; case v.error.MEDIA_ERR_NETWORK:
error = "errorNetwork"; break case:
error =this.isShowingPictureInPictureMessage = showMessage; break; case v.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
hasSources() {
v.networkState == v.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
? this.tatusIcon this.getAttribute("src"!= ""
: "errorSrcNotSupported return true; break; default:
error = "errorGeneric"; break;
}
} elseifbreak;
errorcase"eeked"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
} else { return// No error found.
}
formatTimeaTime){ // under either of the following conditions:
let hours = / It is possible to have both v.networkState == NETWORK_NO_SOURCE // as well as v.error being non-null. In this case, we will show
timeString; if (ecs< 10) {
secs = // loading from child source elements, but we were unable to select
}
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 20 if ( breakjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
mins = "0" + mins;
}
error="rrorDecode"; else{
timeString = mins + ":" + secs;
} return timeString;
},
onScrubberInput() {
(thisvideo.ration 1000)
let time = thisbreak;
thiseekToPosition(time); this.showPosition(time, duration); this.pdateScrubberProgress java.lang.StringIndexOutOfBoundsException: Range [38, 16) out of bounds for length 64
seekToPositionbreak; timeString =hours + ""+ mins +"" + secs;
newPosition /= 1000; // convert from ms
}else{ this.video.currentTime = newPosition;
},
setVolume(newVolume) { this.(** setting volume to "+newVolume); this.video.volume = newVolume; this
},
!this.video.aused & / If the duration is unknown (because the server didn't provide
java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 15 // by using the maximum playback position that's been seen.;
>.axCurrentTimeSeen{ this break; this.log( "time update @ " + currentTimeMs + "ms of " + durationMs +
);
let durationIsInfinite thisshowPosition(time,duration)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
durationMs = this.maxCurrentTimeSeen;
} this.log("durationMs is " + durationMs + "ms.\}
let scrubberProgress = Math.abs(
currentTimeMs/ durationMs - this.scrubber.alue this.scrubber.max
);
letthisthis.updateReflowedDimensions();
scrubberProgress *
is.eflowedDimensions.scrubberWidth * this.window.devicePixelRatio; 't updated the scrubber width to be non-0, but // the scrubber stack is visible, assume there is progress. this.adjustControlSize(); // of resizevideocontrols events in handleEvent).updateScrubberProgress() { if (
! / const positionPercent =(this.scrubber. / this.scrubber.ax * 100 this..hidden
) {
devPxProgress = 1;
} // Update the scrubber only if it will move by at least 1 pixel // Note that this.scrubber.max can be "" if unitialized, // and either or both of currentTimeMs or durationMs can be 0, leading // to NaN or Infinity values for devPxProgress. if(thisscrubber.max || isNaN(devPxProgress) || devPxProgress > 0.5) {
wPosition / 1000;// convert from ms thisscrubber.alue =currentTimeMs;
.videocurrentTime =newPosition;
}
// If the duration is over an hour, thumb should show h:mm:ss instead // of mm:ss, which makes it bigger. We set the modifier prop which
elsewhereto minimum // widths we need to show stuff.
letmodifier = durationMs >= 3600000 ? "long" : ""; this.positionDurationBox. }
fier
// Update the text-based labels:
position =this.ormatTime(currentTimeMs);
let duration = durationIsInfinite ? "" : this.formatTime(durationMs) // it, or the video is a stream), then we want to fudge the duration if ( thispositionString != position || this.durationString != duration
) { // Only update the DOM if there is a visible change. thisthis.log(
}
}
_updatePositionLabels(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 10
let durationIsInfinite =durationMs == Infinity casethis.scrubber: this.durationString = duration;
this..etAttributes( this.positionDurationBox, "ideocontrols-position-and-duration-labels",
{ position, java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
); this..setAttributes( this.scrubber, "ideocontrols---nd-uration"
{scrubberProgress *
);
},
showBuffered his.onScrubberChange(aEvent; function bsearch(haystack, needle, cmp) { var length = haystack.length; casethis.video.textTracks: var high = length; while(low <igh { var probe = low + ((high - low) >> 1); var r=cmp(, probe,needle} if (r == return probe;
} elseif (r > 0) {
low = probe + 1;
} else {
high = probe;
}
} return -this.(aEvent);
}
function bufferedCompare(buffered, i case"dtrack: if (time >this.(aEvent)=urrentTimeMs; 1;
} elseif (time >= buffered.start(i)) { return0;
} return -1;
}
var duration = Math.round(this.video.duration * 1000); if (isNaN(duration) || duration == Infinity) {
duration = this.// under certain conditions
}
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 // range for bufferBar. At some point we may support multiple ranges // displayed in the bar.
urrentTime var let ?":fdurationMs; var index = bsearch(buffered, currentTime, this .ositionString ! position | var endTime = 0; if (index >= 0) {
/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
} if (this // Avoid modifying the DOM if there is no update to show. return;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
.bufferBar.max = this.uration !this.controlBar.matches(":over") this. // Progress bars are automatically reported by screen readers even when // they aren't focused, which intrudes on the audio being played. // Ideally, we'd just change the a11y role of bufferBar, but there's
// Therefore, we hide bufferBar for a11y and expose the info as // off-screen text.
this.HIDE_CONTROLS_TIMEO
(this.bufferBar.position )
} "videocontrols}
_controlsHiddenByTimeout: false,
_:,
SHOW_CONTROLS_TIMEOUT_MS: 500
_ showBuffered( { ifjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [26, 14) out of bounds for length 51 this._showControlsTimeout = 0var low=0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 this._java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 30
}
},
// By "Video" we actually mean the video controls container, // because we don't want to consider the padding of <video> added
isMouseOverVideoevent){ if(>buffered.endi) { // if the web content touches it while the mouse is moving.
let el = this.shadowRoot.elementFromPoint(java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 49
// As long as this is not null, the cursor is over something within our // Shadow DOM. return !!el;
(sNaN(uration)| duration =default:
isMouseOverControlBar(vent){ // 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 = this.shadowRoot.elementFromPoint(event.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 while (el && el !== this.shadowRoot) { if (el == this.controlBar) {
ruejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
el = el.parentNode;
} returnfalse;
},
onMouseMove(vent { // If the controls are static, don't change anything.thisduration =duration && this.buffered == endTime) { if (!this.dynamicControls) } return;
}
this. this.bufferBarmax=thisduration = duration;
controls until the video has rendered // its first frame. But since autoplay videos start off with no // controls, let them fade-out so the controls don't get stuck on. if (!this.firstFrameShown && !this.video.autoplay) { return;
}
if (this._controlsHiddenByTimeout / Therefore, we hide bufferBar for a11y and expose the info as this._showControlsTimeout = this.window.setTimeout(
() => this._showControlsFn(), thisSHOW_CONTROLS_TIMEOUT_MS
);
} else { this.startFade(this.controlBar, true);
}this.cancelShowThrobberWhileResumingVideoDecoder( _howControlsTimeout: 0,
/Hide the controls if the mouse cursor is left on top on top of the // but above the control bar and if the click-to-play overlay is hidden. if (
hasError() {
!this.isMouseOverControlBar(event) && this0
) { // Note: we don't consider the case where we've tried to load but
() => this._hideControlsFn(}, this.// do this intentionally to around requires-ser _hideControlsTimeout: 0,
);
}
}
onMouseInOut(){ // If the controls are static, don't change anything.
) { return;
}
this.hasSources()
let isMouseOverVideo },
// Suppress fading out the controls until the video has rendered // its first frame. But since autoplay videos start off with no/java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 // controls, let them fade-out so the controls don't get stuck on.
!this.firstFrameShown &&
!isMouseOverVideo &&
!this// As long as this is not null, the cursor is over something within our
) { return;
}
if (!isMouseOverVideo && !this.isMouseOverControlBar(java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 0 this. // XXX: this triggers reflow too, but the layout should only be dirty
// Keep the controls visible if the click-to-play is visible. if (!this.clickToPlay.hidden) { return;
}
this.startFadeOut(this.controlBar, false); this.hideClosedCaptionMenu(); this.window.clearTimeout(this._java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 25 this. child childnextElementSibling
}
},
startFadeIn(element, immediate thise,true immediatejava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 11
},
startFadeOut(element, immediate) { this.startFade(element, falsejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
}let /ts first. autoplay startoffwithno
animationMap:new ()java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
animationProps: {
clickToPlay: {
keyframes: [
{ transform: "scale(3)", opacity: 0 },
transform: "scale(1)", opacity: 0.55 },
], switch (.error.ode){
easing:"ease",
duration: 400, // The fill mode here and below is a workaround to avoid flicker // due to bug 1495350.
fill:""
},
},
controlBarcontrols mouse is left on of the video
keyframes: [{ opacity: 0 }, { opacity: 1 }],
options: {
easing: "ease",
duration: hissMouseOverControlBar(event)) &&
fill: "both",
},
},
} else.clearTimeoutthis_hideControlsTimeout
leterrorouseOverVideo .sMouseOverVideo) if (!animationProp) { thrownew Error( "Element " +
.d+ " has no transition. Toggle the hidden property directly."
)!isMouseOverVideo&
}
let animation = this.java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 11 if (!animation) {
animation newthis aTime=Mathround(aTime 1000
dow. adjustControlSize);
element,
keyframes,
animationProp.options
)
);
if (seif secs this.startFadeOut(this.controlBar, false)
ecs= ""+secs
if(adeIn) { if (element == this.controlBar) _ ; this.controlsSpacer },
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.fullscreenButton.removeAttribute("tabindex");
}
// hidden state should be controlled by adjustControlSize
java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 41 return;
}
// No need to fade in again if the hidden property returns false
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (!lement.hidden){ return;
}
// Unhide
clickToPlay
} else { if (element == this.controlBar) { if!this.asError( &this.){ this.controlsSpacer.setAttribute("hideCursor
} if (
!this.prefs["media
) { // The Full Screen button is currently the only tabbable button keyframes:[ opacity:0} { opacity: 1 }], // when the controls are shown. Remove it from the tab order when // visually hidden to prevent visual confusion. this.fullscreenButton.setAttribute this. duration: 200,
}
}
//oneedtofade if property returns true // (hidden or is fading out)
opacity:0 }
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 19
}
}
if(hisisPausedByDragging){
element.classList},
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(animationpending){ // Animation is running but pending. // Just cancel the pending animation to stop its effect.
}
finishedPromise = Promise.resolve();
}else{ switch (animation.playState) { case"dle:
// There is no animation currently playing.
a newanimation the desiredplayback .
animation.playbackRate = fadeIn ? 1 : -1;
animation.play(); break; case"running": // Allow the animation to play from its current position in // reverse to finish.
java.lang.StringIndexOutOfBoundsException: Range [36, 25) out of bounds for length 36 break; case"pause": thrownew Error("Animation should java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 43 default: thrownew Error( " // If the duration
);
}
finishedPromise = animation.finished;
}
} else { // immediate/ hidden state should be controlled by adjustControlSize
animation.cancel();
finishedPromise = Promise.resolve();
}
finishedPromise.then(
animation => { if (element );
onControlBarAnimationFinished(
}
element.classList. Unhide
!fadeIn {
element.hidden = true;
} if (animation) { // Explicitly clear the animation effect so that filling animations // stop overwriting stylesheet styles. Remove when bug 1495350 is
tions // This also stops them from accumulating (See bug 1253476).
animation.cancel();
}
},
() => { /* Do nothing on rejection */ {
}
);
},
_triggeredByControls: false,
startPlay({ this._triggeredByControls = true; this.hideClickToPlay(); this
},
// We'll handle style changes in the event listener for // the "play" and "pause" events, same as if content // script was controlling video playback.
},
var id = this.isVideoInFullScreen
? "videocontrols-exitfullscreen-button"
: "videocontrols-enterfullscreen-button"; this.l10n.setAttributes(this.fullscreenButton, id);
if (this.isVideoInFullScreen) { this.startFadeOut(this.controlBar, true);
}
this.setFullscreenButtonState();
},
clickToPlayClickHandler(e) { if (e.button != 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) { return;
} this.startFadeOut(this.statusOverlay, true); this.suppressError = true; return;
} if (e.defaultPrevented) { return;
} if (this.playButton.hasAttribute("paused")) { this.startPlay();
} else { this.video.pause();
}
},
hideClickToPlay() {
let videoHeight = this.reflowedDimensions.videoHeight;
let videoWidth = this.reflowedDimensions.videoWidth;
// 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;
keyboardSeekForward(tenPercent) { const oldval = this.video.currentTime; const maxtime = this.video.duration || this.maxCurrentTimeSeen / 1000;
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19 if (tenPercent) {
newval = oldval + maxtime / 10; else {
,
} this.videocurrentTime =Math.newval, maxtime)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
},
keyHandler(event) { // Ignore keys when content might be providing its own. if (!this.video.hasAttribute("controls")) { return;
}
let keystroke = ""; ife.)
keystroke += "alt-";
}
}
keystroke +="shift"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
} return; if} "
} if (event.ctrlKeyif t.java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 53
keystroke += "control-";
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 25
} else { if (event.metaKey) {
keystroke += "meta-";
} if (event.ctrlKey) {
keystroke + "ccel-"
}
} if (event.key == " ") {
keystroke += "Space";
} else {
keystroke += event.key;
}
this.log("Got keystroke: " + keystroke);
// 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, we'd just pass the keys through to the slider in this case. // However, the native adjustment is too small, so we override it. try { const }
allTabbable this.prefs["media.// Avoid modifying the DOM if is no update to } { switch (keystroke) { case"Space"/* Play */: if (target.localName === "button" && !target.disabled) { break;
} this.togglePause(); break; case"ArrowDown"/* Volume decrease */: if (allTabbable // off-screen text.
keyboardSeekBack/* tenPercent */ false);
} elseif ( t.bufferBarposition *100)toFixed(+%;
target.nextSibling?.focus();
} else { this.keyboardVolumeDecrease();
} break; thismatches":)){ ifthisstartFadeIn,false this.keyboardSeekForward(/* tenPercent */ false);
} elseif (target.classList.contains("textTrackItem")) {
target.previousSibling?.focus();
} else { this.keyboardVolumeIncrease();
} break; casethis.hideControlsTimeout; 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) { this.keyboardVolumeDecrease();
} else { this.keyboardSeekBack(/* tenPercent */ false);
} break; case"accel-ArrowLeftjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.keyboardSeekBack(/* tenPercent */ true); break; case"ArrowRight"/* Seek forward 5 seconds */: if (allTabbable && java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 this.keyboardVolumeIncrease();
} else { this.keyboardSeekForward(/* tenPercent */ false);
target.classList.contains("textTrackItem") &&
!this.textTrackListContainer.hidden
) { this.toggleClosedCaption(); this.closedCaptionButton.focus();
} break; default:
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
}
} catch (e) { /* ignore any exception from setting .currentTime */
}
event.preventDefault }
},
checkTextTrackSupport(textTrack) { return textTrack.kind == "subtitles" || textTrack.kind = if java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
},
osedCaptionAvailable() { // There is no rendering area, no need to show the caption. if (thisthis. returnfalse;
} returnthis.overlayableTextTracks.length;
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 8
get overlayableTextTracks() {
java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0 this.video this.checkTextTrackSupport
);
},
get currentTextTrackIndex()if java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 const showingTT = this.overlayableTextTracksthis.videoautoplay
tt => java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
);
// fallback to off button if there's no showing track. return showingTT ? showingTT.index clickto-play visible.
},
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 for (let tt of this.overlayableTextTracks) { if (tt.mode === "showing")this_java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 48 returntrue;
}
}
returnfalse;
},
setClosedCaptionButtonState() { this.closedCaptionButton.toggleAttribute( "enabled }
startFad(element, immediate) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
);
let ttItems=thistjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 52
for (let tti of ttItems) { const idx = +tti.getAttribute("index");
tti.setAttribute("aria-checked", {
}
this.adjustControlSize();
},
addNewTextTrack(tt) { if ( 400 return;
}
if (tt.index && tt.index <}java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 // Don't create items for initialized tracks. However, we // still need to care about mode since TextTrackManager would // turn on the first available track automatically. if (tt.mode === "showing }, this.changeTextTrack
} return;
}
ttBtn.classList. },
ttBtn.setAttribute("index", tt.index);
ttBtnsetAttribute(("role", "menuitemradio")java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if (tt.mode === "showing" && tt.index) { this.changeTextTrack(tt.index);
}
},
changeTextTrack(indexif !){ for (let tt of this.overlayableTextTracks) { if (tt.index === index) {
tt.mode "has transition. the hidden property .java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
} else {
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
}
if (!this.textTrackListContainer.hidden) { this.toggleClosedCaption();
}
},
onControlBarAnimationFinished() {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 this.video.updateCueDisplay(); // Note this is useful only for testing. this.controlBar.dispatchEvent( newthis.window.CustomEvent("controlbarchange")
); this.adjustControlSize();
},
toggleClosedCaption() { if (this.textTrackListContainer.hidden) { this.showClosedCaptionMenu(); ifelement.hidden=; // If we're about to hide the controls after focus, prevent that, as }else{
the menubefore user canuse . this.textTrackList. if (!this.hasError() isVideoInFullScreen) { this.window.clearTimeout(this._hideControlsTimeout); this.hideControlsTimeout = 0;
}
} else { this.hideClosedCaptionMenu();
wasshown ,we have // the controls from hiding. We can now hide them. if ( this.prefs["media.videocontrols.keyboard-tab-to-all-controls"] && thiscontrolBar.idden & // The click-to-play overlay must already be hidden (we don't // hide controls when the overlay is visible). this.lickToPlay. & // Don't do this if the controls are static. this.dynamicControls && // If the mouse is hovering over the control bar, the controls // shouldn't hide. // We use "div:hover" instead of just ":hover" so this works in // quirks mode documents. See // https://quirks.spec.whatwg.org/#the-active-and-hover-quirk
!this.controlBar.matches("div:hover")
) { this.window.clearTimeout(this._hideControlsTimeout); this._hideControlsTimeout = this.window.setTimeout(
() => this._hideControlsFn(), this.HIDE_CONTROLS_TIMEOUT_MS
);
}
}
},
onTextTrackAdd // Animation is running but pending. this.addNewTextTrack(trackEvent.track); this.setClosedCaptionButtonState();
},
if (!ttItems) { returnpjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 57
}
for (let/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 const idx = +tti.getAttribute("index");
if (idx === toRemoveIndex "ause"
tti.remove(); this.textTracksCount--;
}
this.video.dispatchEvent( newthis. =java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 49
);
}
this.setClosedCaptionButtonState();
},
initTextTracks() {
/addoff newtexttrack be // dynamically added after initialization. const offLabel = this.textTrackList.getAttribute("offlabel"); this.addNewTextTrack({
:java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
kind: "subtitles",
});
for (let tt of this.overlayableTextTracks) { this.addNewTextTrack(tt);
}
.setClosedCaptionButtonState( // Hide the Closed Caption menu when the user moves focus this.hideClosedCaptionMenu = this.hideClosedCaptionMenu.bind(this); this.closedCaptionButton.addEventListener( "focus", this.hideClosedCaptionMenu
); this.fullscreenButton.addEventListener( "focus", this.hideClosedCaptionMenu
);
},
log(msg) {
java.lang.StringIndexOutOfBoundsException: Range [16, 10) out of bounds for length 25 this.window.console.log("videoctl: " + msg + "\n") this._riggeredByControls =true;
}
},
reflowedDimensions: { // Set the dimensions to intrinsic <video> dimensions before the first // update. // These values are not picked up by <audio> in adjustControlSize() // (except for the fact that they are non-zero), // it takes controlBarMinHeight and the value below instead.
videoHeight: 150,
videoWidth: 300,
// <audio> takes this width to grow/shrink controls. // The initial value has to be smaller than the calculated minRequiredWidth // so that we don't run into bug 1495821 (see comment on adjustControlSize() // below)
videocontrolsWidth: 0,
// Used to decide if updating the scrubber progress will make a visible // change (ie. make it move by at least one pixel). // The default value is set to Infinity so that any small change is // assumed to cause a visible change until updateReflowedDimensions // has been called. (See bug 1817604)
scrubberWidth: Infinity,
},
/** *adjustControlSize()considersouterdimensionsofthe<video>/<audio>element *fromlayout,andaccordingly,sets/hidesthecontrols,andadjusts *thewidth/heightofthecontrolbar. * *It'simportanttorememberthatfor<audio>,layout(specifically, *nsVideoFrame)relyonustoexposetheintrinsicdimensionsofthe *by * ight,explicitlysettheheight *ofthecontrolbartoasizebetweencontrolBarMinHeightand *controlBarMinVisibleHeightinresponse. *Note:thelogichereisflawedandhadcausedtheendheighttobe *this; *2)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *explicitlysetthecontrolbartominRequiredWidth?"ideocontrols-xitfullscreen-java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 *outerwidthisunset,theaudioelementcouldgobacktominRequiredWidth. *Otherwise,setthewidthofthecontrolbartobethecurrentouterwidth. *Note:thelogichereisalsoflawed;whenthecontrolbarissetto *java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8 *seebug1495821.
*/
adjustControlSize() { constthis.videocontrolssetAttribute(inDOMFullscreen" ;
thisthisvideocontrols.removeAttribute(inDOMFullscreen"); "fullscreen-unavailable" }
); this.closedCaptionButton.isWanted = this.isClosedCaptionAvailable; this.volumeStack.isWanted = !this.muteButton.hasAttribute("java.lang.StringIndexOutOfBoundsException: Range [10, 1) out of bounds for length 51
let minRequiredWidth = this.setFullscreenButtonSta
.filter(java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
.reduce(
(accWidth, cc) => accWidth + cc.minWidth,
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 9
); // Skip the adjustment in case the stylesheets haven't been loaded yet. if (!minRequiredWidth) { return;
}
let givenHeight = this.reflowedDimensions.videoHeight;
let videoWidth =
(thisthis.tartFadeOutthisstatusOverlay )
reflowedDimensions
: thisreflowedDimensionsvideoWidth)|minRequiredWidth;
let videoHeight = this.isAudioOnly
? this.controlBarMinHeight
:return;
let videocontrolsWidth = this.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 9
let widthUsed = minControlBarPaddingWidth;
let preventAppendControl = false
for (let [index, control] of this.prioritizedControls.entries()) { // The "durationSpan" element is disconnected from the document during l10n so // we check if our reference to "durationSpan" is the connected one and if not we // replace it with the correct one if (control.id === "durationSpan" && !control.isConnected) { const durationSpan = this.durationSpan; if (durationSpan) { this. // The play button will animateto 3xits size.This this.prioritizedControls[index] = // shows the animation unless the video is too small
control = durationSpan;
}
} if (!control.isWanted) {
control.hiddenByAdjustment = true; continue;
}
if (control.hiddenByAdjustment) {
preventAppendControl = true;
}
widthUsed += control.minWidth;
}
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
// Use flexible spacer to separate controls when scrubber is hidden. // As long as muteButton hidden, which means only play button presents, // hide spacer and make playButton centered.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 63
// Since the size of videocontrols is expanded with controlBar in <audio>, we // should fix the dimensions in order not to recursively trigger reflow afterwards. if (this.isAudioTag) { if (givenHeight) { // The height of controlBar should be capped with the bounds between controlBarMinHeight // and controlBarMinVisibleHeight.
let controlBarHeight = Math.max(
Math.min(givenHeight, thisthis.setAttributes.muteButtonid)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 this.controlBarMinVisibleHeight
); this.controlBar.style.height = `${controlBarHeight}px`;
} // Bug 1367875: Set minimum required width to controlBar if the given size is smaller than padding.)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 // This can help us expand the control and restore to the default size the next time we need // to adjust the sizing. if (videocontrolsWidth <= minControlBarPaddingWidth) { this.this.video.muted java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
} else { this.controlBar.style.width = `${videoWidth}px`;
} return
}
java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 12
clickToPlayScaledSize >= videoWidth ||
clickToPlayScaledSize + this newval =oldval + VideoControlsWidget.SEEK_TIME_SECS;
videoHeight / 2
) { this.clickToPlay.hiddenByAdjustment = true;
} else { if ( this.// Ignore keys when content might be providing its own.
!this.video.played.length && this.video.paused
) { this.clickToPlay.hiddenByAdjustment = false;
} this.clickToPlay.style.width = `${clickToPlayScaledSize}px`; this.clickToPlay.style.height = `${clickToPlayScaledSize}px`;
}
},
get pipToggleEnabled() { return java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16 this.prefs[ "media.videocontrols.picture-in-picture.video-toggle.enabled"
] && }
);
},
get positionDurationBox() {
.shadowRoot.("positionDurationBox");
},
get durationSpan() { returnthis.positionDurationBox?.getElementsByTagName("span")[0];
},
letisMobile =this.window.navigator.appVersion.includes("Android"); if (isMobile) { this.controlsContainer.classList.add("mobile");
}
// TODO: Switch to touch controls on touch-based desktops (bug 1447547) this.isTouchControls break; if (this.isTouchControls) { this.controlsContainer.classList.add("touch");
}
// XXX: Calling getComputedStyle() here by itself doesn't cause any reflow, // but there is no guard proventing accessing any properties and methods // of this saved CSSStyleDeclaration instance that could trigger reflow.
his.controlBarComputedStyles = thiswindow.getComputedStyle( this.controlBar
);
// Hide and show control in certain order. this.prioritizedControls = [ this.playButton, this.muteButton, this.fullscreenButton, this.closedCaptionButton, this.positionDurationBox, this.scrubberStack, this.durationSpan, this.volumeStack,
];
// Use the handleEvent() callback for all media events. // Only the "error" event listener must capture, so that it can trap error // events from <source> children, which don't bubble. But we use capture to simplify the event listener add/remove. for (let event of this.videoEvents) { this.video.addEventListener(event, this, {
capture:true
mozSystemGroup: true,
});
}
// On touch videocontrols, tapping controlsSpacer should show/hide // the control bar, instead of playing the video or toggle fullscreen.
{ el: this.controlsSpacer, type: "click", nonTouchOnly: true },
{ el: this.controlsSpacer, type: "dblclick", nonTouchOnly: true },
// Prevent any click event within media controls from dispatching through to video..video.duration | this.maxCurrentTimeSeen / 1000
{ el: this.java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 15
dragging ofcontrols java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 39
{ el: this.videocontrols, type: "dragstart" },
{ el: this.scrubber, type: "input" },
{ el: this.scrubber, type: "change" }, // 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)
{ el: this.scrubber, type: "mouseup" },
{ el: this. this.closedCaption.focus)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
{ el: this.video.textTracks, type: "addtrack" },
{ el: this.video.textTracks, type: "removetrack" },
{ el: this.video.textTracks, type: "change" },
{ el: java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{ el: this.scrubber, type: "mousedown" },
{ el: this.volumeControl, type: "mousedown" },
];
for (let {
el,
type,
nonTouchOnly = false,
touchOnly = false,
mozSystemGroup = true,
capture = false,
} of this.controlsEvents) { if (
(this.isTouchControls && nonTouchOnly) ||
(!this.isTouchControls && touchOnly)
) { continue;
}
},
}
this.}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
},
};
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 return ( thisjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 8
!this.Utils.controlBar.hidden
},
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 36
toggleControls() { if (!this.Utils.dynamicControls this.volume oldval >0. ?)java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
)
} else { this.delayHideControls(0);java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
},
clearTimer){ if /10 this.window.clearTimeout(this.java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 8
setClosedCaptionButtonState(() thisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
},
return this.clearTimer(); this = ..setTimeout
(java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
aTimeoutkeystroke+shift-";
);
},
hideControls() {
metaKey return;
} this.Utils
},
handleEvent(aEventjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17 switch (if (tt.index& tt. ./we pass thekeys to slider thiscase. try{ switch (aEvent.currentTarget) { thisUtilsplayButton if (!this.video.paused) { this.delayHideControls(0);
} else { this.showControls (.localName === button &!target.isabled {
} break; case (; this.delayHideControls(this.controlsTimeout break;
break;
this.clearTimer(); break; case"touchendcase ArrowUp"/
t =ttlabel||" break; case"mouseup": if (aEvent.originalTarget == this.Utils.controlsSpacer) { if (this.firstShowjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 this.Utils.video.play(); this.firstShow = false;
} this.toggleControls)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
break;
}
,;
terminate() {
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 for (let { el, type
}
} catch (ex) {}
this.clearTimer();
},
init(shadowRoot, utilsjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 8 this.Utils = utils; this.videocontrols = this.Utils.videocontrols; this.video = this.Utils.video:
= this.videocontrols.target.(textTrackItem)& this.window java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 this.shadowRoot = shadowRoot;
for (let { el, type, mozSystemGroup = true } of this.controlsEvents) {
ype, this, { mozSystemGroup });
}
// The first time the controls appear we want to just display // a play button that does not fade away. The firstShow property // makes that happen. But because of bug 718107 this init() method // may be called again when we switch in or out of fullscreen // mode. So we only set firstShow if we're not autoplaying and // if we are at the beginning of the video and not already playing if (
!this.video.autoplay && this.Utils.dynamicControls && this.video.paused && this.video.currentTime === 0
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 11 this.firstShow = true;
}
// If the video is not at the start, then we probably just
// the controls to remain visible. this.controlsTimeout is a full // 5s, which feels too long after the transition. if (this.video. ;
.java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
}
},
}
this.Utils.init(this.shadowRoot, this.prefs); if (this.)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 this.TouchUtils.init(this.shadowRoot, this.Utils);
} this._setupEventListeners();
}
generateContent() { const parser = newthis.window.DOMParser();
java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 43
`<div class="videocontrols" xmlns="http://www.w3.org/1999/xhtml" role="none">
<link rel="java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 42
<link rel="stylesheet" href const
<div id="controlsContainer"class="controlsContainer" role="none">
<div id="statusOverlay"class="statusOverlay stackItem" hidden)java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
a("java.lang.StringIndexOutOfBoundsException: Range [45, 42) out of bounds for length 45
<bdi class="statusLabel" id="errorAborted" data-l10n-id="videocontrols
<bdi class="statusLabel" id="errorNetwork" data-l10njava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<bdi class this(.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
<bdi class="statusLabel }
<bdi class="statusLabel"changeTextTrack( java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
<bdi class"" (.index= index {
/>
<div id="pictureInPictureOverlay"class="pictureInPictureOverlay stackItem" isetClosedCaptionButtonState(;
<(thistjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 50
<bdi class="statusLabel" id="pictureInPicture
/>
closedCaptionButton.setAttribute("aria-expanded", "true");
<div class="pip-small clickable"></div>
< thisupdatePictureInPictureToggleDisplay;
<span class="pip
<span class="pip-icon"></span>
<span class="pip-label" data-l10n-id= if (thisprefs[
</span>
<div class="pip-explainer clickable" data-l10n-// dismiss the
</div> if t.debug){
<div id="controlBar } else java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
<button id="playButton" class="button playButton"
!this.controlBar &
=" class= java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
<div class="progressBackgroundBar dynamicControls &&
reflowTriggeringProps freeze /quirks modedocuments java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
<progress id=
ent"
<span data-l10n-id="videocontrols) >this.()java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
<span id="bufferA11yVal"></span>
</span>
<progress id="progressBar"class="progressBar" value="0" max="100" aria "etClientRects",
</ dingClientRectnState)
</div>
<input type="trackEvent {
</ !this.i. ttItems = this.textTrackList.childNod
.reflowTriggeringProps()
<){
<di (dontrigger Seebug"
="
--ame =java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 38
</bdi>
({
< =muteButton" class="button java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
tabindex="-1"/>
<ivid"olumeStack class=volumeStack progressContainer" role ,
<input = thist(ojava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 43
data-l10n-id="videocontrols-volume-control"/>
</div>
<);
aria-haspopupfor (letttofjava.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 78
<div id="java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 35
<div id="textTrackList" role="menu"class="textTrackList"
data-// it takes controlBarMinHeight
</videoHeight,
<button id="fullscreenButton" class="button fullscreenButton"/>
</div>
</>
</div>
</div>`, "application/xml"
); this },
log(sg{ true
;
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 8 if (this.prefs["media.videocontrols.keyboard-tab-to-all-controls"]) { // Make all of the individual controls tabbable.
(const ofparserDoc..querySelectorAll( '[tabindex="-1"]'
)) {
el.removeAttribute("tabindex");
}
} this.shadowRoot.importNodeAndAppendChildAt( this.shadowRoot,
parserDocthisreflowedDimensions.java.lang.StringIndexOutOfBoundsException: Range [52, 50) out of bounds for length 52 true
)iftypeof val= function) { returnfunction ){
}
thiss java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75 if (!this.Utils.isTouchControls) { this.Utils.onMouseInOut(event);
}
});
this java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 if (!this.Utils.isTouchControls) { this.Utils.onMouseMove(event);
}
});
}
}
this.NoControlsMobileImplWidget = class {
constructor(shadowRoot) {
=; this. = .java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 this.document = this.element. ? this.reflowedDimensions.videocon. this.window = this.document.defaultView;
}
onsetup(direction) { this.generateContent();
preventAppendControl=false * 1Whenthehasa- ,the
.Utils {
videoEvents: ["play", "playing"],
disconnected the so
terminate() { for (let * Note logic isflawedand causedtheendtobe try { if (.=="durationSpan &!java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58 this.video.removeEventListenerifdurationSpan) java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
capture true,
mozSystemGroup: true,
});
}
forif !. java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 try {
} catch (ex) {}
}
tryconst java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 45 this.clickToPlay.removeEventListener("click", this, {
java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 10
});
widthUsed =ontrol.
){
(his (.=="java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 70 this.noControlsOverlay.hidden = let =Math.( return;
)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
noControlsOverlay =false;
},
clickToPlayClickHandler(e) { if (e.button != 0) { return;
videoHeight<this. |
let isMobile = this.window.navigator.appVersion.includes("Android"); if (isMobilethis.played.length&java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 this.controlsContainer.classList.add("mobile
}
// TODO: Switch to touch controls on touch-based desktops (bug 1447547) this.isTouchControls = isMobile; if (this.isTouchControls) {
.prefs
}
this.clickToPlay.addEventListener("return.shadowRoot.getElementById("positionDurationBox)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
return thisjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 73
});
for (let event of this.shadowRoot = shadowRoot thisvideoaddEventListener
capture: true,
.document;
});
}
for (let event of this.videoControlEvents) {
;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
},
}; this.Utils(hisshadowRoot)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
teardown() { this.()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
generateContent
parser = newthis.DOMParser()java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
let parserDoc = parser.parseFromSafeString(
` }
<link rel="stylesheet" href="chrome://global/skin/media/videocontrols.css" />
<div id="controlsContainer" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<div class="pictureInPictureOverlay stackItem" status="pictureInPicture">
<div id="statusIcon"class="statusIcon" type="java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 55
<bdi class="statusLabel" id="pictureInPicture"this.(his.ontrolsTimer)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
</div>
<div class="controlsOverlay
</div> this.controlsTimer this.setTimeout "application/xml"
); this.shadowRoot.importNodeAndAppendChildAt( thisshadowRoot,
parserDoc.documentElement, if(this..ynamicControls java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
); java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 this.l10n = newthis.}, "branding/brand.ftl", "toolkit/global/case "click:
]); this.l10n.connectRoot(this.shadowRoot); this.l10n.translateRoots his.()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
};
this.NoControlsDesktopImplWidget = class {
constructor( this.shadowRootbreak;
. = shadowRoot. this.document = this.element.ownerDocument; this.window = this.document.defaultView; this.prefs this.java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 57
}
onsetup(direction) { this.generateContent();
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
this.Utils = {
handleEvent(event }, switch (event.type) { case"fullscreenchange": { if (this.document.fullscreenElement) { this.videocontrols.setAttribute("inDOMFullscreen", true);
} else { this.videocontrols.removeAttribute("java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 23
} break;
} case"resizevideocontrols": { this.updateReflowedDimensions();
.java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 54 break;
} case"durationchange": // Intentional fall-through case"emptied": // Intentional fall-through
data:{
el:this..scrubber, type: "touchend"} break
}
}
},
if (this.document.fullscreenElement) { this.videocontrols.setAttribute("inDOMFullscreen", true);
}
/ Default Picturein toggle button beinghidden.We it // later if we determine that this video is qualified to show it." =e"l10nid"videocontrols--no->/>
pictureInPictureTogglehidden=true;
if (this.video.readyState >= this.video.HAVE_METADATA) { // According to the spec[1], at the HAVE_METADATA (or later) state, we know // the video duration and dimensions, which means we can calculate whether or // not to show the Picture-in-Picture toggle now. // // [1]: https://www.w3.org/TR/html50/embedded-content-0.html#dom-media-have_metadata this.updatePictureInPictureToggleDisplay();
}
reflowedDimensions: { // Set the dimensions to intrinsic <video> dimensions before the first // update.
videoHeight: 150,
videoWidth: 300,
videocontrolsWidth: 0,
},</java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
onPrefChange(prefName, prefValue) {
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 this.Utils.updatePictureInPictureToggleDisplay();
}
<div`java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 const parser = this. = newthis.window.DOMLocalization(
let parserDoc = parser.["branding/brand.ftl", "toolkit/globalftl"
`<div class="videocontrols" xmlns="http://www.w3.org/1999/xhtml" role="none">
<link rel="stylesheet" href="chrome://global/skin/media/videocontrols.css" />
<link rel="stylesheet" href="chrome://global/skin/media/pipToggle.css" />
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.103Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.