Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/early-loops-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theoplayer/yospace-connector-web': major
---

Removed `isPlaceholder()` and `isEncoded()` type definitions since they were removed in Yospace Ad Management SDK 3.11.0.
5 changes: 5 additions & 0 deletions .changeset/eleven-things-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theoplayer/yospace-connector-web': major
---

Replaced `PlaybackMode` with `SessionMode` for compatibility with Yospace Ad Management SDK 3.10.0+. This change brings the minimum supported Yospace Ad Management SDK version to 3.10.0.
5 changes: 5 additions & 0 deletions .changeset/khaki-sloths-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@theoplayer/yospace-connector-web': patch
---

Fixed an exception when an ad break starts without data during live playback.
2 changes: 1 addition & 1 deletion yospace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ In order to use this connector, a [THEOplayer](https://www.npmjs.com/package/the

For setting up a valid Yospace session, the Yospace Ad Management SDK is required. For more information on how to install the Ad Management SDK, please refer to the documentation of [Yospace](https://docs.yospace.com/library/technical/sdks/en/ad-management-sdks-v3/javascript.html).

**Remark:** This version of the Yospace Connector is compatible with Yospace Ad Management SDK version 3.5.2 or higher. If you still want to use an older Ad Management SDK, please use the connector version 1.4.0.
**Remark:** This version of the Yospace Connector is compatible with Yospace Ad Management SDK version 3.10.0 or higher. If you still want to use an older Ad Management SDK, please use the connector version 2.8.0 or earlier.

## Installation

Expand Down
9 changes: 8 additions & 1 deletion yospace/src/integration/YospaceAdHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ export class YospaceAdHandler {
};
}

private onAdvertBreakStart(yospaceAdBreak: YospaceAdBreak) {
private onAdvertBreakStart(yospaceAdBreak: YospaceAdBreak | null) {
if (yospaceAdBreak === null) {
// During live playback, an ad break may be started without any information
this.currentAdBreak = this.adIntegrationController?.createAdBreak({
timeOffset: this.player.currentTime
});
return;
}
this.currentAdBreak = this.getOrCreateAdBreak(yospaceAdBreak, true);
}

Expand Down
4 changes: 2 additions & 2 deletions yospace/src/integration/YospaceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
import { getFirstYospaceTypedSource, type YospaceTypedSource, yoSpaceWebSdkIsAvailable } from '../utils/YospaceUtils';
import { PlayerEvent } from '../yospace/PlayerEvent';
import {
PlaybackMode,
SessionMode,
ResultCode,
SessionState,
type YospaceSession,
Expand Down Expand Up @@ -298,7 +298,7 @@ export class YospaceManager extends DefaultEventDispatcher<YospaceEventMap> {
}

function isSessionDVRLive(session: YospaceSession): session is YospaceSessionDVRLive {
return session.getPlaybackMode() === PlaybackMode.DVRLIVE;
return session.getSessionMode() === SessionMode.DVRLIVE;
}

function createIntegrationHandler(yospaceManager: YospaceManager): ServerSideAdIntegrationHandler {
Expand Down
2 changes: 0 additions & 2 deletions yospace/src/yospace/AdBreak.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export interface Resource {
getCreativeType(): string;
getResourceType(): ResourceType;
getStringData(): string;
isEncoded(): boolean;
}

export interface CreativeEventHandler {
Expand Down Expand Up @@ -117,7 +116,6 @@ export interface AdBreak {
getType(): BreakType;
getDuration(): number;
getIdentifier(): string;
isPlaceholder(): boolean;
getPosition(): BreakPosition;
getRemainingTime(): number;
getStart(): number;
Expand Down
6 changes: 3 additions & 3 deletions yospace/src/yospace/YospaceSessionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export enum SessionState {
SHUT_DOWN
}

export enum PlaybackMode {
export enum SessionMode {
LIVE = 0,
DVRLIVE = 1,
VOD = 2
Expand All @@ -31,7 +31,7 @@ export type YospaceSessionManagerCreator = {
export interface YospaceSession {
getAdBreakForAdvert(advert: AdVert): AdBreak | undefined;

getPlaybackMode(): PlaybackMode;
getSessionMode(): SessionMode;

getPlaybackUrl(): string;

Expand All @@ -53,7 +53,7 @@ export interface YospaceSession {
}

export interface YospaceSessionDVRLive extends YospaceSession {
getPlaybackMode(): PlaybackMode.DVRLIVE;
getSessionMode(): SessionMode.DVRLIVE;

getDuration(): number;

Expand Down
2 changes: 1 addition & 1 deletion yospace/test/pages/main_esm.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const source = {
sources: [
{
src: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yospace02,hlssample42.m3u8?yo.br=true&yo.av=4',
src: 'https://csm-e-sdk-validation-eb.bln1.yospace.com/csm/extlive/yosdk02,hls-ts-pre.m3u8?yo.av=5',
ssai: {
integration: 'yospace'
}
Expand Down
2 changes: 1 addition & 1 deletion yospace/test/pages/main_umd.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
const source = {
sources: [
{
src: 'https://csm-e-sdk-validation.bln1.yospace.com/csm/extlive/yospace02,hlssample42.m3u8?yo.br=true&yo.av=4',
src: 'https://csm-e-sdk-validation-eb.bln1.yospace.com/csm/extlive/yosdk02,hls-ts-pre.m3u8?yo.av=5',
ssai: {
integration: 'yospace'
}
Expand Down
Loading