j1-template 2024.3.14 → 2024.3.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/amplitude.html +111 -58
  3. data/assets/data/cookieconsent.html +8 -8
  4. data/assets/data/panel.html +4 -3
  5. data/assets/data/speak2me.html +11 -11
  6. data/assets/data/translator.html +29 -29
  7. data/assets/theme/j1/adapter/js/amplitude.js +112 -88
  8. data/assets/theme/j1/adapter/js/j1.js +4 -4
  9. data/assets/theme/j1/adapter/js/masonry.js +2 -2
  10. data/assets/theme/j1/adapter/js/themes.js +42 -4
  11. data/assets/theme/j1/adapter/js/videojs.js +212 -0
  12. data/assets/theme/j1/core/css/icon-fonts/mdib.css +24 -4
  13. data/assets/theme/j1/core/css/icon-fonts/mdib.css.map +1 -1
  14. data/assets/theme/j1/core/css/icon-fonts/mdib.min.css +1 -1
  15. data/assets/theme/j1/core/css/icon-fonts/mdib.min.css.map +1 -1
  16. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css +9 -6
  17. data/assets/theme/j1/core/css/themes/unolight/bootstrap.css.map +1 -1
  18. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  19. data/assets/theme/j1/core/css/themes/unolight/bootstrap.min.css.map +1 -1
  20. data/assets/theme/j1/core/js/template.js +262 -275
  21. data/assets/theme/j1/core/js/template.min.js +7 -7
  22. data/assets/theme/j1/core/js/template.min.js.map +1 -1
  23. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.css +131 -24
  24. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/amplitude.min.css +1 -1
  25. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.css +102 -76
  26. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/compact.min.css +1 -1
  27. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.css +109 -78
  28. data/assets/theme/j1/modules/amplitudejs/css/theme/uno/dark/player/large.min.css +1 -1
  29. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/artist.svg +78 -0
  30. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/mute.svg +52 -20
  31. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/next.svg +20 -39
  32. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/now-playing.svg +24 -38
  33. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-hide.svg +85 -0
  34. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-music.svg +85 -0
  35. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist-show.svg +85 -0
  36. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/playlist.svg +85 -0
  37. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/previous.svg +18 -37
  38. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-backward.svg +33 -30
  39. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/skip-forward.svg +33 -29
  40. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/next.svg +55 -14
  41. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/small/previous.svg +56 -14
  42. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/volume.svg +38 -21
  43. data/assets/theme/j1/modules/amplitudejs/js/amplitude.map +20 -20
  44. data/assets/theme/j1/modules/amplitudejs/js/tech/youtube_example.js +211 -0
  45. data/assets/theme/j1/modules/gemini/js/gemini.js.map +1 -1
  46. data/assets/theme/j1/modules/jquery/js/jquery.min.map +1 -1
  47. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.js +206 -122
  48. data/assets/theme/j1/modules/videojs/assets/icons/custom-icons/next.svg +82 -0
  49. data/assets/theme/j1/modules/videojs/css/font/README.md +151 -0
  50. data/assets/theme/j1/modules/videojs/css/font/VideoJS.svg +150 -0
  51. data/assets/theme/j1/modules/videojs/css/font/video-js-cdn.css +2012 -0
  52. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.0.css +32 -0
  53. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.1.css +31 -0
  54. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.css +31 -0
  55. data/assets/theme/j1/modules/videojs/css/plugins/controls/skipbuttons.min.css +21 -0
  56. data/assets/theme/j1/modules/videojs/css/themes/uno.css +14 -3
  57. data/assets/theme/j1/modules/videojs/css/themes/uno.min.css +1 -1
  58. data/assets/theme/j1/modules/videojs/css/videojs.css +1 -0
  59. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/LICENSE +13 -0
  60. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/README.md +75 -0
  61. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.js +149 -0
  62. data/assets/theme/j1/modules/videojs/js/plugins/controls/autocaption/autocaption.min.js +21 -0
  63. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/README.md +76 -30
  64. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.js +64 -53
  65. data/assets/theme/j1/modules/videojs/js/plugins/controls/hotkeys/hotkeys.min.js +1 -1
  66. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/README.md +133 -0
  67. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.js +137 -0
  68. data/assets/theme/j1/modules/videojs/js/plugins/controls/skipbuttons/skipbuttons.min.js +21 -0
  69. data/assets/theme/j1/modules/videojs/js/plugins/controls/zoom/zoom.js +15 -12
  70. data/assets/theme/j1/modules/videojs/js/plugins/players/dm/dailymotion.js +2 -2
  71. data/assets/theme/j1/modules/videojs/js/plugins/players/yt/youtube.js +43 -16
  72. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/fastfilereaderext.so +0 -0
  73. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.3/rubyeventmachine.so +0 -0
  74. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/fastfilereaderext.so +0 -0
  75. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/3.4/rubyeventmachine.so +0 -0
  76. data/lib/j1/version.rb +1 -1
  77. data/lib/j1_app/j1_auth_manager/config.rb +0 -4
  78. data/lib/starter_web/Gemfile +45 -22
  79. data/lib/starter_web/README.md +5 -5
  80. data/lib/starter_web/_config.yml +4 -6
  81. data/lib/starter_web/_data/modules/amplitude.yml +67 -37
  82. data/lib/starter_web/_data/modules/defaults/amplitude.yml +1 -0
  83. data/lib/starter_web/_data/modules/defaults/gallery.yml +42 -0
  84. data/lib/starter_web/_data/modules/defaults/videojs.yml +107 -0
  85. data/lib/starter_web/_data/modules/gallery.yml +30 -14
  86. data/lib/starter_web/_data/modules/lazyLoader.yml +8 -8
  87. data/lib/starter_web/_data/modules/masonry.yml +15 -0
  88. data/lib/starter_web/_data/modules/masterslider.yml +6 -6
  89. data/lib/starter_web/_data/modules/videojs.yml +57 -0
  90. data/lib/starter_web/_data/resources.yml +9 -26
  91. data/lib/starter_web/_data/templates/feed.xml +1 -1
  92. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +1 -0
  93. data/lib/starter_web/_plugins/asciidoctor/carousel-block.rb +2 -1
  94. data/lib/starter_web/_plugins/asciidoctor/dailymotion-block.rb +4 -1
  95. data/lib/starter_web/_plugins/asciidoctor/lightbox-block.rb +1 -1
  96. data/lib/starter_web/_plugins/asciidoctor/masterslider-block.rb +1 -1
  97. data/lib/starter_web/_plugins/asciidoctor/slick-block.rb +2 -1
  98. data/lib/starter_web/_plugins/asciidoctor/videojs-block.rb +145 -24
  99. data/lib/starter_web/_plugins/asciidoctor/vimeo-block.rb +4 -1
  100. data/lib/starter_web/_plugins/asciidoctor/wistia-block.rb +313 -0
  101. data/lib/starter_web/_plugins/asciidoctor/youtube-block.rb +192 -17
  102. data/lib/starter_web/_plugins/index/lunr.rb +1 -1
  103. data/lib/starter_web/assets/audio/cover/spontanorama/spontanorama.jpg +0 -0
  104. data/lib/starter_web/assets/audio/cover/spontanorama/src/spontanorama.png +0 -0
  105. data/lib/starter_web/assets/audio/cover/spontanorama/src/spontanorama.psd +0 -0
  106. data/lib/starter_web/package.json +1 -1
  107. data/lib/starter_web/pages/public/amplitude_yt_tester.adoc +20 -7
  108. data/lib/starter_web/pages/public/manuals/integrations/amplitudejs/amplitudejs-api.adoc +1 -1
  109. data/lib/starter_web/pages/public/manuals/integrations/videojs/youtube-api.adoc +1638 -0
  110. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +5 -6
  111. data/lib/starter_web/pages/public/tools/previewer/preview_videojs.adoc +203 -0
  112. data/lib/starter_web/pages/public/tour/asciidoc_extensions.adoc +1 -1
  113. data/lib/starter_web/pages/public/tour/bootstrap_themes.adoc +1 -1
  114. data/lib/starter_web/pages/public/tour/highlghter_rouge.adoc +1 -1
  115. data/lib/starter_web/pages/public/tour/modal_extentions.adoc +1 -1
  116. data/lib/starter_web/pages/public/tour/play_audio.adoc +30 -29
  117. data/lib/starter_web/pages/public/tour/play_video.adoc +65 -39
  118. data/lib/starter_web/pages/public/tour/present_images.adoc +17 -16
  119. data/lib/starter_web/pages/public/tour/quicksearch.adoc +1 -1
  120. data/lib/starter_web/pages/public/tour/responsive_tables.adoc +1 -1
  121. data/lib/starter_web/pages/public/tour/typography.adoc +1 -1
  122. metadata +37 -20
  123. data/assets/data/amplitude.28.html +0 -887
  124. data/assets/data/amplitude.29.html +0 -923
  125. data/assets/theme/j1/adapter/js/amplitude.23.js +0 -1165
  126. data/assets/theme/j1/adapter/js/amplitude.24.js +0 -1164
  127. data/assets/theme/j1/adapter/js/amplitude.25.js +0 -1268
  128. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_pause.svg +0 -19
  129. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/_play.svg +0 -18
  130. data/assets/theme/j1/modules/amplitudejs/icons/player/dark/show-playlist.svg +0 -15
  131. data/assets/theme/j1/modules/jqueryScrollbar/LICENSE +0 -20
  132. data/assets/theme/j1/modules/jqueryScrollbar/README.md +0 -28
  133. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.css +0 -939
  134. data/assets/theme/j1/modules/jqueryScrollbar/css/scrollbar.min.css +0 -20
  135. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.js +0 -851
  136. data/assets/theme/j1/modules/jqueryScrollbar/js/scrollbar.min.js +0 -36
  137. data/assets/theme/j1/modules/jqueryScrollbar/sass/scrollbar.scss +0 -806
  138. data/assets/theme/j1/modules/lightGallery/js/plugins/lg-video.0.js +0 -794
  139. data/lib/starter_web/_data/modules/lazyLoader.0.yml +0 -118
