diff --git a/.changeset/gold-singers-hide.md b/.changeset/gold-singers-hide.md new file mode 100644 index 00000000..63f9acb6 --- /dev/null +++ b/.changeset/gold-singers-hide.md @@ -0,0 +1,5 @@ +--- +"@millicast/sdk": patch +--- + +Aligning types for sourceId property within project method and global types .d.ts file diff --git a/packages/millicast-sdk/src/View.js b/packages/millicast-sdk/src/View.js index 6af6e3f7..c6f50bb7 100644 --- a/packages/millicast-sdk/src/View.js +++ b/packages/millicast-sdk/src/View.js @@ -158,7 +158,7 @@ export default class View extends BaseWebRTC { /** * Start projecting source in selected media ids. - * @param {String} sourceId - Selected source id. + * @param {String | null} sourceId - Selected source id. * @param {Array} mapping - Mapping of the source track ids to the receiver mids * @param {String} [mapping.trackId] - Track id from the source (received on the "active" event), if not set the media kind will be used instead. * @param {String} [mapping.media] - Track kind of the source ('audio' | 'video'), if not set the trackId will be used instead. diff --git a/packages/millicast-sdk/src/types/index.d.ts b/packages/millicast-sdk/src/types/index.d.ts index f5fe8cb7..826171a0 100644 --- a/packages/millicast-sdk/src/types/index.d.ts +++ b/packages/millicast-sdk/src/types/index.d.ts @@ -532,7 +532,7 @@ declare module '@millicast/sdk' { previousStats: ConnectionStats; /** * Initialize the statistics monitoring of the RTCPeerConnection. - * @param {statsIntervalMs} the interval, in ms, at which stats are returned to the user. + * @param {statsIntervalMs} the interval, in ms, at which stats are returned to the user. */ init(statsIntervalMs: number): void; /** @@ -558,7 +558,7 @@ declare module '@millicast/sdk' { export type MediaStreamSource = { readonly streamId: string; - sourceId: string; + sourceId: string | null; readonly tracks: MediaTrackInfo[]; }