Skip to content

Commit b303aab

Browse files
committed
chore: methods for participant should be able to work for gamesource
1 parent a716615 commit b303aab

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@api.stream/studio-kit",
3-
"version": "3.0.31",
3+
"version": "3.0.32",
44
"description": "Client SDK for building studio experiences with API.stream",
55
"license": "MIT",
66
"private": false,

src/helpers/sceneless-project.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -397,15 +397,15 @@ export interface Commands {
397397
getParticipantNode(
398398
id: string,
399399
/** @default `'camera'` */
400-
type?: ParticipantType,
400+
type?: ParticipantType | ExternalSourceType,
401401
): Compositor.SceneNode
402402
/**
403403
* Get {@link ParticipantProps} associated with a participant/type.
404404
*/
405405
getParticipantState(
406406
participantId: string,
407407
/** @default `'camera'` */
408-
type?: ParticipantType,
408+
type?: ParticipantType | ExternalSourceType,
409409
): ParticipantProps
410410
/**
411411
* @hook
@@ -416,7 +416,7 @@ export interface Commands {
416416
participantId: string,
417417
cb: (state: ParticipantProps) => void,
418418
/** @default `'camera'` */
419-
type?: ParticipantType,
419+
type?: ParticipantType | ExternalSourceType,
420420
): Disposable
421421
/**
422422
* Change a participant's volume.
@@ -428,7 +428,7 @@ export interface Commands {
428428
* Accepted values from [0 - 1]
429429
*/
430430
volume: number,
431-
type?: ParticipantType,
431+
type?: ParticipantType | ExternalSourceType,
432432
): void
433433
/**
434434
* Mute a participant without changing their volume.
@@ -444,7 +444,7 @@ export interface Commands {
444444
participantId: string,
445445
isMuted: boolean,
446446
/** @default `camera` */
447-
type?: ParticipantType,
447+
type?: ParticipantType | ExternalSourceType,
448448
): void
449449
/**
450450
* Hide a participant video feed from the stream.
@@ -460,13 +460,13 @@ export interface Commands {
460460
participantId: string,
461461
isHidden: boolean,
462462
/** @default `camera` */
463-
type?: ParticipantType,
463+
type?: ParticipantType | ExternalSourceType,
464464
): void
465465
setParticipantAudioOnly(
466466
participantId: string,
467467
isAudioOnly: boolean,
468468
/** @default `camera` */
469-
type?: ParticipantType,
469+
type?: ParticipantType | ExternalSourceType,
470470
): void
471471
/**
472472
* Remove all participants from the stream canvas who are not actively
@@ -1981,7 +1981,7 @@ export const commands = (_project: ScenelessProject) => {
19811981
})
19821982
})
19831983
},
1984-
getParticipantNode(id: string, type: ParticipantType = 'camera') {
1984+
getParticipantNode(id: string, type: ParticipantType | ExternalSourceType = 'camera') {
19851985
return content.children
19861986
.concat(audioContainer.children)
19871987
.find(
@@ -1992,7 +1992,7 @@ export const commands = (_project: ScenelessProject) => {
19921992
},
19931993
getParticipantState(
19941994
participantId: string,
1995-
type: ParticipantType = 'camera',
1995+
type: ParticipantType | ExternalSourceType = 'camera',
19961996
) {
19971997
return commands.getParticipantNode(participantId, type)
19981998
?.props as ParticipantProps
@@ -2001,7 +2001,7 @@ export const commands = (_project: ScenelessProject) => {
20012001
useParticipantState(
20022002
participantId: string,
20032003
cb: (state: ParticipantProps) => void,
2004-
type = 'camera' as ParticipantType,
2004+
type = 'camera' as ParticipantType | ExternalSourceType,
20052005
) {
20062006
let participantNode = commands.getParticipantNode(participantId, type)
20072007

@@ -2040,7 +2040,7 @@ export const commands = (_project: ScenelessProject) => {
20402040
setParticipantVolume(
20412041
participantId: string,
20422042
volume: number,
2043-
type: ParticipantType = 'camera',
2043+
type: ParticipantType | ExternalSourceType = 'camera',
20442044
) {
20452045
const node = commands.getParticipantNode(participantId, type)
20462046
if (!node) return
@@ -2054,7 +2054,7 @@ export const commands = (_project: ScenelessProject) => {
20542054
setParticipantMuted(
20552055
participantId: string,
20562056
isMuted: boolean,
2057-
type: ParticipantType = 'camera',
2057+
type: ParticipantType | ExternalSourceType = 'camera',
20582058
) {
20592059
const node = commands.getParticipantNode(participantId, type)
20602060
if (!node) return
@@ -2068,7 +2068,7 @@ export const commands = (_project: ScenelessProject) => {
20682068
setParticipantHidden(
20692069
participantId: string,
20702070
isHidden: boolean,
2071-
type: ParticipantType = 'camera',
2071+
type: ParticipantType | ExternalSourceType = 'camera',
20722072
) {
20732073
const node = commands.getParticipantNode(participantId, type)
20742074
if (!node) return
@@ -2082,7 +2082,7 @@ export const commands = (_project: ScenelessProject) => {
20822082
setParticipantAudioOnly(
20832083
participantId: string,
20842084
isAudioOnly: boolean,
2085-
type: ParticipantType = 'camera',
2085+
type: ParticipantType | ExternalSourceType = 'camera',
20862086
) {
20872087
const node = commands.getParticipantNode(participantId, type)
20882088
if (!node) return

0 commit comments

Comments
 (0)