src/main.js
/**
 * Start/restart spying on MSE API calls.
 */
Start/restart spying on MSE API calls.
Start / restart spying on MSE API calls .
function start() {
  if (resetSpies) {
    resetSpies();
  }
  const resetSpyFunctions = [];
  const resetMediaSource = spyOnMediaSource();
  if (resetMediaSource) {
    resetSpyFunctions.push(resetMediaSource);
  }
  const resetSourceBuffer = spyOnSourceBuffer();
  if (resetSourceBuffer) {
    resetSpyFunctions.push(resetSourceBuffer);
  }
  resetSpies = function resetEverySpies() {
    resetSpyFunctions.forEach(fn => { fn && fn(); });
    resetSpyFunctions.length = 0;
    resetSpies = null;
  };
}
function start ( ) { if ( resetSpies ) { resetSpies ( ) ; } const resetSpyFunctions = [ ] ; const resetMediaSource = spyOnMediaSource ( ) ; if ( resetMediaSource ) { resetSpyFunctions . push ( resetMediaSource ) ; } const resetSourceBuffer = spyOnSourceBuffer ( ) ; if ( resetSourceBuffer ) { resetSpyFunctions . push ( resetSourceBuffer ) ; } resetSpies = function resetEverySpies ( ) { resetSpyFunctions . forEach ( fn => { fn && fn ( ) ; } ) ; resetSpyFunctions . length = 0 ; resetSpies = null ; } ; }
Start/restart spying on MSE API calls.
Start / restart spying on MSE API calls .