bitmovin-player-ui 3.65.0 → 3.67.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.
@@ -3,4 +3,5 @@
3
3
 
4
4
  ## Checklist (for PR submitter and reviewers)
5
5
  <!-- A PR with CHANGELOG entry will be released automatically -->
6
+ <!-- This is required and should be added in every case -->
6
7
  - [ ] `CHANGELOG` entry
package/CHANGELOG.md CHANGED
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [3.67.0] - 2024-07-03
8
+
9
+ ### Added
10
+ - Missing changelog entries of `3.65.0` and `3.66.0` release versions
11
+
12
+ ## [3.66.0] - 2024-07-01
13
+
14
+ ### Changed
15
+ - Playground demo page to include checkbox to enable/disbale ads
16
+ - Store basic configuration of playground demo page in localStorage
17
+
18
+ ## [3.65.0] - 2024-06-24
19
+
20
+ ### Added
21
+ - Eco Mode toggle button
22
+
7
23
  ## [3.64.0] - 2024-05-28
8
24
 
9
25
  ### Added
@@ -960,6 +976,8 @@ Version 2.0 of the UI framework is built for player 7.1. If absolutely necessary
960
976
  ## 1.0.0 (2017-02-03)
961
977
  - First release
962
978
 
979
+ [3.67.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.66.0...v3.67.0
980
+ [3.66.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.65.0...v3.66.0
963
981
  [3.65.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.64.0...v3.65.0
964
982
  [3.64.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.63.0...v3.64.0
965
983
  [3.63.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.62.0...v3.63.0
Binary file
package/dist/index.html CHANGED
@@ -41,6 +41,14 @@
41
41
  </div>
42
42
  <span class="col-sm-4 form-text">The UI skin or skin type to display.</span>
43
43
  </div>
44
+
45
+ <div class="form-group form-check row">
46
+ <label for="config-ads" class="col-sm-4 form-check-label" for="config-ads">Ads</label>
47
+ <div class="col-sm-4 form-check">
48
+ <input type="checkbox" id="config-ads">
49
+ </div>
50
+ <span class="col-sm-4 form-text">Schedule client-side ads.</span>
51
+ </div>
44
52
  </div>
45
53
 
46
54
  <div class="card-block">
@@ -97,6 +105,7 @@
97
105
  </div>
98
106
 
99
107
  <script src="https://cdn.bitmovin.com/player/web/8/bitmovinplayer.js"></script>
108
+ <script src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-advertising-bitmovin.js"></script>
100
109
  <script src="js/bitmovinplayer-ui.js"></script>
101
110
  <script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
102
111
  <script type="text/javascript">
@@ -183,27 +192,24 @@
183
192
  }
184
193
  };
185
194
 
186
- var advertisingConfig = {
187
- adBreaks: [
188
- {
189
- tag: {
190
- // skippable
191
- url: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/32573358/skippable_ad_unit&impl=s&gdfp_req=1&env=vp&output=xml_vast2&unviewed_position_start=1&url=http%3A%2F%2Freleasetest.dash-player.com%2Fads%2F&description_url=[description_url]&correlator=[random]',
192
- type: 'vast',
193
- },
194
- position: 'pre',
195
+ var adBreaks = [
196
+ {
197
+ tag: {
198
+ // skippable
199
+ url: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=[random]',
200
+ type: 'vast',
195
201
  },
196
- {
197
- tag: {
198
- // nonskippable
199
- url: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/32573358/2nd_test_ad_unit&ciu_szs=300x100&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=[random]',
200
- type: 'vast',
201
- },
202
- position: '10',
203
- }
204
- ]
205
- };
206
- var adsEnabled = false;
202
+ position: 'pre',
203
+ },
204
+ {
205
+ tag: {
206
+ // nonskippable
207
+ url: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=[random]',
208
+ type: 'vast',
209
+ },
210
+ position: '10',
211
+ }
212
+ ];
207
213
 
208
214
  var config = {
209
215
  key: 'YOUR KEY HERE',
@@ -211,7 +217,7 @@
211
217
  remotecontrol: {
212
218
  type: 'googlecast',
213
219
  },
214
- advertising: adsEnabled ? advertisingConfig : null
220
+ advertising: {},
215
221
  };
216
222
 
217
223
  var uiConfig = {
@@ -256,6 +262,8 @@
256
262
  var uiManager;
257
263
  bitmovin.playerui.UIManager.setLocalizationConfig({ language: 'en', browserLanguageDetection: false });
258
264
 
265
+ bitmovin.player.Player.addModule(bitmovin.player["advertising-bitmovin"].default);
266
+
259
267
  var playerSetup = function(config) {
260
268
  player = new bitmovin.player.Player(document.getElementById('player'), config);
261
269
 
@@ -264,11 +272,17 @@
264
272
  updateApiMethods();
265
273
  });
266
274
 
275
+ const playgroundConfig = getConfigFromStorage();
276
+
267
277
  // Add UI
268
- uiManager = bitmovin.playerui.UIFactory.buildDefaultUI(player, uiConfig);
278
+ uiManager = bitmovin.playerui.UIFactory[playgroundConfig.uiOption || 'buildDefaultUI'](player, uiConfig);
269
279
 
270
- player.load(sources.fullyFeatured).then(function() {
280
+ player.load(sources[playgroundConfig.source || 'fullyFeatured']).then(function() {
271
281
  console.log('source successfully loaded');
282
+
283
+ if (playgroundConfig.adsEnabled) {
284
+ scheduleAds();
285
+ }
272
286
  }, function(errorEvent) {
273
287
  console.log('error while loading source', errorEvent);
274
288
  });
@@ -282,6 +296,7 @@
282
296
  $('#config-source').change(function() {
283
297
  player.unload();
284
298
  player.load(sources[$(this).val()]);
299
+ storeConfigInStorage();
285
300
  });
286
301
 
287
302
  var printResult = function(result, method) {
@@ -710,11 +725,77 @@
710
725
  } else {
711
726
  uiManager = bitmovin.playerui.UIFactory[factoryMethod](player, uiConfig);
712
727
  }
728
+ storeConfigInStorage();
729
+ });
730
+
731
+ var scheduleAdsCheckbox = $('#config-ads');
732
+ scheduleAdsCheckbox.change(function() {
733
+ const isChecked = $(this).is(':checked');
734
+
735
+ if (isChecked) {
736
+ scheduleAds();
737
+ } else {
738
+ const ads = player.ads.list();
739
+ ads.forEach(function(ad) {
740
+ player.ads.discardAdBreak(ad.id);
741
+ })
742
+ }
743
+
744
+ storeConfigInStorage();
713
745
  });
714
746
 
747
+ function scheduleAds() {
748
+ adBreaks.forEach(function(adBreak) {
749
+ player.ads.schedule(adBreak);
750
+ });
751
+ }
752
+
715
753
  // Populate stats
716
754
  $('#userAgent').html(navigator.userAgent);
717
755
 
756
+ function storeConfigInStorage() {
757
+ var data = {
758
+ adsEnabled: $('#config-ads').is(':checked'),
759
+ source: $('#config-source').val(),
760
+ uiOption: $('#config-ui').val(),
761
+ };
762
+
763
+ try {
764
+ window.localStorage.setItem('bmpui-playground-config', JSON.stringify(data));
765
+ } catch (e) {
766
+ console.error('Local storage access denied', e);
767
+ }
768
+ }
769
+
770
+ function getConfigFromStorage() {
771
+ let config = {};
772
+ try {
773
+ const loadedEntry = window.localStorage.getItem('bmpui-playground-config');
774
+ if (!loadedEntry) {
775
+ console.log('No local storage entry found');
776
+ return {};
777
+ }
778
+ config = JSON.parse(loadedEntry);
779
+ } catch (e) {
780
+ console.error('Problem loading playground config from localStorage', e);
781
+ }
782
+
783
+ return config || {};
784
+ }
785
+
786
+ (function applyInitialConfiguration() {
787
+ const config = getConfigFromStorage();
788
+
789
+ if ($('#config-source') && config.source) {
790
+ $('#config-source').val(config.source);
791
+ }
792
+ if ($('#config-ui') && config.uiOption) {
793
+ $('#config-ui').val(config.uiOption);
794
+ }
795
+ if ($('#config-ads') && config.adsEnabled !== undefined) {
796
+ $('#config-ads').prop('checked', config.adsEnabled);
797
+ }
798
+ })();
718
799
  </script>
719
800
  </body>
720
801
  </html>
@@ -10833,7 +10833,7 @@ module.exports={
10833
10833
  Object.defineProperty(exports, "__esModule", { value: true });
10834
10834
  exports.VolumeControlButton = exports.TitleBar = exports.SubtitleSelectBox = exports.SubtitleOverlay = exports.SeekBarLabel = exports.RecommendationOverlay = exports.ErrorMessageOverlay = exports.Component = exports.CastToggleButton = exports.CastStatusOverlay = exports.AudioTrackSelectBox = exports.AudioQualitySelectBox = exports.Label = exports.Container = exports.UIContainer = exports.Watermark = exports.VRToggleButton = exports.VolumeToggleButton = exports.VideoQualitySelectBox = exports.ToggleButton = exports.SettingsToggleButton = exports.SettingsPanel = exports.ItemSelectionList = exports.SelectBox = exports.SeekBar = exports.PlaybackToggleButton = exports.PlaybackTimeLabelMode = exports.PlaybackTimeLabel = exports.HugePlaybackToggleButton = exports.FullscreenToggleButton = exports.ControlBar = exports.Button = exports.ListOrientation = exports.ListNavigationGroup = exports.RootNavigationGroup = exports.NavigationGroup = exports.SpatialNavigation = exports.i18n = exports.ErrorUtils = exports.StorageUtils = exports.BrowserUtils = exports.UIUtils = exports.PlayerUtils = exports.StringUtils = exports.ArrayUtils = exports.DemoFactory = exports.UIFactory = exports.UIInstanceManager = exports.UIManager = exports.version = void 0;
10835
10835
  exports.QuickSeekButton = exports.ReplayButton = exports.SettingsPanelItem = exports.SubtitleSettingsPanelPage = exports.SettingsPanelPageOpenButton = exports.SettingsPanelPageBackButton = exports.SettingsPanelPage = exports.AudioTrackListBox = exports.SubtitleListBox = exports.ListBox = exports.SubtitleSettingsResetButton = exports.WindowOpacitySelectBox = exports.WindowColorSelectBox = exports.SubtitleSettingsLabel = exports.SubtitleSettingSelectBox = exports.FontSizeSelectBox = exports.FontOpacitySelectBox = exports.FontFamilySelectBox = exports.FontColorSelectBox = exports.CharacterEdgeSelectBox = exports.BackgroundOpacitySelectBox = exports.BackgroundColorSelectBox = exports.Spacer = exports.PictureInPictureToggleButton = exports.VolumeSlider = exports.AirPlayToggleButton = exports.MetadataLabelContent = exports.MetadataLabel = exports.CloseButton = exports.PlaybackToggleOverlay = exports.CastUIContainer = exports.BufferingOverlay = exports.HugeReplayButton = exports.PlaybackSpeedSelectBox = exports.AdClickOverlay = exports.AdMessageLabel = exports.AdSkipButton = exports.ClickOverlay = void 0;
10836
- exports.version = '3.65.0';
10836
+ exports.version = '3.67.0';
10837
10837
  // Management
10838
10838
  var uimanager_1 = require("./uimanager");
10839
10839
  Object.defineProperty(exports, "UIManager", { enumerable: true, get: function () { return uimanager_1.UIManager; } });