cloudinary-video-player 2.0.5 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/chapters.js +7 -7
  2. package/dist/chapters.light.js +7 -7
  3. package/dist/chapters.light.min.js +1 -1
  4. package/dist/chapters.min.js +1 -1
  5. package/dist/cld-video-player.css +5 -5
  6. package/dist/cld-video-player.js +3852 -1479
  7. package/dist/cld-video-player.light.css +5 -5
  8. package/dist/cld-video-player.light.js +2495 -901
  9. package/dist/cld-video-player.light.min.css +1 -1
  10. package/dist/cld-video-player.light.min.js +1 -1
  11. package/dist/cld-video-player.light.min.js.LICENSE.txt +1 -5
  12. package/dist/cld-video-player.min.css +1 -1
  13. package/dist/cld-video-player.min.js +1 -1
  14. package/dist/cld-video-player.min.js.LICENSE.txt +1 -5
  15. package/dist/debug.js +11 -11
  16. package/dist/debug.light.js +11 -11
  17. package/dist/debug.light.min.js +1 -1
  18. package/dist/debug.min.js +1 -1
  19. package/dist/ima.js +21 -9
  20. package/dist/ima.light.js +21 -9
  21. package/dist/ima.light.min.js +1 -1
  22. package/dist/ima.min.js +1 -1
  23. package/dist/interaction-areas.js +28 -28
  24. package/dist/interaction-areas.light.js +28 -28
  25. package/dist/interaction-areas.light.min.js +1 -1
  26. package/dist/interaction-areas.min.js +1 -1
  27. package/dist/playlist.js +40 -44
  28. package/dist/playlist.light.js +40 -44
  29. package/dist/playlist.light.min.js +1 -1
  30. package/dist/playlist.min.js +1 -1
  31. package/dist/recommendations-overlay.js +2 -2
  32. package/dist/recommendations-overlay.light.js +2 -2
  33. package/dist/recommendations-overlay.light.min.js +1 -1
  34. package/dist/recommendations-overlay.min.js +1 -1
  35. package/dist/shoppable.js +60 -50
  36. package/dist/shoppable.light.js +60 -50
  37. package/dist/shoppable.light.min.js +1 -1
  38. package/dist/shoppable.min.js +1 -1
  39. package/lib/all.js +1 -1
  40. package/lib/all.js.LICENSE.txt +1 -5
  41. package/lib/chapters.js +1 -1
  42. package/lib/cld-video-player.js +1 -1
  43. package/lib/cld-video-player.js.LICENSE.txt +1 -5
  44. package/lib/cld-video-player.min.css +2 -2
  45. package/lib/debug.js +1 -1
  46. package/lib/ima.js +1 -1
  47. package/lib/interaction-areas.js +1 -1
  48. package/lib/player.js +3 -0
  49. package/lib/player.js.LICENSE.txt +19 -0
  50. package/lib/playlist.js +1 -1
  51. package/lib/recommendations-overlay.js +1 -1
  52. package/lib/shoppable.js +1 -1
  53. package/lib/videoPlayer.js +1 -1
  54. package/lib/videoPlayer.js.LICENSE.txt +1 -5
  55. package/lib/videoPlayerWithProfile.js +1 -1
  56. package/lib/videoPlayerWithProfile.js.LICENSE.txt +1 -5
  57. package/package.json +32 -32
@@ -1,8 +1,4 @@
1
- /*!
2
- * Programatically add the following
3
- */
4
-
5
- /*! @name @videojs/http-streaming @version 3.12.0 @license Apache-2.0 */
1
+ /*! @name @videojs/http-streaming @version 3.13.1 @license Apache-2.0 */
6
2
 
7
3
  /*! @name aes-decrypter @version 4.0.1 @license Apache-2.0 */
8
4
 
