Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/console-warnings #331

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions demo/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,15 @@ function App() {

/* eslint-disable */

const player = new window.shaka.Player(videoRef.current);
const player = new shaka.Player();
player.attach(videoRef.current);

const onError = (error: { code: unknown }) => {
const onError = (error: shaka.util.Error) => {
console.error("Error code", error.code, "object", error);
};

player.addEventListener("error", (event: { detail: { code: unknown } }) => {
onError(event.detail);
player.addEventListener("error", (event) => {
onError((event as any).detail);
});

engine.configureAndInitShakaPlayer(player);
Expand Down
2 changes: 0 additions & 2 deletions packages/p2p-media-loader-shaka/src/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ export class Engine {
const dashParserFactory = () => new DashManifestParser(shaka);

const Parser = shaka.media.ManifestParser;
Parser.registerParserByExtension("mpd", dashParserFactory);
Parser.registerParserByMime("application/dash+xml", dashParserFactory);
Parser.registerParserByExtension("m3u8", hlsParserFactory);
Parser.registerParserByMime("application/x-mpegurl", hlsParserFactory);
Parser.registerParserByMime(
"application/vnd.apple.mpegurl",
Expand Down
Loading