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",
     },
]);
feita há um ano100 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas