Retire cancelled playback sessions and preserve VOD content time
Adapted from MikaelKW/nodecast-tv-plus playback lease work beginning at 43a58c7685f541498663b827c4b9d6b3753e7202. Reject superseded requests, release on cancellation, bound live restart attempts and await FFmpeg close before deleting cache. Co-authored-by: Mikael <mikaelkwessel@gmail.com>
This commit is contained in:
@ -70,4 +70,18 @@ for (const name of ['VideoPlayer', 'WatchPage']) {
|
||||
await playing;
|
||||
assert.equal(player.video.src, '');
|
||||
});
|
||||
test(`${name} ignores a failed automatic probe after playback stops`, async () => {
|
||||
let fail, started;
|
||||
const probing = new Promise(resolve => { started = resolve; });
|
||||
const player = playerFixture(name, { autoTranscode: true }, () => {
|
||||
started();
|
||||
return new Promise((resolve, reject) => { fail = reject; });
|
||||
});
|
||||
const playing = player.start('http://provider.test/movie.mp4');
|
||||
await probing;
|
||||
player.stop();
|
||||
fail(new Error('Provider unavailable'));
|
||||
await playing;
|
||||
assert.equal(player.video.src, '');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user