code: function addMedia(mediaId, name, type, url){
      
      // close any previous media
      if (mediaPlaying)
          closeMedia();
          
      if (type != enums.media360.video && type != enums.media360.image){
  
          logger.warn('Media type not supported. Aborting addind media.');
          return;
      
      }
  
      if (type == enums.media360.video){
  
          timeManager.playVideo();
  
      }
  
      mediaPlaying = true;
      currentSession.addMedia(mediaId, name, type, url);
  
  }
docs: Adds media to the media list
  @memberof DataManager
  @param {string} mediaId Developer defined mediaId for the media
  @param {string} name Media name to be displayed to the analytics user
  @param {number} type Type of media 1 - Video, 2 - Photo
  @param {string} url Url for the media [optional]