Show time left for voice broadcast recordings (#9564)

This commit is contained in:
Michael Weimann 2022-11-10 11:53:49 +01:00 committed by GitHub
parent 962e8e0b23
commit f6347d24ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 469 additions and 145 deletions

View file

@ -37,7 +37,16 @@ jest.mock("../../../../src/components/views/avatars/RoomAvatar", () => ({
}),
}));
jest.mock("../../../../src/audio/VoiceRecording");
// mock VoiceRecording because it contains all the audio APIs
jest.mock("../../../../src/audio/VoiceRecording", () => ({
VoiceRecording: jest.fn().mockReturnValue({
disableMaxLength: jest.fn(),
liveData: {
onUpdate: jest.fn(),
},
start: jest.fn(),
}),
}));
describe("VoiceBroadcastRecordingPip", () => {
const roomId = "!room:example.com";

View file

@ -32,6 +32,18 @@ exports[`VoiceBroadcastRecordingPip when rendering a paused recording should ren
@userId:matrix.org
</span>
</div>
<div
class="mx_VoiceBroadcastHeader_line"
>
<div
class="mx_Icon mx_Icon_16"
/>
<span
class="mx_Clock"
>
4h 0m 0s left
</span>
</div>
</div>
<div
class="mx_LiveBadge"
@ -105,6 +117,18 @@ exports[`VoiceBroadcastRecordingPip when rendering a started recording should re
@userId:matrix.org
</span>
</div>
<div
class="mx_VoiceBroadcastHeader_line"
>
<div
class="mx_Icon mx_Icon_16"
/>
<span
class="mx_Clock"
>
4h 0m 0s left
</span>
</div>
</div>
<div
class="mx_LiveBadge"