Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
539 views
in Technique[技术] by (71.8m points)

azure media player loading videos incorrectly

I have implemented the azure media player into my react app and it will load the first video correctly, however when I then navigate to another page with another video it will then play the video but the video is incorrectly sized and black with no controls only the sound can be heard

and It is also trying to get my url localhost:3000/page/null and I get a 404 error, I'm not sure why this is happening?

How can I change it so my video plays correctly?

 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"
        />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...