Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-yospace id3tags gracefully #174

Merged
merged 45 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3258359
feat: add ad holiday feature
martinstark Mar 12, 2024
b011b78
chore: update syntax, add logging
martinstark Mar 13, 2024
eef9cff
chore: add ad immunity event structure
martinstark Mar 13, 2024
9649318
feat: make api public, add documentation, add events
martinstark Mar 13, 2024
20a41e9
chore: update ad immunity documentation
martinstark Mar 13, 2024
a91fa81
chore: set default ad immunity duraiton to 0 (disabled)
martinstark Mar 13, 2024
cbca676
feat: exclude postrolls from ad immunity, update documentation
martinstark Mar 13, 2024
2522295
chore: add changelog
martinstark Mar 14, 2024
91fbdb1
chore: update types
martinstark Mar 14, 2024
f99b6db
feat: filter deactivated ad breaks in listing API
martinstark Mar 14, 2024
2881f00
fix: use a single way of cleaning up ad immunity
martinstark Mar 14, 2024
0fcda16
fix: use helper methods for timer calcs
martinstark Mar 14, 2024
16912de
fix: prevent superfluous ad immunity ended events
martinstark Mar 14, 2024
7dc1153
chore: restore demo index.html
martinstark Mar 14, 2024
4bebc1d
chore: add documentation to AdImmunityConfig
martinstark Mar 21, 2024
9deeb8a
chore: update documentation
martinstark Mar 21, 2024
fbbb6ca
fix: improve precision for deactivating ad breaks
martinstark Mar 21, 2024
9d75e71
fix: update ad immunity countdown check
martinstark Mar 21, 2024
0fc1dc7
feat: make ad break check offset configurable
martinstark Mar 21, 2024
bfe38c4
chore: update changelog
martinstark Mar 21, 2024
cdfc6c5
fix: pause before seeking past ad break to prevent ad frames showing
martinstark Mar 21, 2024
ddbb29a
chore: update adBreakCheckOffset default value
martinstark Mar 21, 2024
2de540a
chore: remove code duplication
martinstark Mar 21, 2024
2c88fb1
2.4.0-rc.0
dweinber Apr 10, 2024
602c885
fix: remove undesired event suppression
martinstark Apr 19, 2024
b53de5f
feat: add startAdImmunity public method
martinstark Apr 19, 2024
3a8888d
fix: update adBreakCheckOffset to seconds
martinstark Apr 19, 2024
3e570e6
fix: update filter syntax
martinstark Apr 19, 2024
9502977
2.4.0-rc.1
dweinber Apr 23, 2024
f74a980
Update prettier config
dweinber Jun 10, 2024
16821b6
Handle non-yospace ID3 tags gracefully
dweinber Jun 10, 2024
2b59006
Update Yospaec SDK version to 3.6.9.
dweinber Jun 10, 2024
4594636
Implement new yospace listeners which seem required now
dweinber Jun 10, 2024
e196a58
Clarify requirements in README
dweinber Jun 10, 2024
2033d29
Fix yospace SDK version
dweinber Jun 10, 2024
68ba676
Use 'import type' to avoid bundling the Bitmovin Player (core) into t…
dweinber Jun 10, 2024
1cd01c9
Add crypto module to sample page (for AES-128 encrypted HLS streams)
dweinber Jun 10, 2024
611b59a
Add warning log level as default for the player in the test page (unl…
dweinber Jun 10, 2024
1024415
Add another yospace source
dweinber Jun 18, 2024
79c5a9d
Add comment about timing problem
dweinber Jun 18, 2024
01c7ac7
Merge remote-tracking branch 'origin/develop' into feature/handle-non…
dweinber Jun 18, 2024
78d8d68
Add Changelog entry
dweinber Jun 18, 2024
76e3fe3
Merge branch 'feat/ad-holiday' into feature/handle-non-yospace-id3tag…
dweinber Jun 18, 2024
70fa9c5
Merge remote-tracking branch 'origin/develop' into feature/handle-non…
dweinber Jul 10, 2024
9f7feca
Update Changelog
dweinber Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"singleQuote": true,
"semi": true,
"printWidth": 120
"printWidth": 140
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- Yospace SDK to v3.6.9

### Fixed

- Parsing non-Yospace ID3 tags and passing those to the Yospace SDK

## [2.5.0] - 2024-07-10

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ This integration completely encapsulates the usage of Yospace. After creating th
2. Install the Bitmovin Player Yospace Integration: `npm i -S @bitmovin/player-integration-yospace`
3. Import the `BitmovinYospacePlayer` into your code: `import { BitmovinYospacePlayer } from '@bitmovin/player-integration-yospace';`
4. Import the Bitmovin `Player` core into your code: `import { Player } from 'bitmovin-player/modules/bitmovinplayer-core';`
5. Add the relevant Bitmovin Player modules to the `Player` object using the static `Player.addModule(...)` API
6. Create a new player instance, and pass the BitmovinPlayerStaticAPI to it: `new BitmovinYospacePlayer(Player, container, config)`
5. Add the relevant Bitmovin Player modules to the `Player` object using the static `Player.addModule(...)` API. Please note that `bitmovinplayer-advertising-core` and `bitmovinplayer-advertising-bitmovin` are required by this integration and must be provided.
6. Create a new player instance, and pass the `BitmovinPlayerStaticAPI` to it: `new BitmovinYospacePlayer(Player, container, config)`
7. Load a `YospaceSourceConfig` with your Yospace HLS/DASH URL. It's a `PlayerConfig` with Yospace-specific extension. Most important extension is the `assetType`, which needs to be set. In addition, HLS is picked before DASH, so if the user wants to play a dash stream the hls config has to be omitted.

```ts
Expand Down
104 changes: 32 additions & 72 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
"author": "Bitmovin",
"license": "MIT",
"dependencies": {
"@yospace/admanagement-sdk": "3.6.0",
"@yospace/admanagement-sdk": "3.6.9",
"fast-safe-stringify": "^2.0.7",
"process": "^0.11.10",
"stream-browserify": "^3.0.0"
},
"peerDependencies": {
"@yospace/admanagement-sdk": "3.6.0",
"bitmovin-player": "^8.157.0"
},
"devDependencies": {
Expand Down
81 changes: 23 additions & 58 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,21 @@
<script type="text/javascript" src="js/bitmovin-player-yospace.js"></script>

<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-core.js"></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-polyfill.js"
></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-polyfill.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-style.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-xml.js"></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-advertising-core.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-advertising-bitmovin.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-mserenderer.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-engine-bitmovin.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-container-mp4.js"
></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-advertising-core.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-advertising-bitmovin.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-mserenderer.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-engine-bitmovin.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-container-mp4.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-hls.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-dash.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-abr.js"></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-container-ts.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-engine-native.js"
></script>
<script
type="text/javascript"
src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-serviceworker-client.js"
></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-container-ts.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-crypto.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-engine-native.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-serviceworker-client.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-tizen.js"></script>
<script type="text/javascript" src="https://cdn.bitmovin.com/player/web/8/modules/bitmovinplayer-webos.js"></script>

Expand Down Expand Up @@ -141,9 +115,7 @@
<div class="input-group mb-3">
<select class="custom-select col-12" id="tearsheet-override">
<option value="0" selected>Override Ad Tearsheet</option>
<option value="55085793" data-id="141403_CNN_Fuji_VPAID_30s_307518956_6.30">
55085793 - Fuji Film 30s
</option>
<option value="55085793" data-id="141403_CNN_Fuji_VPAID_30s_307518956_6.30">55085793 - Fuji Film 30s</option>
<option value="54510215" data-id="139334_CNN_Invesco_Markets_VPAID_15s_306893272_6.28.21">
54510215 - Invesco Limited 15s
</option>
Expand All @@ -153,21 +125,13 @@
<option value="52125737" data-id="138227_CNN_IBM CA Cash_Desktop_15s_VPAID_289436970_NEW_2.25.21">
52125737 - IBM Corp 15s
</option>
<option value="54476788" data-id="141744_CNN_Farmers_Q3_15s_VPAID_2371065_6.24.21">
54476788 - Farmers 15s
</option>
<option value="54476788" data-id="141744_CNN_Farmers_Q3_30s_VPAID_2371066_6.24.21">
54476788 - Farmers 30s
</option>
<option value="54476788" data-id="141744_CNN_Farmers_Q3_15s_VPAID_2371065_6.24.21">54476788 - Farmers 15s</option>
<option value="54476788" data-id="141744_CNN_Farmers_Q3_30s_VPAID_2371066_6.24.21">54476788 - Farmers 30s</option>
<option value="50323493" data-id="138527_CNN_ROS_Tobacco_Free_Kids_293007205_VPAID_30s_1.7">
50323493 - Tobacco Free Kids 30s
</option>
<option value="49929643" data-id="138222_CNN_IBM CA_VPAID_289542595_15s_NEW_2.25.21">
49929643 - IBM Corp-2 30s
</option>
<option value="55085793" data-id="141403_CNN_Fuji_Vpaid_with_mp4_30_307581174_7.1">
55085793 - Fuji Film-2 30s
</option>
<option value="49929643" data-id="138222_CNN_IBM CA_VPAID_289542595_15s_NEW_2.25.21">49929643 - IBM Corp-2 30s</option>
<option value="55085793" data-id="141403_CNN_Fuji_Vpaid_with_mp4_30_307581174_7.1">55085793 - Fuji Film-2 30s</option>
<option value="51153356" data-id="141403_CNN_Fuji_Vpaid_with_mp4_30_307581174_7.1">
51153356 - Association of AM Railroads 15s
</option>
Expand Down Expand Up @@ -382,8 +346,11 @@
var liveSource = {
title: 'Live Stream',
// dash: "https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yosdk01,t2-dash.mpd?yo.av=3", // v0 emsg
dash: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yosdk01,dash.mpd?yo.av=3', // v1 emsg
// dash: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yosdk01,dash.mpd?yo.av=3', // v1 emsg
// hls: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yospace02,hlssample42.m3u8?yo.br=true&yo.av=3',

hls: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yospace02,hlssample42.m3u8?yo.br=true&yo.av=4',

// Yospace configuration
assetType: bitmovin.player.ads.yospace.YospaceAssetType.LINEAR,
};
Expand Down Expand Up @@ -416,8 +383,7 @@
var artOfMotionSource = {
dash: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/mpds/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.mpd',
hls: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8',
progressive:
'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',
progressive: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',
poster: 'https://bitmovin-a.akamaihd.net/content/MI201109210084_1/poster.jpg',
};

Expand All @@ -430,7 +396,7 @@
autoplay: autoplay, // Fix for Pre-roll 'blip' does not work with autoplay enabled
},
logs: {
level: 'none',
level: !isValidationMode ? 'warn' : 'none',
bitmovin: !isValidationMode,
},
ui: false,
Expand Down Expand Up @@ -513,6 +479,7 @@
bitmovin.player.core.Player.addModule(window.bitmovin.player['container-ts'].default);
bitmovin.player.core.Player.addModule(window.bitmovin.player['container-mp4'].default);
bitmovin.player.core.Player.addModule(window.bitmovin.player['engine-native'].default);
bitmovin.player.core.Player.addModule(window.bitmovin.player['crypto'].default);

if (!yospaceConfig.disableServiceWorker) {
bitmovin.player.core.Player.addModule(window.bitmovin.player['serviceworker-client'].default);
Expand Down Expand Up @@ -715,9 +682,7 @@
}

$('#adBreakLabel').text('AdBreak: ' + Number(duration).toFixed(2) + 's remaining');
$('#adLabel').text(
'Ad ' + adCounter + ' of ' + adBreak.ads.length + ': ' + Number(adDuration).toFixed(2) + 's remaining'
);
$('#adLabel').text('Ad ' + adCounter + ' of ' + adBreak.ads.length + ': ' + Number(adDuration).toFixed(2) + 's remaining');
} else {
$('#adBreakLabel').text('AdBreak: false');
$('#adLabel').text('Ad: false');
Expand Down
Loading
Loading