Wowza Community

@setDataFrame onMetaData not working

Hello,

I’m running Wowza Media Server 2.1.1 build24490 and I have an application that captures video from the camera and streams it to other clients. I’m now building the option to change the capture size.

Now, when you change the capture size of a camera that is streaming, Flash Player will just continue streaming, but in the new size. The receiving end doesn’t receive any event. Now, to be able to update the receiving end, I send a metaData event, like this:

cam.setMode( w, h, 15 );
if (_isPublishing)
{
	trace( "Send metadata" );
	var metaData :Object = new Object();
	metaData.event="changeSize";
	ns.send("@setDataFrame", "onMetaData", metaData );
}

When I use FMS, I receive the metadata correctly each time. But on Wowza, I do not always receive it. It seems that if I stop and play around the time I should get the metadata, I DO receive it. Otherwise, I do not.

Does anyone observe this behaviour?

I think this will only be received when a new client subscribes. If you want to send data to clients that are currently streaming, you have to use netstream.send(“someOtherCallbackFunction”,newHeight,newWidth), and setup “someOtherCallbackFunction” on the Netstream in the client.

Richard

Dear Richard,

Thank you for your quick reply. I modified my code by removing the “@setDataFrame” argument:

cam.setMode( w, h, 15 );
if (_isPublishing)
{
	trace( "Send metadata" );
	var metaData :Object = new Object();
	metaData.event="changeSize";
	ns.send("onMetaData", metaData );
}

and then the code works as it should.

Regards,

Sander

Cool, right, that leverages the existing the onMetaData handler. Thanks for the update.

Richard