Stop the last song from restarting and freezing service-mode lyrics
This commit is contained in:
@@ -41,3 +41,9 @@ test('a new play after pause/source reset is not blocked by a stale promise', as
|
||||
assert.equal(controller.play(audio), fresh); // old completion cannot discard the new request
|
||||
finishes[1](); await fresh;
|
||||
});
|
||||
test('an ended element is never resumed (last song must not restart from 0)', () => {
|
||||
let calls = 0;
|
||||
const audio = { paused: true, ended: true, currentTime: 200, play() { calls++; return Promise.resolve(); } };
|
||||
create().resume(audio, { currentTime: 200 });
|
||||
assert.equal(calls, 0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user