Skip to content

Commit

Permalink
Fix the acceptable value types for sourceId to ensure consistency. (#476
Browse files Browse the repository at this point in the history
)
  • Loading branch information
snoh666 authored Nov 6, 2024
1 parent 83384a6 commit 5d25d25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-singers-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@millicast/sdk": patch
---

Aligning types for sourceId property within project method and global types .d.ts file
2 changes: 1 addition & 1 deletion packages/millicast-sdk/src/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>} 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.
Expand Down
4 changes: 2 additions & 2 deletions packages/millicast-sdk/src/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand All @@ -558,7 +558,7 @@ declare module '@millicast/sdk' {

export type MediaStreamSource = {
readonly streamId: string;
sourceId: string;
sourceId: string | null;
readonly tracks: MediaTrackInfo[];
}

Expand Down

0 comments on commit 5d25d25

Please sign in to comment.