package/lib/chapters.js CHANGED
@@ -1,2 +1,2 @@
1
- (self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(7938),a=r.n(s),i=r(8033);const o=function(){function t(t,e){return this.player=t,this.options=e,this.player.one("loadedmetadata",this.initializeChapters.bind(this)),this}return t.prototype.src=function(t){this.resetPlugin(),this.options=t,this.player.one("loadedmetadata",this.initializeChapters.bind(this))},t.prototype.detach=function(){this.resetPlugin()},t.prototype.resetPlugin=function(){this.chaptersTrack&&(this.player.$(".vjs-control-bar-chapter-display").remove(),this.player.$(".vjs-chapter-display").remove(),this.player.$$(".vjs-chapter-marker").forEach((t=>t.remove())),this.player.removeRemoteTextTrack(this.chaptersTrack),delete this.chaptersTrack)},t.prototype.getChaptersFileUrlByName=function(){const t=this.player.cloudinary.currentPublicId();if(!t)return null;const e=(0,i.KA)("".concat(t,"-chapters.vtt"),(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}));return"".concat(e,"?t=").concat(Date.now())},t.prototype.initializeChapters=async function(){const t=!0===this.options?this.getChaptersFileUrlByName():this.options.url;if(t){const e={kind:"chapters",src:t,default:!0},r=this.player.addRemoteTextTrack(e);r.addEventListener("load",(()=>{this.chaptersTrack=r.track,this.setupChaptersDisplays()}))}else if(Object.entries(this.options).length){const t=this.player.addRemoteTextTrack({kind:"chapters",default:!0});await new Promise((t=>setTimeout(t,100)));const e=this.player.duration();Object.entries(this.options).forEach(((r,s,a)=>{const i=new VTTCue(parseFloat(r[0]),parseFloat(a[s+1]?a[s+1][0]:e),r[1]);t.track.addCue(i)})),this.chaptersTrack=t.track,this.setupChaptersDisplays(),this.player.controlBar.chaptersButton&&this.player.controlBar.chaptersButton.update()}},t.prototype.setupChaptersDisplays=function(){this.setupProgressBarMarkers(),this.setupProgressBarChapter(),this.setupControlBarChapter()},t.prototype.setupControlBarChapter=function(){const t=this.player.$(".vjs-control-bar-chapter-display")||document.createElement("div");t.setAttribute("class","vjs-control-bar-chapter-display");const e=this.player.$(".vjs-control-bar .vjs-spacer");e.innerHTML="",e.classList.add("vjs-control-bar-chapter-wrapper"),e.appendChild(t),this.chaptersTrack.addEventListener("cuechange",(()=>{const e=Array.from(this.chaptersTrack.activeCues);t.innerText=e.length>0?e[0].text:""}))},t.prototype.setupProgressBarMarkers=function(){const t=this.player.duration(),{seekBar:e}=this.player.controlBar.progressControl;Array.from(this.chaptersTrack.cues).forEach((r=>{if(0!==r.startTime){const s=r.startTime/t*100+"%",i=a().dom.createEl("div",void 0,{class:"vjs-chapter-marker",style:"left: ".concat(s)});e.el().append(i)}}))},t.prototype.setupProgressBarChapter=function(){const t=a().dom.createEl("div",void 0,{class:"vjs-chapter-display",style:"max-width: ".concat(this.player.$(".vjs-vtt-thumbnail-display")?this.player.$(".vjs-vtt-thumbnail-display").style.width:"160px")}),e=this.player.getDescendant(["controlBar","progressControl","seekBar","mouseTimeDisplay"]),r=e.getDescendant(["timeTooltip"]);r.el().parentElement.prepend(t);const s=t=>{const e=t*this.player.duration(),r=Array.from(this.chaptersTrack.cues).find((t=>e>=t.startTime&&e<=t.endTime));return r?r.text:""};r.update=function(e,r,a){Object.getPrototypeOf(this).update.call(this,e,r,a),t.innerText=s(r)},"object"!=typeof this.player.vttThumbnails&&(e.update=function(e,s){const i=s*this.player_.duration(),o=e.width,n=t.clientWidth/2;r.updateTime(e,s,i,(()=>{e.width*s<n?this.el_.style.left="".concat(n,"px"):e.width*s+n>o?this.el_.style.left="".concat(e.width-n,"px"):this.el_.style.left="".concat(e.width*s,"px")})),r.write(a().time.formatTime(i))})},t}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
1
+ (self.cloudinaryVideoPlayerChunkLoading=self.cloudinaryVideoPlayerChunkLoading||[]).push([[625],{9234:(t,e,r)=>{r.d(e,{default:()=>n});var s=r(7938),a=r.n(s),i=r(8033);const o=function(){function t(t,e){return this.player=t,this.options=e,this.player.one("loadedmetadata",this.initializeChapters.bind(this)),this}return t.prototype.src=function(t){this.resetPlugin(),this.options=t,this.player.one("loadedmetadata",this.initializeChapters.bind(this))},t.prototype.detach=function(){this.resetPlugin()},t.prototype.resetPlugin=function(){this.chaptersTrack&&(this.player.$(".vjs-control-bar-chapter-display").remove(),this.player.$(".vjs-chapter-display").remove(),this.player.$$(".vjs-chapter-marker").forEach((t=>t.remove())),this.player.removeRemoteTextTrack(this.chaptersTrack),delete this.chaptersTrack)},t.prototype.getChaptersFileUrlByName=function(){const t=this.player.cloudinary.currentPublicId();return t?`${(0,i.KA)(`${t}-chapters.vtt`,(0,i.lP)(this.player.cloudinary.cloudinaryConfig(),{resource_type:"raw",version:"1"}))}?t=${Date.now()}`:null},t.prototype.initializeChapters=async function(){const t=!0===this.options?this.getChaptersFileUrlByName():this.options.url;if(t){const e={kind:"chapters",src:t,default:!0},r=this.player.addRemoteTextTrack(e);r.addEventListener("load",(()=>{this.chaptersTrack=r.track,this.setupChaptersDisplays()}))}else if(Object.entries(this.options).length){const t=this.player.addRemoteTextTrack({kind:"chapters",default:!0});await new Promise((t=>setTimeout(t,100)));const e=this.player.duration();Object.entries(this.options).forEach(((r,s,a)=>{const i=new VTTCue(parseFloat(r[0]),parseFloat(a[s+1]?a[s+1][0]:e),r[1]);t.track.addCue(i)})),this.chaptersTrack=t.track,this.setupChaptersDisplays(),this.player.controlBar.chaptersButton&&this.player.controlBar.chaptersButton.update()}},t.prototype.setupChaptersDisplays=function(){this.setupProgressBarMarkers(),this.setupProgressBarChapter(),this.setupControlBarChapter()},t.prototype.setupControlBarChapter=function(){const t=this.player.$(".vjs-control-bar-chapter-display")||document.createElement("div");t.setAttribute("class","vjs-control-bar-chapter-display");const e=this.player.$(".vjs-control-bar .vjs-spacer");e.innerHTML="",e.classList.add("vjs-control-bar-chapter-wrapper"),e.appendChild(t),this.chaptersTrack.addEventListener("cuechange",(()=>{const e=Array.from(this.chaptersTrack.activeCues);t.innerText=e.length>0?e[0].text:""}))},t.prototype.setupProgressBarMarkers=function(){const t=this.player.duration(),{seekBar:e}=this.player.controlBar.progressControl;Array.from(this.chaptersTrack.cues).forEach((r=>{if(0!==r.startTime){const s=r.startTime/t*100+"%",i=a().dom.createEl("div",void 0,{class:"vjs-chapter-marker",style:`left: ${s}`});e.el().append(i)}}))},t.prototype.setupProgressBarChapter=function(){const t=a().dom.createEl("div",void 0,{class:"vjs-chapter-display",style:`max-width: ${this.player.$(".vjs-vtt-thumbnail-display")?this.player.$(".vjs-vtt-thumbnail-display").style.width:"160px"}`}),e=this.player.getDescendant(["controlBar","progressControl","seekBar","mouseTimeDisplay"]),r=e.getDescendant(["timeTooltip"]);r.el().parentElement.prepend(t);const s=t=>{const e=t*this.player.duration(),r=Array.from(this.chaptersTrack.cues).find((t=>e>=t.startTime&&e<=t.endTime));return r?r.text:""};r.update=function(e,r,a){Object.getPrototypeOf(this).update.call(this,e,r,a),t.innerText=s(r)},"object"!=typeof this.player.vttThumbnails&&(e.update=function(e,s){const i=s*this.player_.duration(),o=e.width,n=t.clientWidth/2;r.updateTime(e,s,i,(()=>{e.width*s<n?this.el_.style.left=`${n}px`:e.width*s+n>o?this.el_.style.left=e.width-n+"px":this.el_.style.left=e.width*s+"px"})),r.write(a().time.formatTime(i))})},t}(),n=function(t,e){e.addClass("vjs-chapters"),e.chapters=new o(e,t)}}}]);
2
2
  //# sourceMappingURL=chapters.js.map