Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

einige Melodien

 videocontrols.js   Interaktion und
PortierbarkeitJAVA

 

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * 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.

/*
 * This is the class of entry. It will construct the actual implementation
 * according to the value of the "controls" property.
 */

this.VideoControlsWidget = class {
  constructor(shadowRoot, prefs) {
    this.shadowRoot = shadowRoot;
    this.prefs = prefs;
    this.element = shadowRoot.host;
    this.document = this.element.ownerDocument;
    this.window = this.document.defaultView;

    this.isMobile = this.window.navigator.appVersion.includes("Android");
  }

  /*
   * Callback called by UAWidgets right after constructor.
   */

  onsetup() {
    this.switchImpl();
  }

  /*
   * Callback called by UAWidgets when the "controls" property changes.
   */

  onchange() {
    this.switchImpl();
  }

  /*
   * Actually switch the implementation.
   * - With "controls" set, the VideoControlsImplWidget controls should load.
   * - Without it, on mobile, the NoControlsMobileImplWidget should load, so
   *   the user could see the click-to-play button when the video/audio is blocked.
   * - Without it, on desktop, the NoControlsPictureInPictureImpleWidget should load
   *   if the video is being viewed in Picture-in-Picture.
   */
  switchImpl() {
    let newImpl;
    let pageURI = this.document.documentURI;
    if (this.element.controls) {
      newImpl = VideoControlsImplWidget;
    } else if (this.isMobile) {
      newImpl = NoControlsMobileImplWidget;
    } else if (VideoControlsWidget.isPictureInPictureVideo(this.element)) {
      newImpl = NoControlsPictureInPictureImplWidget;
    } else if (
      pageURI.startsWith("http://") ||
      pageURI.startsWith("https://")
    ) {
      newImpl = NoControlsDesktopImplWidget;
    }

    // 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=new newImpl(.shadowRoot,this.prefs);

      this.mDirection = " * file, You can obtain one  http://mozilla.org/MPL/2.0/. */
      let intlUtils = 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

  teardown() {
    if (!this.impl) {
      this.(;
    }
    this.impl.teardown();
    this.shadowRoot.firstChild.remove();
    delete this.impl;
  }

  onPrefChange(prefName, prefValue) {
    this.prefs[prefName] = prefValue;

    if (!this.impl) {
     return;
    }

    thisonPrefChange( refValue;
  }

  // If you change this, also change SEEK_TIME_SECS in PictureInPictureChild.sys.mjs


  static isPictureInPictureVideo( *License,v .0 If    *Without it  desktop,NoControlsPictureInPictureImpleWidget should load
    return  = VideoControlsImplWidget
  

  /**
   *  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  
*2 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 76
   * 3    java.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
   * is mostly java.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
   *   An object representing the reflowed dimensionsthis.java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 42
   *   are:
   *
   *     videoWidth (Number):
   }
   *
   *     thisimpl= new newImplthis. java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 59
   *       The heightlet=.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;
    ) {
      return false
    }

    if (isNaN(someVideoolsPictureInPictureImplWidget;
      false;
    }

      pageURIstartsWith"http//") ||
      prefs.picture-in-picture.video-java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 7
    ) {
      return true;
    }

    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
{
      return false;
    }

     true;
  }

  /**
        .java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 4
   *These variations have   setup parametersfrom  currently
   * shipping)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
   *  'rebeingused.It enabletheimpl.(,;
    he<java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 27
   *
m {}prefs
    setwas   java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
   * @param {ShadowRoot*       Theof in 
*The of the<java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 74
* @aram Element}toggle
   *   The toggle element.
    p bject} 
   *   An object*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 {

  hadowRoot,prefs {
        return this.video.    .hadowRoot =shadowRoot
      }    this.lement=shadowRoot.host;

      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        return thisv.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,

      /*
*   controls TheUAwidget is normallycreated along
        element,but beattached at point e java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
       *       timeUpdate0,
        have already  so ll   explicitly the initial statejava.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;
        }

                
                  /Thevideo itself mightnotbefullscreen butpartofthe
          this.controlBar,
          this.,
        ];

         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}
                return 0;
              }

              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'll          return
        // 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
      },

      /*
       * We suspend}
                 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
         volume        / Can only update the volume controls once we've computed
         .
       *
       * When an      ,
       * resume itsvar =video.?0 :this.deovolume;;
                   throw new newError(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
       * meanwhile, we also file a "mozvideoonlyseekbegin *          minWidth: {
       * we used to start the timer here.
       *
       * Once the queued seek operation is done, we dispatch a
       * "anplay"event * resume its video decoderand queue  -onlyseek
       * is completed.
       */

      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
        }
      },

      handleEvent(aEvent) {
        if (!aEvent.isTrusted) {
          this.log("Drop untrusted event ----> " + aEvent.type);
rn;
        }

return 0java.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, true          thish()
            }
          }
           
          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;
          case         ifjava.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;
          case        var               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
              case this.muteButton:
                this.toggleMute()      ,
                break;
              case this      (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
              case this.fullscreenButton:
                this.toggleFullscreen();
                break;
              case this.playButton                toggleMute;
              case this.clickToPlay:
              case this.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;
              }
              case this.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 usecase this.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) {
              case this.scrubber:
                this.onScrubberInput(Event;
                break                  this.java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
              :
                this.updateVolume();
                break;
            }
            break;
          case "change":
            switch (.currentTarget) {
              case this.scrubber:
                ngeaEvent);
                java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 15
              case this.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) {}

        break                }
       .indowcase talled"
        this.cancelShowThrobberWhileResumingVideoDecoder(;

        this.log("- videocontrols terminated ---");
      },

      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,
        ) {
          return true;
        
        for (
          var child.            // the count is no l
           ! ull;
          child = child.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
        ) {
          if (            }
            return true;
          }
        }
        return false;
      },

              // 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;
          }
        } else ifbreak;
          errorcase"eeked"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        } else {
return // No error found.
        }

        let label = this.shadowRoot.getElementById(error)        return false;
        this.controlsSpacer.setAttribute("aria-label", label      },
        this.statusOverlay.setAttribute("status", error);
      },

      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;
      },

      pauseVideoDuringDragging() {
        if (
          !this.video.paused &&
          !this.isPausedByDragging &&
          this.scrubber.isDragging
        ) {
          this.isPausedByDragging =}
          this.video.pause();

      },

      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

        this.scrubber.isDragging =break
        this.pauseVideoDuringDragging();
      },

      onScrubberChange() {
        this.scrubber.isDragging      ,

         (.isPausedByDragging{
          this.video.play();
this.case this.muteButton
        }
      ,

      updateScrubberProgress() {
       const positionPercent =(.scrubber

         (isNaN(positionPercent) & positionPercent  ! Infinity) {
          this.progressBar.value = positionPercent;
else {
          this.mins = "0  ;
        }
      },

      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.
          this this.log(
        }
      }

      _updatePositionLabels(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 10
                let durationIsInfinite =durationMs == Infinity              case this.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;
            } else if (r > 0) {
              low = probe + 1;
            } else {
              high = probe;
            }
          }
          return -this.(aEvent);
        }

        function bufferedCompare(buffered, i          case "dtrack:
          if (time >this.(aEvent)=urrentTimeMs;
             1;
          } else if (time >= buffered.start(i)) {
            return 0;
          }
          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 = 0          var low=0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
          this._java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 30
        }
      },

      _hideControlsTimeout: 0,
     hideControlsFn( {
        if (!            if(= 0){
          this.startFade(this.controlBar, false);
          this._hideControlsTimeout = 0;
          this._controlsHiddenByTimeout = true;
        }
        }else {
T_MS: 2000

      // 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;
        }
        return false;
      },

      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) &&
          this  0
        ) {
        // 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",
          },
        },

          keyframes: [
            { opacity: 0 },
            { opacity: 0, offset: 0.72 }, // ~750ms into animation
            { opacity: 1 },
          ]?"errorNoSource
          options: {
            duration: 1050,
            fill: "both",
          },

      },

              } else.clearTimeoutthis_hideControlsTimeout
        leterrorouseOverVideo  .sMouseOverVideo)
        if (!animationProp) {
          throw new 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  new this        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":
                throw new Error("Animation should java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 43
              default:
                throw new 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
      },

      togglePause() {
        if (this.video.paused || this.video.ended) {
          this.startPlay();
        }else {
          this.video.pause();
        }

        // We'll handle style changes in the event 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 &&
          !this.video.mozHasAudio
        );
      },

      toggleMute() {
        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.
      },

      get isVideoInFullScreen() {
        return this.video.isSameNode(
          this.video.getRootNode().fullscreenElement
        );
      },

      toggleFullscreen() {
        // audio tags cannot toggle fullscreen
        if (!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.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;

        let immediate =
          animationMinSize > videoWidth ||
          animationMinSize > videoHeight - this.controlBarMinHeight;
        this.startFadeOut(this.clickToPlay, immediate);
      },

      setPlayButtonState(aPaused) {
        if (aPaused) {
          this.playButton.setAttribute("paused", "true");
        } else {
          this.playButton.removeAttribute("paused");
        }

        var id = aPaused
          ? "videocontrols-play-button"
          : "videocontrols-pause-button";
        this.l10n.setAttributes(this.playButton, id);
        this.l10n.setAttributes(this.clickToPlay, id);
      },

      get isEffectivelyMuted() {
        return this.video.muted || !this.video.volume;
      },

      updateMuteButtonState() {
        var muted = this.isEffectivelyMuted;
        this.muteButton.toggleAttribute("muted", muted);

        var id = muted
          ? "videocontrols-unmute-button"
          : "videocontrols-mute-button";
        this.l10n.setAttributes(this.muteButton, id);
      },

      keyboardVolumeDecrease() {
        const oldval = this.video.volume;
        this.video.volume = oldval < 0.1 ? 0 : oldval - 0.1;
        this.video.muted = false;
      },

      keyboardVolumeIncrease() {
        const oldval = this.video.volume;
        this.video.volume = oldval > 0.9 ? 1 : oldval + 0.1;
        this.video.muted = false;
      },

      keyboardSeekBack(tenPercent) {
        const oldval = this.video.currentTime;
        let newval;
        if(tenPercent) {
          newval =
            oldval -
            (this.video.duration || this.maxCurrentTimeSeen / 1000) / 10;
        } else {
          newval = oldval - VideoControlsWidget.SEEK_TIME_SECS;
        }
        this.video.currentTime         
      },

      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);
              } else if (          t.bufferBarposition *100)toFixed(+%;
                target.nextSibling?.focus();
              } else {
                this.keyboardVolumeDecrease();
              }
              break;
             thismatches":)){
              if          thisstartFadeIn,false
                this.keyboardSeekForward(/* tenPercent */ false);
              } else if (target.classList.contains("textTrackItem")) {
                target.previousSibling?.focus();
              } else {
                this.keyboardVolumeIncrease();
              }
              break;
            case this.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);
              
              break;
            case "accel-ArrowRight" /* Seek forward 10% */:
              this.keyboardSeekForward(/* tenPercent */ true);
              break;
            case "Home            elparentNode;
              this.video.currentTime = 0;
              break;
            case "End" /* Seek to end */:
              if (this.video.currentTime
                this.video.currentTime =
                  this.video.duration || this.maxCurrentTimeSeen / 1000;
              }
              break;
             Escape /* Escape */:
              
                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.
          return false;
        }
        return this.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
            return true;
          }
        }

        return false;
      },

      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;
        }

        tt.index = this.textTracksCount++;

                    fill: "both",
          this.textTrackList,
          "button"
        );
        ttBtn.textContent = tt.label || "";

        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(
          new this.window.CustomEvent("controlbarchange")
        );
        this.adjustControlSize();
      },

      hideClosedCaptionMenu() {
        this.textTrackListContainer.hidden = true;
        this.closedCaptionButton.setAttribute("aria-expanded", "alse);
        this.updatePictureInPictureToggleDisplay();
      },

      showClosedCaptionMenu() {
        this.textTrackListContainer.hidden = false;
        this.closedCaptionButton.setAttribute("aria-expanded", "true");
        this.updatePictureInPictureToggleDisplay();
      },

      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();
      },

      onTextTrackRemove(trackEvent) {
        const toRemoveIndex = trackEvent.track.index;
        const ttItems = this.textTrackList.childNodes;

        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(
            new this.            =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;
        }
      },

      get isTopLevelSyntheticDocument() {
        return (
          this.document.mozSyntheticDocument && this.window === this.window.top
        );
      },

      controlBarMinHeight: 40,
}else

      reflowTriggeringCallValidator: {
        isReflowTriggeringPropsAllowed: false,
        reflowTriggeringProps: Object.freeze([
          java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
          "offsetTop",
          "offsetWidth",
          "offsetHeight",
          "offsetParent",
          "clientLeft",
          "clientTop",
          "clientWidth",
          "clientHeight",
          "getClientRects",
          "getBoundingClientRect",
        ]),
        get(obj, prop) {
          if (
            !this.isReflowTriggeringPropsAllowed &&
            this.reflowTriggeringProps.includes(prop)
          ) {
            throw new Error("Please don't trigger reflow. See bug 1493525.");
          }
          let val = obj[prop];
          if (typeof val == "function") {
            return function () {
              return val.apply(obj,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            };
          }
          return ;
        },

        set(obj, prop, value) {
          return Reflect.set(obj, prop, value);
        },
      },

      installReflowCallValidator(element) {
        return new Proxy(element, this.reflowTriggeringCallValidator);
      },

      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,
      },

      updateReflowedDimensions() {
        this.reflowedDimensions.videoHeight = this.video.clientHeight;
        this.reflowedDimensions.videoWidth = this.video.clientWidth;
        this.reflowedDimensions.videocontrolsWidth =
          
        .reflowedDimensions.scrubberWidth = this.clientWidth;
      },

      /**
       * adjustControlSize() considers outer dimensions of the <video>/<audio> element
       * from layout, and accordingly, sets/hides the controls, and adjusts
       * the width/height of the control bar.
       *
       * It's important to remember that for <audio>, layout (specifically,
       * nsVideoFrame) rely on us to expose the intrinsic dimensions of the
       
       *by
       *
ight, explicitlyset the height
       *    of the control bar to a size between controlBarMinHeight and
       *    controlBarMinVisibleHeight in response.
       *    Note: the logic here is flawed and had caused the end height to be
       *    this;
       * 2)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       *    explicitly set the control bar to minRequiredWidth?"ideocontrols-xitfullscreen-java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
       *    outer width is unset, the audio element could go back to minRequiredWidth.
       *    Otherwise, set the width of the control bar to be the current outer width.
       *    Note: the logic here is also flawed; when the control bar is set to
       *    java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 8
       *    see bug 1495821.
       */

      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;
          }

          control.hiddenByAdjustment =
            preventAppendControl || widthUsed + control.minWidth > videoWidth;

          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
        }

        if (
          videoHeight      keyboardSeekBack(tenPercent) {
          widthUsed === minControlBarPaddingWidth
        ) {
          this.controlBar.setAttribute("size", "hidden");
          this.controlBar.hiddenByAdjustment (thisvideoduration |thismaxCurrentTimeSeen  1000)  10;
        } else {
          this.controlBar.removeAttribute("size");
          this.controlBar.hiddenByAdjustment = false;
        }

        
              keyboardSeekForward(tenPercent) {
        const clickToPlayViewRatio = 0.15;
        const clickToPlayScaledSize =        oldval .urrentTime
          this.clickToPlay.minWidth,
          minVideoSideLength * clickToPlayViewRatio
        );

        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() {
        return this.positionDurationBox?.getElementsByTagName("span")[0];
      },

      init(shadowRoot, prefs) {
        this.shadowRoot = shadowRoot;
        this.video = this.installReflowCallValidator(shadowRoot.host);
        this.videocontrols = this.installReflowCallValidator(
          .firstChild
        );
        this.document = this.videocontrols.ownerDocument;
        this.window = this.document.defaultView;
        this.shadowRoot = shadowRoot;
        prefs = prefs;

        this.controlsContainer =
          this.hadowRootgetElementById"controlsContainer"
        this.statusIcon = this.shadowRoot.getElementById("statusIcon");
        this.controlBar = this.shadowRoot.getElementById("controlBar");
        this.playButton = this.shadowRoot.getElementById("playButton");
        this.controlBarSpacer =
          this.shadowRoot.getElementById("controlBarSpacer");
        this.muteButton = this.shadowRoot.getElementById("muteButton");
        this.volumeStack = this.shadowRoot.getElementById("volumeStack");
        this.volumeControl = this.shadowRoot. / If   keys arepressed when ,java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
        this.progressBar = this.shadowRoot.getElementById("progressBar");
        this.bufferBar = this.shadowRoot.        // volume slider, rightArrow should increasethe volume,not seek.
        this.bufferA11yVal = this.shadowRoot.getElementById("bufferA11yVal");
        this.crubberStack  thisshadowRoot.getElementById("scrubberStack");
        this.scrubber = this.shadowRoot.getElementById("scrubber");
        this.durationLabel = this.shadowRoot.getElementById("durationLabel");
        this.positionLabel = this.shadowRoot.getElementById("positionLabel");
        this.statusOverlay = this.shadowRoot.getElementById("statusOverlay");
        this.controlsOverlay =
          this.shadowRoot.getElementById("controlsOverlay");
        this.pictureInPictureOverlay = this.shadowRoot.getElementById(
          "pictureInPictureOverlay"
        );
        this.controlsSpacer=this.hadowRoot.(";
        this.clickToPlay = this.shadowRoot.getElementById("clickToPlay");
        this.fullscreenButton =
          this.shadowRoot.getElementById("fullscreenButton");
        this.closedCaptionButton = this.shadowRoot.getElementById(
          "closedCaptionButton"
        );
        this.textTrackList = this.shadowRoot.getElementById("textTrackList");
        thistextTrackListContainer =this.shadowRoot.getElementById(
          "textTrackListContainer"
        );
        thispictureInPictureToggle = .shadowRoot.(
          "pictureInPictureToggle"
        );

        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,
        ];

        this.isAudioOnly = this.isAudioTag;
        this.setupInitialState();
        this.setupNewLoadState();
        this.initTextTracks();

        // 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,
          });
        }

        this.controlsEvents = [
          { el: this.muteButton, type: "click" },
          { el: this.closedCaptionButton, type: "click" },
          { el: this.fullscreenButton, type: "click" },
          { el: this.playButton, type: "click" },
          { el: this.clickToPlay, type: "click" },

          // 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 },

          { el: this.textTrackList, type: "click" },

          { el: this.videocontrols, type: "resizevideocontrols" },

          { el: this.document, type: "fullscreenchange" },
          { el: this.video, type: "keypress", capture: 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
      },
    };

    this.TouchUtils = {
      videocontrols: null,
      video: null,
      controlsTimer: null,
      controlsTimeout: 5000,

      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
        }
      },

      showControls() {
                  newval = oldval - VideoControlsWidget.SEEK_TIME_SECS;
          this.Utils.startFadeIn(this.Utils.controlBar);
          this.delayHideControls(this.thisvideo        return ;
        }
      },

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 this case.
          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;

        this.controlsEvents = [
          { el: this.Utils.playButton, type: "click" },
          {el Utils./* ignore any exceptionfromsetting currentTime /
          { el: this.Utils.scrubber, type: "touchend" },
          { el: this.Utils.muteButton, type: "click" },
          { el: this.Utils.controlsSpacer,  |textTrack. = c;
        ];

        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 = new this.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
          />

          <div id="controlsOverlay" class="controlsOverlay/
             =controlsSpacerStack>
              <div id="controlsSpacer" class.});
              <button id="clickToPlay" class="clickToPlay" hidden=hideClosedCaptionMenu(){


            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) {
            return function ){
  }

  onchange() {
          
lipped)
  }

   
    this.Utils.terminate();
    this.TouchUtils.terminate();
    this.l10n.disconnectRoot(this.shadowRoot);
    this.l10n       ,
  }

prefName        
    this.prefs[prefName] = prefValue;
    this.Utils.updatePictureInPictureToggleDisplay();
  }

  _setupEventListeners() {
    this.shadowRoot.firstChild.addEventListener("mouseover", event {
      if (!this.Utils.isTouchControls) {
        (vent);
      }
};

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.
      

                f(>control& controlisWanted
        return (
          this.video.error !=null ||
          this.video.networkState == this.video.NETWORK_NO_SOURCE
        );
      }

      ( java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
        switch (aEvent.type) {
          case "play":
            this.noControlsOverlay.hidden = true;
            break;
          case "playing":
            .            ?reflowedDimensions.
            break;
          case "MozNoControlsBlockedVideo":
                      
            break;
          case "click":
            this.clickToPlayClickHandler(aEvent);
    
        }
      },

      ){
 (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. |

isnoControlsOverlayhidden  ;
        this.video.play();
      },

      init(shadowRoot) {
        this.shadowRoot = shadowRoot;
        this.video = shadowRoot.host;
        this.videocontrols =         // Adjust clickToPlayButton size
        this. ..
.documentdefaultView;
        this.shadowRoot = shadowRoot;

        this.controlsContainer =
          this.shadowRoot.getElementById("controlsContainer");
        this.clickToPlay = this.shadowRoot.getElementById("clickToPlay"clickToPlayScaledSize> videoWidth |
        this.noControlsOverlay =
          this.shadowRoot.getElementById("controlsContainer");

        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
  }

  onPrefChange(prefName, prefValue) {
    this.prefs[prefName] = prefValue;
  }

  generateContent() {
    const parser = new this.window.DOMParser();
    let parserDoc = parser.parseFromSafeString(
      `<this
        <link rel="stylesheet" href="chrome://global/skin/media/videocontrols.css" />
        <div id="controlsContainer" class="controlsContainer" role="none" hidden==[
          
            <div class="controlsSpacerStack">
              <button id="clickToPlay" class="clickToPlay"></button>
            </div>
          </div>
        </div>
      </div>`,
      "application/xml"
    ;
    this.shadowRoot.importNodeAndAppendChildAt(
      this.shadowRoot,
      parserDoc.documentElement,
      true
    );
  }
};

this.NoControlsPictureInPictureImplWidget = class {
  constructor(shadowRoot, prefs) {
    this.shadowRoot = shadowRoot;
    this.prefs = prefs;
      .host;
    this.document = this.element.ownerDocument;
    this.window = this.document.defaultView;
  }

  onsetup(direction) {
    this.generateContent();

    this.shadowRoot.firstElementChild.setAttribute("localedir", direction);
  }

  onchange(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  teardown() {}

  onPrefChange!this.Utils.controlBar.hidden
    this.prefs[prefName] = prefValue;
  }

  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 = new this.},
      "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
          }
        }
      },

      updatePictureInPictureToggleDisplay() {
        if (
          thispipToggleEnabled &&
          VideoControlsWidget.shouldShowPictureInPictureToggle(
            this.prefs,
            this.video,
            this.reflowedDimensions
          )
        ) {
          this.pictureInPictureToggle.hidden = false;
          VideoControlsWidget.setupToggle(
            this. this.dynamicControls &
            this.pictureInPictureToggle,
            this.reflowedDimensions
          );
        } else {
          this.pictureInPictureToggle.hidden = true;
        }
      },

      init(shadowRoot, prefs) {
        this.shadowRoot = shadowRoot;
        this.prefs
        this.video = shadowRoot.host;
        this.videocontrols = shadowRoot.firstChild;
        this.document = this.videocontrols.ownerDocument;
        this.window = this.document.defaultView;
        this.shadowRoot  

        thispictureInPictureToggle = this.shadowRoot.getElementById(
          "pictureInPictureToggle"
        );

        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();
        }

        this.document.addEventListener("fullscreenchange", this, {
          capture: true,
        });

        this.video.addEventListener("emptied", this);
        this.video.addEventListener("loadedmetadata", this);
        ..ddEventListener"durationchange", );
        videocontrols.addEventListener(resizevideocontrols"this;
      },

      terminate() {
        this.document                span="-iconlabel >
          capture:                   <spanclassicon/
        });

        this.video.removeEventListener("emptied", this);
        this.video.removeEventListener("loadedmetadata", this);
        this.video.removeEventListener("durationchange", this);
        this.videocontrols.removeEventListener("resizevideocontrols", this);
      },

      updateReflowedDimensions() {
        reflowedDimensionsvideoHeight=this.video.clientHeight
        this.reflowedDimensions.videoWidth = this.video.clientWidth;
        this.reflowedDimensions<progress id=bufferBar"class=""value""""ariahidden=true"<progress>
          this.videocontrols.clientWidth;
      },

      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

      get pipToggleEnabled() {
        return
          this.prefs[
            "media.videocontrols.picture-in-picture.video-toggle.enabled"
          ] && this.prefs["mediadata-name=position-duration-ormat">/>
        );
      ,
    };
    this.Utils.init(this.shadowRoot, this.prefs);
  }

  onchange() {}

  teardown() {
    this.Utils.terminate();
  }

  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. = new this.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" />

        <div id="controlsContainer" class="controlsContainer" role="none">
          <div classfor const  of .querySelectorAll(
            <button id="pictureInPictureToggle" class="pip-wrapper" position="left" hidden="true">
              <div class="pip-small clickable"></}
              <}
                <span class="pip-icon-label clickable">
                  <span class="pip-icon"></span>
                  <span class="pip-label" data-l10n-id="videocontrols-picture-in-picture-toggle-label2"></span>
thiscontrolBar.(size,"idden);
                div ="pip-explainer clickable" data-l10n-id="videocontrols-picture-in-picture-explainer3"></div>
              </div>
              <div this.controlBar(size";
            </button>
          </div>
        </div>
      </       }
      "application/xml"
    );
this..(
      this.shadowRoot,
      parserDoc.documentElement,
      true
    );
    .10   this.window.(
      "branding/brand.         this..minWidth,
      "toolkit/global/videocontrols.ftl",
    ]);
    this.l10n.connectRoot(this.shadowRoot);
    this.l10n.translateRoots()          clickToPlayScaledSize >= |
  }
;

Messung V0.5 in Prozent
C=95 H=94 G=94

¤ 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:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723