function viralizeVPTMock() {
      const callbacks = {};

      win.vpt = win.vpt || {};
      win.vpt.EVENTS = {
        PLAYER_READY: 'VPT-EVENT::PLAYER_READY',
      };
      win.vpt.queue = win.vpt.queue || [];
      win.vpt.on = (callbackCfg, callback) => {
        if (callbacks[callbackCfg.event] == null) {
          callbacks[callbackCfg.event] = [];
        }
        callbacks[callbackCfg.event].push(callback);
      };
      win.vpt.queue.forEach(function (fn) {
        fn();
      });
      win.vpt.queue = {
        push: function (fn) {
          fn();
        },
      };

      return (event) => {
        if (callbacks[event] == null) {
          return;
        }
        callbacks[event].forEach(function (callback) {
          callback();
        });
        callbacks[event] = null;
      };
    }
/**
     * Mock VPT, the Viralize player API
     *
     * @returns a function that can be invoked to simulate an
     *          event emitted by Viralize script
     */
Mock VPT, the Viralize player API
@returns a function that can be invoked to simulate an
event emitted by Viralize script
Mock VPT the Viralize player API @returns a function that can be invoked to simulate an event emitted by Viralize script
function viralizeVPTMock() {
      const callbacks = {};
      win.vpt = win.vpt || {};
      win.vpt.EVENTS = {
        PLAYER_READY: 'VPT-EVENT::PLAYER_READY',
      };
      win.vpt.queue = win.vpt.queue || [];
      win.vpt.on = (callbackCfg, callback) => {
        if (callbacks[callbackCfg.event] == null) {
          callbacks[callbackCfg.event] = [];
        }
        callbacks[callbackCfg.event].push(callback);
      };
      win.vpt.queue.forEach(function (fn) {
        fn();
      });
      win.vpt.queue = {
        push: function (fn) {
          fn();
        },
      };
      return (event) => {
        if (callbacks[event] == null) {
          return;
        }
        callbacks[event].forEach(function (callback) {
          callback();
        });
        callbacks[event] = null;
      };
    }
function viralizeVPTMock ( ) { const callbacks = { } ; win . vpt = win . vpt || { } ; win . vpt . EVENTS = { PLAYER_READY : 'VPT-EVENT::PLAYER_READY' , } ; win . vpt . queue = win . vpt . queue || [ ] ; win . vpt . on = ( callbackCfg , callback ) => { if ( callbacks [ callbackCfg . event ] == null ) { callbacks [ callbackCfg . event ] = [ ] ; } callbacks [ callbackCfg . event ] . push ( callback ) ; } ; win . vpt . queue . forEach ( function ( fn ) { fn ( ) ; } ) ; win . vpt . queue = { push : function ( fn ) { fn ( ) ; } , } ; return ( event ) => { if ( callbacks [ event ] == null ) { return ; } callbacks [ event ] . forEach ( function ( callback ) { callback ( ) ; } ) ; callbacks [ event ] = null ; } ; }
Mock VPT, the Viralize player API
 @returns a function that can be invoked to simulate an
          event emitted by Viralize script
Mock VPT the Viralize player API @returns a function that can be invoked to simulate an event emitted by Viralize script