The Wowza official Player sometimes cannot render a live stream and just shows a black screen with video controls. When the code was copied to a custom payer, same problem, but I have detailed logs of that one. The console logs show successful responses from the Wowza Server, so this is confusing the stream does not render.
Using the Wowza Player, this stream usually renders on first pass, but upon refresh just shows the bank black screen despite entering the same streamName and WowzaServer and other paraemters.
var peerConnection = null;
var peerConnectionConfig = { iceServers: [] };wsConnection = new WebSocket(url);
wsConnection.binaryType = 'arraybuffer'; peerConnection = new RTCPeerConnection(peerConnectionConfig);
peerConnection.onicecandidate = fetchIceCandidate;
peerConnection.onaddstream = fetchRemoteStream;...
wsConnection.send('{"direction":"play", "command":"getOffer", "streamInfo":' + JSON.stringify(mystreamInfo) + ', "userData":' + JSON.stringify(userData) + '}');
peerConnection.onaddstream = getRemoteStream;
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
RENDERING DONE BELOW
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
getRemoteStream(event)
remoteVideo = document.getElementById("playVideo");
function getRemoteStream(event) {
remoteVideo.srcObject = event.stream;
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
HTML% VIDEO TAG
¬¬¬¬¬¬¬¬¬¬¬¬¬¬¬
<video id="playVideo" autoplay="" controls="" muted="" style="height:320px; height:240px;">
<source src="">
</video>