Skip to content

Commit

Permalink
Merge branch 'develop' into feature/fix-tv-samples
Browse files Browse the repository at this point in the history
 Conflicts:
	package-lock.json
	src/index.html
	src/ts/BitmovinYospacePlayer.ts
  • Loading branch information
dweinber committed Jul 12, 2024
2 parents 9df86d3 + da2ca94 commit 647693d
Show file tree
Hide file tree
Showing 9 changed files with 375 additions and 131 deletions.
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@ 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

- `mode` argument to `getCurrentTime` to enable fetching absolute time including ad durations
- `mode` argument to `getDuration` to enable fetching absolute duration including ad durations
- ad immunity feature:

The user will become immune to ad breaks for a duration upon
fully watching an ad break.

Ad breaks played over or seeked past during immunity will be marked
as deactivated, making the user permanently immune to them.

Post-roll ads and ads with unknown positioning are excluded from ad immunity.

By default, pre-rolls are also excluded, since the user needs to finish
an ad break to enter an ad immunity period.

`setAdImmunityConfig(options: AdImmunityConfig): void;`

Returns the current ad immunity configuration.

`getAdImmunityConfig(): AdImmunityConfig;`

Returns a boolean value indicating if the user is currently immune to ad breaks
`isAdImmunityActive(): boolean;`

Immediately starts an ad immunity period, if ad immunity config exists. This method does nothing if ad immunity is already active.
`startAdImmunity(): void;`

Immediately ends an ongoing ad immunity period, before it would naturally expire
`endAdImmunity(): void;`

- ad immunity events to `YospacePlayerEvent` enum

## [2.4.0] - 2024-06-21

### Added
Expand Down Expand Up @@ -334,7 +378,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Initial yospace integration

[unreleased]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.4.0...HEAD
[unreleased]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.5.0...HEAD
[2.5.0]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.3.1...v2.4.0
[2.3.1]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/bitmovin/bitmovin-player-web-integrations-yospace/compare/v2.2.0...v2.3.0
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
108 changes: 34 additions & 74 deletions package-lock.json

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

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitmovin/player-integration-yospace",
"version": "2.4.0",
"version": "2.5.0",
"description": "Yospace integration for the Bitmovin Player",
"main": "./dist/js/bitmovin-player-yospace.js",
"types": "./dist/js/main.d.ts",
Expand Down Expand Up @@ -35,13 +35,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
21 changes: 21 additions & 0 deletions src/ts/BitmovinYospacePlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import {
YospacePlayerType,
YospacePolicyErrorCode,
YospaceSourceConfig,
AdImmunityConfig,
} from './BitmovinYospacePlayerAPI';
import { Logger } from './Logger';
import { BitmovinYospaceHelper } from './BitmovinYospaceHelper';
Expand Down Expand Up @@ -569,5 +570,25 @@ export class BitmovinYospacePlayer implements BitmovinYospacePlayerAPI {
return this.player.getAspectRatio();
}

getAdImmunityConfig() {
return this.player.getAdImmunityConfig();
}

isAdImmunityActive() {
return this.player.isAdImmunityActive();
}

startAdImmunity() {
this.player.startAdImmunity();
}

endAdImmunity() {
this.player.endAdImmunity();
}

setAdImmunityConfig(options: AdImmunityConfig) {
this.player.setAdImmunityConfig(options);
}

readonly drm: DrmAPI;
}
Loading

0 comments on commit 647693d

Please sign in to comment.