@fishjam-cloud/ts-client 0.25.3 → 0.26.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +35 -0
- package/dist/index.mjs +1 -1
- package/dist/index.react-native.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -603,6 +603,24 @@ declare class WebRTCEndpoint extends WebRTCEndpoint_base {
|
|
|
603
603
|
* ```
|
|
604
604
|
*/
|
|
605
605
|
connect: (metadata: unknown) => void;
|
|
606
|
+
/**
|
|
607
|
+
* Returns the current audio level for a local audio track, if available.
|
|
608
|
+
*
|
|
609
|
+
* This method only works for local **audio** tracks that have been negotiated
|
|
610
|
+
* with the remote peer and for which an underlying `RTCRtpSender` and
|
|
611
|
+
* statistics are available.
|
|
612
|
+
*
|
|
613
|
+
* @param trackId - Identifier of the local track to query, as used when
|
|
614
|
+
* adding or managing local tracks on this endpoint.
|
|
615
|
+
* @returns A promise that resolves to `{ level: number }` when an audio
|
|
616
|
+
* level can be determined for the given track, or `null` if:
|
|
617
|
+
* - the track does not exist,
|
|
618
|
+
* - the track is not an audio track,
|
|
619
|
+
* - the track has not yet been negotiated / no sender exists
|
|
620
|
+
*/
|
|
621
|
+
getLocalTrackAudioLevel(trackId: string): Promise<{
|
|
622
|
+
level: number;
|
|
623
|
+
} | null>;
|
|
606
624
|
/**
|
|
607
625
|
* Feeds media event received from RTC Engine to {@link WebRTCEndpoint}.
|
|
608
626
|
* This function should be called whenever some media event from RTC Engine
|
|
@@ -1572,6 +1590,23 @@ declare class FishjamClient<PeerMetadata = GenericMetadata, ServerMetadata = Gen
|
|
|
1572
1590
|
*/
|
|
1573
1591
|
disconnect(): void;
|
|
1574
1592
|
cleanup(): void;
|
|
1593
|
+
/**
|
|
1594
|
+
* Returns the current audio level for a local track.
|
|
1595
|
+
*
|
|
1596
|
+
* The `level` represents a normalized audio level in the range 0.0–1.0,
|
|
1597
|
+
* derived from WebRTC statistics for the given local audio track.
|
|
1598
|
+
*
|
|
1599
|
+
* This method returns `null` when the WebRTC layer is not initialized, when the track
|
|
1600
|
+
* cannot be found among local tracks, or when audio statistics are not yet or no longer
|
|
1601
|
+
* available for the track.
|
|
1602
|
+
*
|
|
1603
|
+
* @param trackId - The ID of the local track to query.
|
|
1604
|
+
* @returns A promise resolving to an object containing the audio `level`, or `null`
|
|
1605
|
+
* if the track is unknown or stats are not available.
|
|
1606
|
+
*/
|
|
1607
|
+
getLocalTrackAudioLevel(trackId: string): Promise<{
|
|
1608
|
+
level: number;
|
|
1609
|
+
} | null>;
|
|
1575
1610
|
}
|
|
1576
1611
|
|
|
1577
1612
|
type ReceiveLivestreamResult = {
|