Javascript 在Amazon IVS player中使用Plyr.io?

Javascript 在Amazon IVS player中使用Plyr.io?,javascript,html,video-player,plyr.js,Javascript,Html,Video Player,Plyr.js,我正在尝试将Amazon IVS web播放器集成到plyr.io中 但根据IVS文件,它表示可以使用 但我无法启用wasm支持 /** * Web Workers and WASM Workers need to be created via URL. Webpack has created the relative URL for us via file-loader, * now we just have to create the absolute (fully qualified)

我正在尝试将Amazon IVS web播放器集成到plyr.io中 但根据IVS文件,它表示可以使用

但我无法启用wasm支持

/**
 * Web Workers and WASM Workers need to be created via URL. Webpack has created the relative URL for us via file-loader,
 * now we just have to create the absolute (fully qualified) URL.
 */
const createAbsolutePath = (assetPath: string) => new URL(assetPath, document.URL).toString();
const player = this.player = create({
    wasmWorker: createAbsolutePath(wasmWorkerPath),
    wasmBinary: createAbsolutePath(wasmBinaryPath),
});
我已经能够添加基本的PLyr机制,与我们集成HLS播放器的方式相同,但它似乎不适用于IVS,因为我无法附加wasm

initPlayer = reference => {
    const IVS = require("amazon-ivs-player"); // cdn ?
    console.log(reference);
    if (IVS.isPlayerSupported) {
      const plyr = require("plyr");
      const player = IVS.create(reference);
      player.load(this.props.sourceUrl);

      require("plyr/dist/plyr.css");
      new plyr(reference, {});
      player.play();
    } else {
      const plyr = require("plyr");
      // default options with no quality update in case Hls is not supported
      new plyr(reference, this.props.options);
    }
  };

在html中独立运行IVS按照我在下面尝试的文档工作,如何让它在React+plyr中作为包装器工作


if(支持IVSPlayer.isplayers){
constplayer=IVSPlayer.create(document.getElementById('video-player');
attachHTMLVideoElement(document.getElementById('video-player');
player.load(“https://fcc3ddae59ed.us-west-2.playback.live-video.net/api/video/v1/us-west-2.893648527354.channel.DmumNckWFTqz.m3u8");
player.play();
}