createObjectURL(object) {
    let objectUrlPrefix = 'blob:vjs-media-source/';
    let url;

    // use the native MediaSource to generate an object URL
    if (object instanceof HtmlMediaSource) {
      url = window.URL.createObjectURL(object.nativeMediaSource_);
      object.url_ = url;
      return url;
    }
    // if the object isn't an emulated MediaSource, delegate to the
    // native implementation
    if (!(object instanceof FlashMediaSource)) {
      url = window.URL.createObjectURL(object);
      object.url_ = url;
      return url;
    }

    // build a URL that can be used to map back to the emulated
    // MediaSource
    url = objectUrlPrefix + urlCount;

    urlCount++;

    // setup the mapping back to object
    videojs.mediaSources[url] = object;

    return url;
  }
/**
   * A wrapper around the native createObjectURL for our objects.
   * This function maps a native or emulated mediaSource to a blob
   * url so that it can be loaded into video.js
   *
   * @link https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
   * @param {MediaSource} object the object to create a blob url to
   */
A wrapper around the native createObjectURL for our objects.
This function maps a native or emulated mediaSource to a blob
url so that it can be loaded into video.js


A wrapper around the native createObjectURL for our objects . This function maps a native or emulated mediaSource to a blob url so that it can be loaded into video . js
createObjectURL(object) {
    let objectUrlPrefix = 'blob:vjs-media-source/';
    let url;
    if (object instanceof HtmlMediaSource) {
      url = window.URL.createObjectURL(object.nativeMediaSource_);
      object.url_ = url;
      return url;
    }
    if (!(object instanceof FlashMediaSource)) {
      url = window.URL.createObjectURL(object);
      object.url_ = url;
      return url;
    }
    url = objectUrlPrefix + urlCount;
    urlCount++;
    videojs.mediaSources[url] = object;
    return url;
  }
createObjectURL ( object ) { let objectUrlPrefix = 'blob:vjs-media-source/' ; let url ; if ( object instanceof HtmlMediaSource ) { url = window . URL . createObjectURL ( object . nativeMediaSource_ ) ; object . url_ = url ; return url ; } if ( ! ( object instanceof FlashMediaSource ) ) { url = window . URL . createObjectURL ( object ) ; object . url_ = url ; return url ; } url = objectUrlPrefix + urlCount ; urlCount ++ ; videojs . mediaSources [ url ] = object ; return url ; }
A wrapper around the native createObjectURL for our objects.
A wrapper around the native createObjectURL for our objects .
// use the native MediaSource to generate an object URL // if the object isn't an emulated MediaSource, delegate to the // native implementation // build a URL that can be used to map back to the emulated // MediaSource // setup the mapping back to object