Mobile JS SDK: Is there an example available of synchronized playback using XPMobileSDK.createPlaybackController ?

I am trying to synchronize video playback on the server.

I have taken a look at source code in connection.js to try to figure out the steps.

What I have have done so far, is to call XPMobileSDK.createPlaybackController, and use it to set the PlaybackControllerId property in the params of XPMobileSDK.RequestStream.

Hi Roy,

Unfortunately there is no sample available for multi-camera playback so far.

We plan to include in the future releases due to the increasing interest.

What you’ve done so far is in the right direction.

Next step is to control the payback trough the Playback controller, but not via individual video steams.

For this to happen you have to use “XPMobileSDK.changeMultipleStreams” method.

Here is the help you can find in the XPMobileSDK.js file:

/**

 \* Change several streams at a time

 \*

* @method changeMultipleStreams

 \* @param {Object} parameters - Object containing the following properties:

*

 \* - {String} PlaybackControllerId - Id of the video connection

* - {Number} Speed - (optional) Speed of the playback (floating point). Sign determines the direction.

* - {String} SeekType - (optional) Makes seek of specific type: Time.

* - {Number} Time - (optional) Time of playback speed (in milliseconds since Unix epoch). Valid if “SeekType == Time”

*

 \* @param {Function} successCallback - function that is called when the command execution was successful and the result is passed as a parameter.

 \* @param {Function} errorCallback - function that is called when the command execution has failed and the error is passed as a parameter.

 \*

 \* @return {ConnectionRequest} - the ConnectionRequest object

 \*/

function changeMultipleStreams(parameters, successCallback, errorCallback) {

 return XPMobileSDK.library.Connection.changeMultipleStreams(parameters, successCallback, errorCallback);

}

Depending on the action you want to perform, you have to set “Speed” parameter (in case of controlling start/stop and direction) or “SeekType” and “Time” if you wand to make “GoToTime” like functionality for all the streams.