@@ -613,34 +613,43 @@
613
613
  };
614
614
 
615
615
  Video.prototype.controlVideo = function (index, action) {
616
+ const vjsOptions = j1.modules.videojs.options;
616
617
  var trackSrc,
617
618
  $videoElement, videoInfo, videoStart, videoData, videoId,
618
- videojsPlayer, zoomPlugin;
619
-
620
- var playbackRatesDefaults = '[0.25, 0.5, 1, 1.5, 2]';
621
- var chapterTracksEnabled = false;
622
-
623
- var hotkeysPluginDefaults = {
624
- volumeStep: 0.1,
625
- seekStep: 5,
626
- enableMute: true,
627
- enableVolumeScroll: true,
628
- enableHoverScroll: false,
629
- enableFullscreen: true,
630
- enableNumbers: true,
631
- enableJogStyle: false,
632
- alwaysCaptureHotkeys: false,
633
- captureDocumentHotkeys: false,
634
- enableModifiersForNumbers: false,
635
- enableInactiveFocus: true,
636
- skipInitialFocus: false
619
+ videojsPlayer, playbackRates,
620
+ hotKeysPlugin, skipButtonsPlugin, zoomPlugin;
621
+
622
+ var playbackRatesDefaults = vjsOptions.playbackRates.values;
623
+ var chapterTracksEnabled = false;
624
+
625
+ var hotKeysPluginDefaults = {
626
+ volumeStep: vjsOptions.plugins.hotKeys.volumeStep,
627
+ seekStep: vjsOptions.plugins.hotKeys.seekStep,
628
+ enableMute: vjsOptions.plugins.hotKeys.enableMute,
629
+ enableVolumeScroll: vjsOptions.plugins.hotKeys.enableVolumeScroll,
630
+ enableHoverScroll: vjsOptions.plugins.hotKeys.enableHoverScroll,
631
+ enableFullscreen: vjsOptions.plugins.hotKeys.enableFullscreen,
632
+ enableNumbers: vjsOptions.plugins.hotKeys.enableNumbers,
633
+ enableJogStyle: vjsOptions.plugins.hotKeys.enableJogStyle,
634
+ alwaysCaptureHotkeys: vjsOptions.plugins.hotKeys.alwaysCaptureHotkeys,
635
+ captureDocumentHotkeys: vjsOptions.plugins.hotKeys.captureDocumentHotkeys,
636
+ enableModifiersForNumbers: vjsOptions.plugins.hotKeys.enableModifiersForNumbers,
637
+ enableInactiveFocus: vjsOptions.plugins.hotKeys.enableInactiveFocus,
638
+ skipInitialFocus: vjsOptions.plugins.hotKeys.skipInitialFocus
637
639
  };
638
640
 
639
- var zoomPluginDefaults = {
640
- moveX: 0,
641
- moveY: 0,
642
- rotate: 0,
643
- zoom: 1
641
+ var skipButtonsPluginDefaults = {
642
+ backward: vjsOptions.plugins.skipButtons.backward,
643
+ forward: vjsOptions.plugins.skipButtons.forward,
644
+ backwardIndex: 0,
645
+ forwardIndex: 1
646
+ };
647
+
648
+ var zoomPluginDefaults = {
649
+ moveX: vjsOptions.plugins.zoomButtons.moveX,
650
+ moveY: vjsOptions.plugins.zoomButtons.moveY,
651
+ rotate: vjsOptions.plugins.zoomButtons.rotate,
652
+ zoom: vjsOptions.plugins.zoomButtons.zoom
644
653
  };
645
654
 
646
655
  videoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
@@ -652,116 +661,190 @@
652
661
  // chapter tracks only available for VJS
653
662
  //
654
663
  if (this.core.galleryItems[this.core.index].video !== undefined && videoInfo.html5) {
655
- videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
656
- if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
657
- for (var i=0; i<videoData.tracks.length; i++) {
658
- if (videoData.tracks[i].kind == 'chapters') {
659
- trackSrc = videoData.tracks[i].src;
660
- chapterTracksEnabled = true;
661
- }
662
- }
663
- } // END if videoData.tracks
664
+ videoData = JSON.parse(this.core.galleryItems[this.core.index].video);
664
665
 
665
- if ($videoElement.selector !== undefined) {
666
- videoId = $videoElement.selector.id;
667
- videojsPlayer = videojs(videoId);
668
- } else {
669
- videojsPlayer = 'unknown';
670
- }
666
+ if (videoData.tracks !== undefined && videoData.tracks.length > 0) {
667
+ for (var i=0; i<videoData.tracks.length; i++) {
668
+ if (videoData.tracks[i].kind == 'chapters') {
669
+ trackSrc = videoData.tracks[i].src;
670
+ chapterTracksEnabled = true;
671
+ }
672
+ }
673
+ } // END if videoData.tracks
671
674
 
672
- if (videojsPlayer !== 'unknown') {
673
-
674
- // jadams, 2024-06-16: added VJS Plugins hotkeys|zoom, playbackRates
675
- // ---------------------------------------------------------------
676
- var hotkeysPlugin = this.settings.videojsOptions.controlBar.hotkeysPlugin;
677
- var zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
678
- var playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
679
-
680
- // jadams, 2024-01-22: added video start position
681
- // ---------------------------------------------------------------
682
- if (this.settings.videojsOptions.videoStart !== undefined) {
683
- videoStart = this.settings.videojsOptions.videoStart[index];
684
- videojsPlayer.on("play", function() {
685
- var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
686
- videojsPlayer.currentTime(startFromSecond);
687
-
688
- }); // END on "play"
689
- } // END if videoStart
690
-
691
- // add playbackRates (only available for VJS)
692
- videojsPlayer.playbackRates(playbackRates);
693
-
694
- // add hotkeysPlugin (only available for VJS)
695
- if (hotkeysPlugin !== undefined && hotkeysPlugin.enabled) {
696
- hotkeysPlugin.options = __assign(__assign({}, hotkeysPluginDefaults), hotkeysPlugin.options);
697
- videojsPlayer.hotkeys({
698
- enableModifiersForNumbers: hotkeysPlugin.options.enableModifiersForNumbers
699
- });
700
- } // END if hotkeysPlugin enabled
701
-
702
- // add zoomPlugin (only available for VJS)
703
- if (zoomPlugin !== undefined && zoomPlugin.enabled) {
704
- zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
705
- videojsPlayer.zoomPlugin({
706
- moveX: zoomPlugin.options.moveX,
707
- moveY: zoomPlugin.options.moveY,
708
- rotate: zoomPlugin.options.rotate,
709
- zoom: zoomPlugin.options.zoom
710
- });
711
- } // END if zoomPlugin enabled
712
-
713
- // jadams, 2023-12-11: added chapter track processing (only available for VJS)
714
- // -----------------------------------------------------------------
715
- if (chapterTracksEnabled) {
716
- var parser = new WebVTTParser();
717
- var markers = [];
718
-
719
- function cb_load (data /* ,textStatus, jqXHR */ ) {
720
- var tree = parser.parse(data, 'metadata');
721
- var marker;
722
-
723
- // add chapter tracks to markers array
724
- for (var i=0; i<tree.cues.length; i++) {
725
- marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
726
- markers.push(marker);
675
+ if ($videoElement.selector !== undefined) {
676
+ videoId = $videoElement.selector.id;
677
+ videojsPlayer = videojs(videoId);
678
+ } else {
679
+ videojsPlayer = 'unknown';
680
+ }
681
+
682
+ if (videojsPlayer !== 'unknown') {
683
+
684
+ // added VJS Plugins hotKeys|skipButtons|zoom, playbackRates
685
+ // -------------------------------------------------------------
686
+ hotKeysPlugin = this.settings.videojsOptions.controlBar.hotKeysPlugin;
687
+ skipButtonsPlugin = this.settings.videojsOptions.controlBar.skipButtonsPlugin;
688
+ zoomPlugin = this.settings.videojsOptions.controlBar.zoomPlugin;
689
+ playbackRates = (this.settings.videojsOptions.controlBar.playbackRates !== undefined) ? this.settings.videojsOptions.controlBar.playbackRates : playbackRatesDefaults;
690
+
691
+ // jadams, 2024-01-22: added video start position
692
+ // -------------------------------------------------------------
693
+ if (this.settings.videojsOptions.videoStart !== undefined) {
694
+ videoStart = this.settings.videojsOptions.videoStart[index];
695
+ videojsPlayer.on("play", function() {
696
+ var startFromSecond = new Date('1970-01-01T' + videoStart + 'Z').getTime() / 1000;
697
+ videojsPlayer.currentTime(startFromSecond);
698
+ }); // END on event play
699
+ } // END if videoStart
700
+
701
+ // add playbackRates (only available for VJS)
702
+ if (videojsPlayer.playbackRates !== undefined) {
703
+ videojsPlayer.playbackRates(playbackRates);
727
704
  }
728
- }; // END callback
729
705
 
730
- // load chapter tracks
731
- loadVtt(trackSrc, cb_load);
706
+ // add hotkeys Plugin (only available for VJS)
707
+ if (hotKeysPlugin !== undefined && hotKeysPlugin.enabled && videojsPlayer.hotKeys !== undefined) {
708
+
709
+ // merge objects
710
+ hotKeysPlugin.options = __assign(__assign({}, hotKeysPluginDefaults), hotKeysPlugin.options);
711
+
712
+ // prevent multiple plugin instances
713
+ var hotKeysActive = false;
714
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.hotKeys !== undefined) {
715
+ hotKeysActive = videojsPlayer.activePlugins_.hotKeys;
716
+ }
717
+
718
+ if (!hotKeysActive) {
719
+ videojsPlayer.hotKeys({
720
+ volumeStep: hotKeysPlugin.options.volumeStep,
721
+ seekStep: hotKeysPlugin.options.seekStep,
722
+ enableMute: hotKeysPlugin.options.enableMute,
723
+ enableFullscreen: hotKeysPlugin.options.enableFullscreen,
724
+ enableNumbers: hotKeysPlugin.options.enableNumbers,
725
+ enableVolumeScroll: hotKeysPlugin.options.enableVolumeScroll,
726
+ enableHoverScroll: hotKeysPlugin.options.enableHoverScroll,
727
+ alwaysCaptureHotkeys: hotKeysPlugin.options.alwaysCaptureHotkeys,
728
+ captureDocumentHotkeys: hotKeysPlugin.options.captureDocumentHotkeys,
729
+ documentHotkeysFocusElementFilter: hotKeysPlugin.options.documentHotkeysFocusElementFilter,
730
+
731
+ // Mimic VLC seek behavior (default to: 15)
732
+ seekStep: function(e) {
733
+ if (e.ctrlKey && e.altKey) {
734
+ return 5*60;
735
+ } else if (e.ctrlKey) {
736
+ return 60;
737
+ } else if (e.altKey) {
738
+ return 10;
739
+ } else {
740
+ return 15;
741
+ }
742
+ }
743
+
744
+ });
745
+ } // END if hotKeysActive
732
746
 
733
- // add chapter tracks on play
734
- videojsPlayer.on("play", function() {
735
- videojsPlayer.currentTime(videoStart);
747
+ } // END if hotKeysPlugin enabled
736
748
 
737
- var total = videojsPlayer.duration();
738
- var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
749
+ // add skipButtons Plugin (only available for VJS)
750
+ // -------------------------------------------------------------
751
+ if (skipButtonsPlugin !== undefined && skipButtonsPlugin.enabled && videojsPlayer.skipButtons !== undefined) {
752
+ // merge objects
753
+ skipButtonsPlugin.options = __assign(__assign({}, skipButtonsPluginDefaults), skipButtonsPlugin.options);
739
754
 
740
- // add chapter tracks on timeline (delayed)
741
- setTimeout (function() {
742
- var markers_loaded = setInterval (function () {
743
- if (markers.length) {
744
- for (var i=0; i<markers.length; i++) {
745
- var left = (markers[i].time / total * 100) + '%';
746
- var time = markers[i].time;
747
- var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
755
+ // prevent multiple plugin instances
756
+ var skipButtonsActive = false;
757
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.skipButtons !== undefined) {
758
+ skipButtonsActive = videojsPlayer.activePlugins_.skipButtons;
759
+ }
748
760
 
749
- el.click(function() {
750
- videojsPlayer.currentTime($(this).data('time'));
761
+ if (!skipButtonsActive) {
762
+ videojsPlayer.skipButtons({
763
+ backward: skipButtonsPlugin.options.backward,
764
+ forward: skipButtonsPlugin.options.forward,
765
+ backwardIndex: skipButtonsPlugin.options.backwardIndex,
766
+ forwardIndex: skipButtonsPlugin.options.forwardIndex
751
767
  });
768
+ }
769
+
770
+ } // END if skipButtons Plugin enabled
771
+
772
+ // add zoom Plugin (only available for VJS)
773
+ // -----------------------------------------------------------------
774
+ if (zoomPlugin !== undefined && zoomPlugin.enabled && videojsPlayer.zoomButtons !== undefined) {
775
+ // merge objects
776
+ zoomPlugin.options = __assign(__assign({}, zoomPluginDefaults), zoomPlugin.options);
752
777
 
753
- timeline.append(el);
754
- }
755
- clearInterval(markers_loaded);
778
+ // prevent multiple plugin instances
779
+ var zoomButtonsActive = false;
780
+ if (videojsPlayer.activePlugins_ !== undefined && videojsPlayer.activePlugins_.zoomButtons !== undefined) {
781
+ zoomButtonsActive = videojsPlayer.activePlugins_.zoomButtons;
782
+ }
783
+
784
+ if (!zoomButtonsActive) {
785
+ videojsPlayer.zoomButtons({
786
+ moveX: zoomPlugin.options.moveX,
787
+ moveY: zoomPlugin.options.moveY,
788
+ rotate: zoomPlugin.options.rotate,
789
+ zoom: zoomPlugin.options.zoom
790
+ });
756
791
  }
757
- }, 10);
758
- }, 1000 );
759
792
 
760
- }); // END on "play"
793
+ } // END if zoom Plugin enabled
794
+
795
+ // chapter track processing (only available for VJS)
796
+ // -----------------------------------------------------------------
797
+ if (chapterTracksEnabled) {
798
+ var parser = new WebVTTParser();
799
+ var markers = [];
800
+
801
+ function cb_load (data /* ,textStatus, jqXHR */ ) {
802
+ var tree = parser.parse(data, 'metadata');
803
+ var marker;
804
+
805
+ // add chapter tracks to markers array
806
+ for (var i=0; i<tree.cues.length; i++) {
807
+ marker = { time: tree.cues[i].startTime, label: tree.cues[i].text };
808
+ markers.push(marker);
809
+ }
810
+ }; // END function cb_load
811
+
812
+ // load chapter tracks
813
+ // -------------------------------------------------------------
814
+ loadVtt(trackSrc, cb_load);
761
815
 
762
- } // END if chapterTracksEnabled
816
+ // add chapter tracks on play
817
+ videojsPlayer.on("play", function() {
818
+ videojsPlayer.currentTime(videoStart);
763
819
 
764
- } // END if videojsPlayer is defined
820
+ var total = videojsPlayer.duration();
821
+ var timeline = $(videojsPlayer.controlBar.progressControl.children_[0].el_);
822
+
823
+ // add chapter tracks on timeline (delayed)
824
+ setTimeout (function() {
825
+ var markers_loaded = setInterval (function () {
826
+ if (markers.length) {
827
+ for (var i=0; i<markers.length; i++) {
828
+ var left = (markers[i].time / total * 100) + '%';
829
+ var time = markers[i].time;
830
+ var el = $('<div class="vjs-chapter-marker" style="left: ' +left+ '" data-time="' +time+ '"> <span>' +markers[i].label+ '</span></div>');
831
+
832
+ el.click(function() {
833
+ videojsPlayer.currentTime($(this).data('time'));
834
+ });
835
+
836
+ timeline.append(el);
837
+ }
838
+ clearInterval(markers_loaded);
839
+ }
840
+ }, 10); // END markers_loaded
841
+ }, 1000 ); // END setTimeout
842
+
843
+ }); // END on "play"
844
+
845
+ } // END if chapterTracksEnabled
846
+
847
+ } // END if videojsPlayer is defined
765
848
 
766
849
  } // END if videoInfo.html5
767
850
 
@@ -811,7 +894,8 @@
811
894
  console.warn('lightGallery: Make sure you have included //fast.wistia.com/assets/external/E-v1.js');
812
895
  }
813
896
  }
814
- };
897
+
898
+ }; // END controlVideo
815
899
 
