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ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