Wowza Community

How to receive injected metadata in iOS?

I’ve built a Streaming Engine HTTP provider, quite similar to this example: https://www.wowza.com/docs/how-to-inject-cue-points-or-metadata

It seems to work just fine and my iOS app write trace information about information being received:

TWPlayer onData

WOWZDataEvent: name = aaa:

payload = WOWZDataMap:

Item:

wowzaConverter = WOWZDataTypeString: basic_string

Item:

payload = WOWZDataTypeString: {“message”: “bbb”}

However I can’t understand how to intercept the information in the app. No callbacks are called.

I’ve registered a data sink for “aaa”, but onData is not invoked.

Is this what you’re looking for?

https://www.wowza.com/docs/how-to-convert-ontextdata-events-in-a-live-or-vod-stream-to-timed-events-id3-tags-in-an-apple-hls-stream

You’ll need to convert the data to a format that is readable by apple devices.

Thanks for answering!

I’ve just started using your products, however I doubt this is the problem.

I inject data into the stream as your HTTP provider example. That stream is connected to an ultra low latency target in your streaming cloud, which does not have any HLS fallback.

My injected data reach your native iOS WOWZPlayer, according to the trace information in my first post. However the registerred data sink is never called, as I expected. So I don’t understand how to programatically access the information (which obviously is) within the iOS app.

Thank you for letting me know it is an ultra low latency stream (ULL) as that requires a different answer @Roger Jönsson. That requires the WOWZ protocol and is only available using the Wowza Player.

With ULL streams the AMF data passes right through and will not need to be converted.

On the playback side, GoCoder SDK is designed to work with ultra low latency streams from Wowza Streaming Cloud. As a result, GoCoder SDK player apps can receive single bitrate streams over WOWZ, including any AMF metadata attached to the stream.

To ingest the metadata, use the WOWZPlayer class to register a data sink, and then use a WOWZDataEvent to listen for and receive the event, which synchronizes with the frame in the event’s timestamp. The SDK then passes the AMF metadata to an RTMP or WOWZ player, including Wowza Player.

At this time, the GoCoder SDK doesn’t pass ID3 tags to native Apple and Android player frameworks, but you can build an HLS player independently that will leverage the timed metadata to invoke an action during playback

So, as far as accessing that info, you would create a listener in the Wowza Player:

https://www.wowza.com/docs/how-to-listen-for-metadata-and-trigger-an-action-with-the-wowza-player-javascript-api

We are quite fine with “only” using AMF and the WOWZ protocol, HLS have too long latency.

I’m using WOWZPlayer included in GoCoder SDK and register a data sink. However the sink’s callback is never invoked.

Some Objective C code from the app:

[_playerregisterDataSink:selfeventName:@"broadcast"];

- (void)onData:(WOWZDataEvent *)dataEvent {

	NSLog(@"onData: %@", dataEvent.description); // *** Never called! ***}

The AMF data is injected using a HTTP provider in Streaming Engine.

final AMFDataObj amfData = new AMFDataObj();

amfData.put("wowzaConverter", "basic_string");

amfData.put("payload", "{\"message\": " + message + ", \"payload\": \"" + payload + "\"}");

stream.sendDirect("broadcast", amfData);

From log statements generated by WOWZPlayer I can see that the data I’ve injected has been received by the player, but how can I access them, since onData is not called?

How do I “then use a WOWZDataEvent to listen for and receive the event”?

You are more than welcome to give me a call.

Let me check with engineering to see how we may further assist you with this. Thanks for your patience.

We may need to do a support ticket for this to see if this is an issue on our end. Can you please submit one here @Roger Jönsson so we may run some tests?