From f7c69c2e10538911259afade20eb77e130cc2908 Mon Sep 17 00:00:00 2001 From: Santiago Souto Date: Mon, 10 Jun 2024 20:35:48 -0300 Subject: [PATCH] Make metadata optional. Missed additional review changes (#370) * Make metadata optional. Not enabled by default * Turn variable into const * Add missed review changes * Bump RC version --------- Co-authored-by: Shivank Dubey <110578314+dubeyShivank@users.noreply.github.com> --- packages/millicast-sdk/package-lock.json | 4 ++-- packages/millicast-sdk/package.json | 2 +- packages/millicast-sdk/src/Publish.js | 4 +--- packages/millicast-sdk/src/types/index.d.ts | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/millicast-sdk/package-lock.json b/packages/millicast-sdk/package-lock.json index 0cf95cde..4e6bfa07 100644 --- a/packages/millicast-sdk/package-lock.json +++ b/packages/millicast-sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "@millicast/sdk", - "version": "0.1.45", + "version": "0.1.46-RC1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@millicast/sdk", - "version": "0.1.45", + "version": "0.1.46-RC1", "license": "See in LICENSE file", "dependencies": { "@dolbyio/webrtc-stats": "^0.4.0", diff --git a/packages/millicast-sdk/package.json b/packages/millicast-sdk/package.json index d3ccd39a..87510042 100644 --- a/packages/millicast-sdk/package.json +++ b/packages/millicast-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@millicast/sdk", - "version": "0.1.45", + "version": "0.1.46-RC1", "description": "SDK for building a realtime broadcaster using the Millicast platform.", "keywords": [ "sdk", diff --git a/packages/millicast-sdk/src/Publish.js b/packages/millicast-sdk/src/Publish.js index 2e4eaf83..b5985089 100644 --- a/packages/millicast-sdk/src/Publish.js +++ b/packages/millicast-sdk/src/Publish.js @@ -201,9 +201,7 @@ export default class Publish extends BaseWebRTC { publisherData = await this.tokenGenerator() // Set the iceServers from the publish data into the peerConfig this.options.peerConfig.iceServers = publisherData?.iceServers - if (this.options.metadata) { - this.options.peerConfig.encodedInsertableStreams = supportsInsertableStreams - } + this.options.peerConfig.encodedInsertableStreams = this.options.metadata } catch (error) { logger.error('Error generating token.') if (error instanceof FetchError) { diff --git a/packages/millicast-sdk/src/types/index.d.ts b/packages/millicast-sdk/src/types/index.d.ts index a2a49696..8ede85bd 100644 --- a/packages/millicast-sdk/src/types/index.d.ts +++ b/packages/millicast-sdk/src/types/index.d.ts @@ -1072,7 +1072,7 @@ declare module '@millicast/sdk' { */ absCaptureTime?: boolean; /** - * - Enable metadata extraction if stream is compatible. + * - Enable metadata extraction. This feature is only supported with the H.264 codec. */ metadata?: boolean; /** @@ -1161,7 +1161,7 @@ declare module '@millicast/sdk' { */ bandwidth?: number; /** - * - Enable metadata insertion if stream is compatible. + * - Enable metadata insertion. This feature is only supported with the H.264 codec. */ metadata?: boolean; /**