Skip to content

Commit

Permalink
chore: Added support for type in interstitials
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Sep 9, 2024
1 parent b418822 commit c243141
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 4 additions & 2 deletions packages/player/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 8 additions & 2 deletions packages/player/example/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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")!);
Expand Down
1 change: 1 addition & 0 deletions packages/stitcher/src/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const sessionParams = z.object({
z.object({
timeOffset: z.number(),
assetId: z.string(),
type: z.enum(["ad", "bumper"]).optional(),
}),
)
.optional(),
Expand Down

0 comments on commit c243141

Please sign in to comment.