-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add TypeScript interfaces for all exported classes (#1463)
- Loading branch information
Showing
67 changed files
with
4,735 additions
and
3,695 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import type { EnhancedEventEmitter } from './enhancedEvents'; | ||
import type { | ||
RtpObserver, | ||
RtpObserverEvents, | ||
RtpObserverObserverEvents, | ||
} from './RtpObserverTypes'; | ||
import type { Producer } from './ProducerTypes'; | ||
import type { AppData } from './types'; | ||
|
||
export type ActiveSpeakerObserverOptions< | ||
ActiveSpeakerObserverAppData extends AppData = AppData, | ||
> = { | ||
interval?: number; | ||
|
||
/** | ||
* Custom application data. | ||
*/ | ||
appData?: ActiveSpeakerObserverAppData; | ||
}; | ||
|
||
export type ActiveSpeakerObserverDominantSpeaker = { | ||
/** | ||
* The audio Producer instance. | ||
*/ | ||
producer: Producer; | ||
}; | ||
|
||
export type ActiveSpeakerObserverEvents = RtpObserverEvents & { | ||
dominantspeaker: [ActiveSpeakerObserverDominantSpeaker]; | ||
}; | ||
|
||
export type ActiveSpeakerObserverObserver = | ||
EnhancedEventEmitter<ActiveSpeakerObserverObserverEvents>; | ||
|
||
export type ActiveSpeakerObserverObserverEvents = RtpObserverObserverEvents & { | ||
dominantspeaker: [ActiveSpeakerObserverDominantSpeaker]; | ||
}; | ||
|
||
export interface ActiveSpeakerObserver< | ||
ActiveSpeakerObserverAppData extends AppData = AppData, | ||
> extends RtpObserver< | ||
ActiveSpeakerObserverAppData, | ||
ActiveSpeakerObserverEvents, | ||
ActiveSpeakerObserverObserver | ||
> { | ||
/** | ||
* RtpObserver type. | ||
* | ||
* @override | ||
*/ | ||
get type(): 'activespeaker'; | ||
|
||
/** | ||
* Observer. | ||
* | ||
* @override | ||
*/ | ||
get observer(): ActiveSpeakerObserverObserver; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.