Wowza Community

Customize Error Message

Dear All,

I am new to Wowza Streaming Engine and I have just deployed one in our company’s server. Users can now use their computer/mobile devices to watch our video streams.

However, I found that the default error message shown at the player is not clear enough. When people types the wrong filename in the URL in the browser, the player just say “The requested URL was not found on this server”.

It seems that the error message is different for different browser/player/device. I think it is quite confusing for users. May I know if there is a way to customize the error message for it?

Thanks for much.

Gavin Tang

Hello there. Thank you for considering Wowza for your streaming needs and welcome to the support forum.

As you pointed out, every client (browser/player/device) has its own way of handling a 404. And there is nothing built into Wowza to modify the handling.

With some custom work however, you could override the play command to catch the StreamNotFound. This will allow you to display a custom message, or play a default file.

Something this might work, I didn’t test it though:

public void play(IClient client, RequestFunction function, AMFDataList params)
	{
		
		try
		{
		ModuleCore.play(client, function, params);
		}
		catch(Exception e)
		{
			params.set(PARAM1, new AMFDataItem("404"));
			params.set(PARAM2, new AMFDataItem(0));
			params.set(PARAM3, new AMFDataItem(-1));
			// params.set(PARAM4, new AMFDataItem(true));
			this.invokePrevious(client, function, params);
		}
}

If you need further assistance setting this up, I would advise to post a request to the find a consultant forum

Kind regards,

Salvadore