IVS Player 1.14.0 - Uncaught SyntaxError

0

Hi,

I'm working on integrating Amazon's IVS Player with VideoJS, using React. Following the documentation here.

Ran into the error below, so I've taken the sample code found here and tried to run it in my current application, but getting the same error.

Error Message: Error:

When clicking into the error, it points to the below: Error points to

Here is my code:

// Amazon IVS Player
import {
  registerIVSTech,
  registerIVSQualityPlugin,
  VideoJSEvents,
  VideoJSIVSTech,
  VideoJSQualityPlugin,
} from "amazon-ivs-player";
// @ts-ignore
import wasmBinaryPath from "amazon-ivs-player/dist/assets/amazon-ivs-wasmworker.min.wasm";
import wasmWorkerPath from "amazon-ivs-player/dist/assets/amazon-ivs-wasmworker.min.js";

registerIVSTech(videojs, {
     wasmWorker: createAbsolutePath(wasmWorkerPath),
     wasmBinary: createAbsolutePath(wasmBinaryPath),
});

registerIVSQualityPlugin(videojs);

const livePlayer = videojs(
          videoRef.current,
          {
            techOrder: ["AmazonIVS"],
            autoplay: true,
            poster: poster,
            controls: false,
            fill: true,
            muted: false,
            responsive: true,
            html5: {
              nativeAudioTracks: true,
              nativeVideoTracks: true,
              nativeTextTracks: true,
            },
            controlBar: {
              volumePanel: {
                inline: true,
              },
            },
          },
          function () {
            console.warn("Player is ready to use");
          }
) as videojs.Player & VideoJSIVSTech & VideoJSQualityPlugin;

livePlayer.enableIVSQualityPlugin();

const events: VideoJSEvents = livePlayer.getIVSEvents();
const ivsPlayer = livePlayer.getIVSPlayer();
ivsPlayer.addEventListener(events.PlayerState.PLAYING, () => {
     console.log("IVS Player is playing");
});

livePlayer.src([{
     src: "https://vn-platform-media-converter.s3.amazonaws.com/4723ca8f-306f-4515-b9a4-105e7192a92f-Production/CMAF/4723ca8f-306f-4515-b9a4-105e7192a92f-Production.m3u8",
     type: "application/x-mpegURL",
     },
]);
gefragt vor einem Jahr100 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen