You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Rename audioOnly to videoMuted
This makes more sense and will match a possible mute events MSC Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -53,13 +53,23 @@ export class CallFeed extends EventEmitter {
|
||||
return this.userId === this.client.getUserId();
|
||||
}
|
||||
|
||||
// TODO: This should be later replaced by a method
|
||||
// that will also check if the remote is muted.
|
||||
// TODO: The two following methods should be later replaced
|
||||
// by something that will also check if the remote is muted
|
||||
/**
|
||||
* Returns true if there are no video tracks, otherwise returns false
|
||||
* @returns {boolean} is audio only?
|
||||
* Returns true if audio is muted or if there are no audio
|
||||
* tracks, otherwise returns false
|
||||
* @returns {boolean} is audio muted?
|
||||
*/
|
||||
public isAudioOnly(): boolean {
|
||||
public isAudioMuted(): boolean {
|
||||
return !this.stream.getTracks().some((track) => track.kind === "audio");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true video is muted or if there are no video
|
||||
* tracks, otherwise returns false
|
||||
* @returns {boolean} is video muted?
|
||||
*/
|
||||
public isVideoMuted(): boolean {
|
||||
// We assume only one video track
|
||||
return !this.stream.getTracks().some((track) => track.kind === "video");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user