bitmovin-player-ui 3.65.0 → 3.66.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.
- package/CHANGELOG.md +1 -0
- package/artifact/artifact.tar.gz +0 -0
- package/dist/index.html +104 -23
- package/dist/js/bitmovinplayer-ui.js +1 -1
- package/dist/js/bitmovinplayer-ui.min.js +1 -1
- package/dist/js/framework/main.js +1 -1
- package/package.json +1 -1
- package/src/html/index.html +104 -23
package/CHANGELOG.md
CHANGED
|
@@ -960,6 +960,7 @@ Version 2.0 of the UI framework is built for player 7.1. If absolutely necessary
|
|
|
960
960
|
## 1.0.0 (2017-02-03)
|
|
961
961
|
- First release
|
|
962
962
|
|
|
963
|
+
[3.66.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.64.0...v3.66.0
|
|
963
964
|
[3.65.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.64.0...v3.65.0
|
|
964
965
|
[3.64.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.63.0...v3.64.0
|
|
965
966
|
[3.63.0]: https://github.com/bitmovin/bitmovin-player-ui/compare/v3.62.0...v3.63.0
|
package/artifact/artifact.tar.gz
CHANGED
|
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
|
|
187
|
-
|
|
188
|
-
{
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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:
|
|
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.
|
|
10836
|
+
exports.version = '3.66.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; } });
|