816
900
  Video.prototype.loadVideoOnPosterClick = function ($el, forcePlay) {
817
901
  var _this = this;
@@ -875,4 +959,4 @@
875
959
 
876
960
  return Video;
877
961
 
878
- })));
962
+ })));
@@ -0,0 +1,82 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
+ width="24px"
11
+ height="24px"
12
+ viewBox="0 0 24 24"
13
+ version="1.1"
14
+ id="svg13"
15
+ sodipodi:docname="next-hover.svg"
16
+ inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
17
+ <metadata
18
+ id="metadata17">
19
+ <rdf:RDF>
20
+ <cc:Work
21
+ rdf:about="">
22
+ <dc:format>image/svg+xml</dc:format>
23
+ <dc:type
24
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25
+ <dc:title>Shape</dc:title>
26
+ </cc:Work>
27
+ </rdf:RDF>
28
+ </metadata>
29
+ <sodipodi:namedview
30
+ pagecolor="#ffffff"
31
+ bordercolor="#666666"
32
+ borderopacity="1"
33
+ objecttolerance="10"
34
+ gridtolerance="10"
35
+ guidetolerance="10"
36
+ inkscape:pageopacity="0"
37
+ inkscape:pageshadow="2"
38
+ inkscape:window-width="1661"
39
+ inkscape:window-height="1135"
40
+ id="namedview15"
41
+ showgrid="false"
42
+ inkscape:pagecheckerboard="true"
43
+ inkscape:showpageshadow="false"
44
+ inkscape:zoom="30.625"
45
+ inkscape:cx="12"
46
+ inkscape:cy="12"
47
+ inkscape:window-x="0"
48
+ inkscape:window-y="0"
49
+ inkscape:window-maximized="0"
50
+ inkscape:current-layer="svg13" />
51
+ <!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
52
+ <title
53
+ id="title2">Shape</title>
54
+ <desc
55
+ id="desc4">Created with Sketch.</desc>
56
+ <defs
57
+ id="defs6" />
58
+ <g
59
+ id="Screens"
60
+ stroke="none"
61
+ stroke-width="1"
62
+ fill="none"
63
+ fill-rule="evenodd"
64
+ transform="matrix(0.98334356,0,0,0.98498249,0.23649025,0.16326531)">
65
+ <g
66
+ id="Player"
67
+ transform="translate(-263,-528)"
68
+ fill="#ffffff">
69
+ <g
70
+ id="Controls"
71
+ transform="translate(24,504)">
72
+ <g
73
+ id="Skip-Next"
74
+ transform="translate(227,12)">
75
+ <path
76
+ d="M 12,36 29,24 12,12 Z M 32,12 v 24 h 4 V 12 Z"
77
+ id="Shape" />
78
+ </g>
79
+ </g>
80
+ </g>
81
+ </g>
82
+ </svg>
@@ -0,0 +1,151 @@
1
+ # Video.js Icon Font
2
+
3
+ This project contains all of the tooling necessary to generate a new icon
4
+ font for Video.js. The icons themselves are from Google's [Material Design Icons](https://github.com/google/material-design-icons) (from the commonly available version 3 of the set, with version 4 symbols supplemented as custom SVGs) and [Font Awesome](https://fontawesome.com/).
5
+
6
+ You can see an overview of the icons used in the default Video.js font
7
+ here: https://videojs.github.io/font/
8
+
9
+ ## Usage
10
+
11
+ ```sh
12
+ $ npm install grunt-cli # only if you don't already have grunt installed
13
+ $ npm install
14
+ $ grunt
15
+ ```
16
+
17
+ ### Custom icons
18
+
19
+ You can add custom icons by calling grunt with the `--custom-json` option.
20
+ It takes a comma delimited list of paths to JSON files of the same format
21
+ as below and merges it with the default icons file.
22
+
23
+ Example:
24
+ ```sh
25
+ $ grunt --custom-json=./lib/custom.json,./lib/custom2.json
26
+ ```
27
+
28
+ ## Making changes to the font
29
+
30
+ To make changes to the default Video.js font, simply edit the `icons.json`
31
+ file. You can add or remove icons, either by just selecting new SVGs fromthe [Material Design set](https://www.google.com/design/icons/), or pulling in new SVGs altogether.
32
+
33
+ ```json
34
+ {
35
+ "font-name": "VideoJS",
36
+ "root-dir": "./node_modules/material-design-icons/",
37
+ "icons": [
38
+ {
39
+ "name": "play",
40
+ "svg": "av/svg/production/ic_play_arrow_48px.svg"
41
+ },
42
+ {
43
+ "name": "pause",
44
+ "svg": "av/svg/production/ic_pause_48px.svg"
45
+ },
46
+ {
47
+ "name": "cool-custom-icon",
48
+ "svg": "neato-icon.svg",
49
+ "root-dir": "./custom-icons/neato-icon.svg"
50
+ }
51
+ ]
52
+ }
53
+ ```
54
+
55
+ Once you're done, simply run `grunt` again to regenerate the fonts and scss partial. To edit the `_icons.scss` partial,
56
+ update `templates/scss.hbs`.
57
+
58
+ ## Creating your own font
59
+
60
+ If you are developing a Video.js plugin that uses custom icons, you can also create a new font instead of modifying the
61
+ default font. Simply specify a new `font-name` and define the icons you want to include:
62
+
63
+ ```json
64
+ {
65
+ "font-name": "MyPluginFont",
66
+ "root-dir": "./node_modules/material-design-icons/",
67
+ "icons": [
68
+ {
69
+ "name": "av-perm",
70
+ "svg": "action/svg/production/ic_perm_camera_mic_48px.svg"
71
+ },
72
+ {
73
+ "name": "video-perm",
74
+ "svg": "av/svg/production/ic_videocam_48px.svg"
75
+ },
76
+ {
77
+ "name": "audio-perm",
78
+ "svg": "av/svg/production/ic_mic_48px.svg"
79
+ }
80
+ ]
81
+ }
82
+ ```
83
+ Generate the `MyPluginFont` font files using the `--custom-json` option:
84
+
85
+ ```sh
86
+ $ grunt --custom-json=MyPluginFont.json
87
+ ```
88
+
89
+ ### Exclude default icons
90
+
91
+ By default, the regular Video.js icons are also included in the font. If you want to exclude these icons, when you're creating a Video.js plugin font for example, use the `--exclude-default` option.
92
+
93
+ Example:
94
+ ```sh
95
+ $ grunt --custom-json=MyPluginFont.json --exclude-default
96
+ ```
97
+
98
+ ## Icon unicode strings
99
+
100
+ Videojs-font generates unicode strings for default and custom icons which are used as css pseudo-element content values by the videojs-icons.css file.
101
+
102
+ ### Version 4 default unicode values
103
+ | Icon Name | Unicode |
104
+ | ---------- | ------- |
105
+ | play | 'f101' |
106
+ | play-circle | 'f102' |
107
+ | pause | 'f103' |
108
+ | volume-mute | 'f104' |
109
+ | volume-low | 'f105' |
110
+ | volume-mid | 'f106' |
111
+ | volume-high | 'f107' |
112
+ | fullscreen-enter | 'f108' |
113
+ | fullscreen-exit | 'f109' |
114
+ | spinner | 'f10a' |
115
+ | subtitles | 'f10b' |
116
+ | captions | 'f10c' |
117
+ | hd | 'f10d' |
118
+ | chapters | 'f10e' |
119
+ | downloading | 'f10f' |
120
+ | file-download | 'f110' |
121
+ | file-download-done | 'f111' |
122
+ | file-download-off | 'f112' |
123
+ | share | 'f113' |
124
+ | cog | 'f114' |
125
+ | square | 'f115' |
126
+ | circle | 'f116' |
127
+ | circle-outline | 'f117' |
128
+ | circle-inner-circle | 'f118' |
129
+ | cancel | 'f119' |
130
+ | repeat | 'f11a' |
131
+ | replay | 'f11b' |
132
+ | replay-5 | 'f11c' |
133
+ | replay-10 | 'f11d' |
134
+ | replay-30 | 'f11e' |
135
+ | forward-5 | 'f11f' |
136
+ | forward-10 | 'f120' |
137
+ | forward-30 | 'f121' |
138
+ | audio | 'f122' |
139
+ | next-item | 'f123' |
140
+ | previous-item | 'f124' |
141
+ | shuffle | 'f125' |
142
+ | cast | 'f126' |
143
+ | picture-in-picture-enter | 'f127' |
144
+ | picture-in-picture-exit | 'f128' |
145
+ | facebook | 'f129' |
146
+ | linkedin | 'f12a' |
147
+ | twitter | 'f12b' |
148
+ | tumblr | 'f12c' |
149
+ | pinterest | 'f12d' |
150
+ | audio-description | 'f12e' |
151
+