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",
     },
]);
asked a year ago99 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions