FMS, Remote SharedObject and Arrays

I have bad experience with above 3 at the same time. When ever you use an array in FMS side coding and pass along that in Remote SharedObject you would be in trouble in in terms of bandwidth and memory usage of application. When I change anything an array i.e. add an item, update an item or delete an item, you would need to pass the whole array to shared object and that will send the full array to all connected clients to that shared object. So even if you have change single item in the full array it eats the bandwidth for full array.

So, what I learnt for it? NEVER use an array in FMS side coding when you have to pass it to Shared Object. Always use property names of shared object to identify the objects inside the shared object.

Thanks,
Naresh

Live Streaming, FMS and Absolute Stream Time

Think of a live stream is being published to FMS and all subscribers are watching that live stream. Now one of the subscriber is late in joining this live stream but still he does that successfully and watches the live stream from the point when he joined it. Everything looks perfect!

But wait, one thing is not perfect definitely – the time of the stream been published. Yes, the subscribers does not see the absolute stream time from start of its publish. So what does that mean? They are not in sync of each other. Let’s say I want to notify all subscribers at certain point of time in video. Now I would be watching something at time t and I will send message to all subscribers. What I want is : all subscribers should see this message at exact point of time when they see what I am watching in video. But as there is no time sync, subscribers won’t know that at what point of time the message should be displayed.

As work around, what I did is I passed timecode from FMLE. That means that at each frame of video, FMLE would encode system time in the frame. All subscribers would get onFI() event with that time code at each second (given that the timecode rate and frame rate of video is same at FMLE). A subscriber would have to save the first timecode as the start point of time. On next onFI() event they can just subtract the start timecode from the current timecode and that would give it a absolute time of stream!!

Once absolute time of stream is found, you can synchronize the message around 🙂 I did not written down any code here but if any one wants the code, let me know – I can provide it.

Thanks,
Naresh