From c24314117ceaf20457ca585c6586377646ff312f Mon Sep 17 00:00:00 2001 From: Matthias Van Parijs Date: Mon, 9 Sep 2024 21:31:21 +0200 Subject: [PATCH] chore: Added support for type in interstitials --- packages/player/README.md | 6 ++++-- packages/player/example/main.tsx | 10 ++++++++-- packages/stitcher/src/contract.ts | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/player/README.md b/packages/player/README.md index edc2883c..395cc35a 100644 --- a/packages/player/README.md +++ b/packages/player/README.md @@ -4,14 +4,16 @@ Using https://www.svgrepo.com/collection/solar-broken-line-icons for icons. ## Bugs -- When we have a preroll interstitial and we select the subtitle, it will only respect the first selected subtitle. Changing subtitle afterwards has no effect. - - When interstitials startTime is beyond the end of the content duration, there are stalls sometimes and content stops buffering. This can be replicated manually when setting interstitials further away. +- When we have a preroll interstitial and we select the subtitle, it will only respect the first selected subtitle. Changing subtitle afterwards has no effect. + - Selecting audio and quality during interstitials works for the main asset, but subtitles not. - Seeking to `this.getInterstitialsManager_().integrated.duration` does not work properly. +- Seeking over interstitial will play interstitial but will not seek back to the original seek position given in `integrated.seekTo` + - InterstitialEvent should contain custom tags (like X-MIX-TYPES). - Need to talk about ABR & interstitials, do they share the same instance? Same bandwidth estimation? That might give troubles as for all we know eg; interstitials might be on a different CDN. diff --git a/packages/player/example/main.tsx b/packages/player/example/main.tsx index 3ac92889..ee34c237 100644 --- a/packages/player/example/main.tsx +++ b/packages/player/example/main.tsx @@ -2,7 +2,9 @@ import { HlsFacade, HlsUi } from "../lib/main"; import Hls from "hls.js"; import ReactDOM from "react-dom/client"; -const hls = new Hls(); +const hls = new Hls({ + debug: true, +}); const mediaElement = document.querySelector("video")!; hls.attachMedia(mediaElement); @@ -18,8 +20,12 @@ hls.loadSource( // "https://playertest.longtailvideo.com/adaptive/elephants_dream_v4/redundant.m3u8", // "http://127.0.0.1:52002/session/260c015b-966f-4cc4-8373-ab859379a27d/master.m3u8", // "http://127.0.0.1:52002/session/d8f508ab-8c93-41fa-9afe-63a784477d8b/master.m3u8", - "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8", + // "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8", // "http://127.0.0.1:52002/session/a7b1551f-5baf-4859-b783-b3c674a77690/master.m3u8", + // "http://127.0.0.1:52002/session/502a700c-9c75-4a17-8017-bb8a4ff41d6e/master.m3u8", + // "http://127.0.0.1:52002/session/8cdde3ca-0e2b-4531-83f0-3694b4975751/master.m3u8", + // "http://127.0.0.1:52002/session/f2f9c183-4ccd-4465-b9ea-2c50325d27ad/master.m3u8", + "http://127.0.0.1:52002/session/1f4e9f22-08c9-46cf-9ba7-452501425d99/master.m3u8", ); const root = ReactDOM.createRoot(document.getElementById("root")!); diff --git a/packages/stitcher/src/contract.ts b/packages/stitcher/src/contract.ts index 832fd8ab..14786d47 100644 --- a/packages/stitcher/src/contract.ts +++ b/packages/stitcher/src/contract.ts @@ -11,6 +11,7 @@ const sessionParams = z.object({ z.object({ timeOffset: z.number(), assetId: z.string(), + type: z.enum(["ad", "bumper"]).optional(), }), ) .optional(),