I have a healthy streaming sent to AWS IVS.
When using the very same JavaScript code given by AWS to play the streaming, it's not working:
I got the code from here
<script src="https://player.live-video.net/1.7.0/amazon-ivs-player.min.js"></script>
<video id="video-player" playsinline></video>
<script>
if (IVSPlayer.isPlayerSupported) {
const player = IVSPlayer.create();
player.attachHTMLVideoElement(document.getElementById('video-player'));
player.load("https://b9ce18423ed5.someregion.playback.live-video.net/api/video/v1/someregion.242198732211.channel.geCBmnQ6exSM.m3u8");
player.play();
}
</script>
The playback URL is coming from the IVS channel.
When running this code, nothing happens and the video tag source is set to :
<video id="video-player" playsinline="" src="blob:null/b678db19-6b9a-42fc-979e-1e0eda4a3b46"></video>
There is no code from my side. It's only AWS code. Is that a bug or am I doing something wrong?
Here is the reason why in my case the IVS stream didn't play. Maybe it may help someone else.
In my case, it was not playing because the video streamed was completely black. So it thinks the video stream is "empty". Once I got something in the video, it was playing properly.