message: fix(service): cache video data in an object within service
diff: @@ -84,6 +84,14 @@ function _loadScript() {
  document.body.appendChild(script);
  }
  +/**
  + *
  + * Object to cache video data
  + *
  + * @private
  + */
  +let videoData = {};
  +
  /**
  *
  * VideoPlayerAPI class with methods of checking script state and
  @@ -182,6 +190,9 @@ class VideoPlayerAPI {
  */
  static async api(videoId) {
  return await this.checkScript().then(() => {
  + if (videoData && videoData.id === videoId) {
  + return videoData;
  + } else {
  return new Promise(resolve => {
  return new root.kWidget.api({ wid: _partnerId }).doRequest(
  {
  @@ -190,10 +201,12 @@ class VideoPlayerAPI {
  entryId: videoId,
  },
  function(jsonObj) {
  + videoData = jsonObj;
  resolve(jsonObj);
  }
  );
  });
  + }
  });
  }
  