Do not resume voice broadcasts on seek (#9686)
parent
2d9fa81cf5
commit
f117548b38
|
@ -387,7 +387,7 @@ export class VoiceBroadcastPlayback
|
||||||
const offsetInChunk = time - this.chunkEvents.getLengthTo(event);
|
const offsetInChunk = time - this.chunkEvents.getLengthTo(event);
|
||||||
await skipToPlayback.skipTo(offsetInChunk / 1000);
|
await skipToPlayback.skipTo(offsetInChunk / 1000);
|
||||||
|
|
||||||
if (currentPlayback !== skipToPlayback) {
|
if (this.state === VoiceBroadcastPlaybackState.Playing && !skipToPlayback.isPlaying) {
|
||||||
await skipToPlayback.play();
|
await skipToPlayback.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -407,6 +407,17 @@ describe("VoiceBroadcastPlayback", () => {
|
||||||
describe("and calling stop", () => {
|
describe("and calling stop", () => {
|
||||||
stopPlayback();
|
stopPlayback();
|
||||||
itShouldSetTheStateTo(VoiceBroadcastPlaybackState.Stopped);
|
itShouldSetTheStateTo(VoiceBroadcastPlaybackState.Stopped);
|
||||||
|
|
||||||
|
describe("and skipping to somewhere in the middle of the first chunk", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
mocked(chunk1Playback.play).mockClear();
|
||||||
|
await playback.skipTo(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should not start the playback", () => {
|
||||||
|
expect(chunk1Playback.play).not.toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("and calling destroy", () => {
|
describe("and calling destroy", () => {
|
||||||
|
|
Loading…
Reference in New Issue