It turns out to be that we shouldn't include "mp4:" in vodstreamName. Now client.getAppInstance().getPlayStreamsByName(_vodStreamName.substring(4)) returns me correct instance of vod stream.
I wanted IMediaStream Instance to send metadata to vod stream in middle of stream. Now the problem is that even though i have IMediaStream Instance of vod stream, i could not able to send metadata to the stream. Below is my code inside cue-point method on server-side to send metadata to vod :
List<IMediaStream> playStreams = client.getAppInstance().getPlayStreamsByName(_vodStreamName.substring(4));
AMFDataObj data = new AMFDataObj();
AMFDataArray parameters = new AMFDataArray();
if(streamInstance != null)
I uses the same code to send metadata to live(non-vod) streams, it works just fine. It doesn't work in case of vod stream. Can anyone tell what's wrong with my code? Any help is appreciated.
send and sendDirect are used for live streams only. Send broadcasts the message directly to the clients that are playing the stream. SendDirect inserts the data into the incoming stream so that it is then used by any processes that work with the live stream before it goes out to the client. This includes recording, transcoder and the internal publishing api.
Because the vod stream doesn't have a live stream source, send & sendDirect will be ignored.
You need to do something like the following to send a response directly to the player stream object. The first part is the recommended way to handle the stream name. It will automatically strip out the any prefix or query string so just the stream name is returned.
If the stream is not live or you want to send a message back to the publisher of the stream then you need to use a ResponseFunction. This will send the message directly to the stream client. By calling (stream.getSrc());, this indicates to the api that you want to send the message to the NetStream object on the client and not the NetConnection object.
See IClient.getRespFunctions() in the server api documentation for a complete example implementation.