azure 媒体播放器错误地加载视频

时间:2021-01-11 15:11:53

标签: azure html5-video

我已经在我的 React 应用程序中实现了 azure 媒体播放器,它会正确加载第一个视频,但是当我导航到另一个包含另一个视频的页面时,它会播放视频但视频大小不正确,黑色没有控制只能听到声音

它也在尝试获取我的 url localhost:3000/page/null 并且我收到 404 错误,我不确定为什么会发生这种情况?

如何更改它才能正确播放视频?

 function AzureVideo() {
    const myOptions = {
      nativeControlsForTouch: false,
      controls: true,
      autoplay: true,
      width: '640',
      height: '400',
    }
    const myPlayer = amp('azuremediaplayer', myOptions)
    myPlayer.src([
      {
        src: `{topic.media}`,
        type: 'application/vnd.ms-sstr+xml',
      },
    ])
  }

 <video
          id="azuremediaplayer"
          className="azuremediaplayer amp-default-skin amp-big-play-centered"
        />

0 个答案:

没有答案