I am struggling to find any information on the FCSubscribe
methods used by various CDNs. I need to implement the methods in a custom video player.
I would like an official specification for these methods, but even a SO search for "FCSubscribe" produces only 2 results. I've managed to find scraps of code around the web, but nothing concrete.
I have managed to build a working player after reading all these code scraps, but am not sure of it's robustness because of lack of any documentation.
The following is a basic outline of my code so far:
public function connectCDN() :void
{
netConnection.client = {
onFCSubscribe : onFCSubscribe
};
netConnection.call('FCSubscribe', null, streamName);
netStream.play(streamName);
}
public function onFCSubscribe(...args) :void
{
//Don't know what to do here???
}
There's not really much to it.
My specific concerns are:
Should I start playing the
NetStream
directly after callingFCSubscribe
, or should I wait for a callback?I've implemented the
onFCSubscribe
callback, but I don't know what I'm supposed to do here. Args contains a structure likeinfo.code
(similar to aNetStatusEvent
).In other implementations I've seen
onFCUnsubscribe
callbacks, should I also implement this? What for?