Add voice broadcast playback seekbar (#9529)

This commit is contained in:
Michael Weimann 2022-11-04 11:50:19 +01:00 committed by GitHub
parent 04bc8fb71c
commit 66d0b318bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 339 additions and 70 deletions

View file

@ -60,7 +60,7 @@ describe("VoiceBroadcastPlaybackBody", () => {
playback = new VoiceBroadcastPlayback(infoEvent, client);
jest.spyOn(playback, "toggle").mockImplementation(() => Promise.resolve());
jest.spyOn(playback, "getState");
jest.spyOn(playback, "getLength").mockReturnValue((23 * 60 + 42) * 1000); // 23:42
jest.spyOn(playback, "durationSeconds", "get").mockReturnValue(23 * 60 + 42); // 23:42
});
describe("when rendering a buffering voice broadcast", () => {

View file

@ -67,6 +67,16 @@ exports[`VoiceBroadcastPlaybackBody when rendering a 0 broadcast should render a
<div
class="mx_VoiceBroadcastBody_timerow"
>
<input
class="mx_SeekBar"
max="1"
min="0"
step="0.001"
style="--fillTo: 0;"
tabindex="0"
type="range"
value="0"
/>
<span
class="mx_Clock"
>
@ -144,6 +154,16 @@ exports[`VoiceBroadcastPlaybackBody when rendering a 1 broadcast should render a
<div
class="mx_VoiceBroadcastBody_timerow"
>
<input
class="mx_SeekBar"
max="1"
min="0"
step="0.001"
style="--fillTo: 0;"
tabindex="0"
type="range"
value="0"
/>
<span
class="mx_Clock"
>
@ -222,6 +242,16 @@ exports[`VoiceBroadcastPlaybackBody when rendering a buffering voice broadcast s
<div
class="mx_VoiceBroadcastBody_timerow"
>
<input
class="mx_SeekBar"
max="1"
min="0"
step="0.001"
style="--fillTo: 0;"
tabindex="0"
type="range"
value="0"
/>
<span
class="mx_Clock"
>
@ -299,6 +329,16 @@ exports[`VoiceBroadcastPlaybackBody when rendering a stopped broadcast and the l
<div
class="mx_VoiceBroadcastBody_timerow"
>
<input
class="mx_SeekBar"
max="1"
min="0"
step="0.001"
style="--fillTo: 0;"
tabindex="0"
type="range"
value="0"
/>
<span
class="mx_Clock"
>