Wowza Stream not rendering in Video HTML Tag neither Wowza Player nor Custom App

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>

Can you describe your workflow in a little more depth? Are you using Wowza Streaming Cloud or Wowza Streaming Engine? Are you trying to do WebRTC Publish > Wowza > WebRTC Playback? When you say “Wowza official Player” do you mean https://github.com/WowzaMediaSystems/webrtc-examples?

Thanks for the response.
Yes, the workflow is “WebRTC Publish” to “Wowza” then “WebRTC Playback” from “Wowza”.

I am using the “Wowaza Streaming Engine” and testing it using two online apps.

(a) Wowza Sample Publisher
wowza-html.pcgc.co.uk/html/publish

(b) Wowza Sample Player

wowza-html.pcgc.co.uk/html/play

Publishing is working, and when I put a streamName, and add my StreamingEngine Server Address and Application Name, the camera streams are captured from the browser and transered to my Wowza Streaming Engine.

However, when I try to playback those streams, the first time the playback works okay, it shows the stream successfully, but once you refresh that page of “Wowza Sample Player”, the stream vanishes. Flushing browser cache does not help bring back the stream. However, when you check the console, as seen in screenshots, the responses seem correct. The only message that sometimes gets throw in console is below:

I notice many complaints years ago about this, but that was before HTML5 played video in most browsers.

Thanks for the response. See details in further Answers below: