Display total VOD duration from provider metadata and stream probes

Adapted from MikaelKW/nodecast-tv-plus commit 9c6416cdba40813d44d21c8d76e31e4d9ab3155f.

Co-authored-by: Mikael <mikaelkwessel@gmail.com>
This commit is contained in:
Technomancer702
2026-10-12 16:42:23 -07:00
parent bd8365efc8
commit 2999d6542f
8 changed files with 165 additions and 9 deletions

View File

@ -21,7 +21,7 @@ test('probe preserves every audio track index including unknown codecs', () => {
function playerFixture(name, settings, probe) {
const window = { dispatchEvent() {} };
const context = { window, console: { log() {}, warn() {}, error() {} },
const context = { window, VodDuration: require('../public/js/components/VodDuration'), console: { log() {}, warn() {}, error() {} },
CustomEvent: class {}, document: { getElementById() { return null; } },
API: { settings: { get: async () => settings } }, fetch: probe };
const file = name === 'VideoPlayer' ? 'components/VideoPlayer.js' : 'pages/WatchPage.js';