Skip to content

Commit

Permalink
fix(FEC-11611): Pass the program ID when sending a bookmark (#615)
Browse files Browse the repository at this point in the history
Description of the Changes
add setSourcesMetadata api (to enable dynamically cofigure the epgId (programId) in the sources.metadata)

related pr:
kaltura/playkit-js-providers#155
kaltura/playkit-js-ott-analytics#64
kaltura/kaltura-player-js#504
kaltura/kaltura-player-js#503
  • Loading branch information
JonathanTGold authored Nov 9, 2021
1 parent a0853ac commit ff40c3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flow-typed/types/metadata-config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// @flow
declare type PKMetadataConfigObject = {
name?: string,
description?: string
description?: string,
mediaType?: string,
metas?: Object,
tags?: Object,
epgId?: string,
recordingId?: string
};
14 changes: 14 additions & 0 deletions src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,20 @@ export default class Player extends FakeEventTarget {
this._applyABRRestriction(config);
}

/**
* Configures the player metadata according to a given configuration.
* @param {PKMetadataConfigObject} sourcesMetadata - The sources metadata for the player instance.
* @returns {void}
*/
setSourcesMetadata(sourcesMetadata: PKMetadataConfigObject): void {
if (this._sources) {
if (!this._sources.metadata) {
this._sources.metadata = {};
}
Utils.Object.mergeDeep(this._sources.metadata, sourcesMetadata);
}
}

/**
* Configures the player according to a given configuration.
* @param {PKSourcesConfigObject} sources - The sources for the player instance.
Expand Down

0 comments on commit ff40c3f

Please sign in to comment.