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",
     },
]);
已提问 1 年前100 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则