mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-28 06:50:26 +00:00
Add screen share sound effect.
This commit is contained in:
@@ -1288,6 +1288,22 @@ export class CallViewModel extends ViewModel {
|
||||
filter((v) => v.playSounds),
|
||||
);
|
||||
|
||||
/**
|
||||
* Emits an event every time a new screenshare is started in
|
||||
* the call.
|
||||
*/
|
||||
public readonly newScreenShare$ = this.screenShares$.pipe(
|
||||
map((v) => v.length),
|
||||
scan(
|
||||
(acc, newValue) => ({
|
||||
value: newValue,
|
||||
playSounds: newValue > acc.value,
|
||||
}),
|
||||
{ value: 0, playSounds: false },
|
||||
),
|
||||
filter((v) => v.playSounds),
|
||||
);
|
||||
|
||||
public constructor(
|
||||
// A call is permanently tied to a single Matrix room and LiveKit room
|
||||
private readonly matrixRTCSession: MatrixRTCSession,
|
||||
|
||||
Reference in New Issue
Block a user