How to set playback time from one time to another time such as from ‘2019-2-16 13:00:00’ to ‘2019-2-16 15:00:00’?

I am developing web code,I want to playback video from one time to another time such as from ‘2019-2-16 13:00:00’ to ‘2019-2-16 15:00:00’,

Could you please tell me how to set parameters? Could you please give me a detaild example about how to start play and stop play? I want to get a detailed document.

Hi Honghai,

The sample you are referring is no longer supported (ex DemoApp).

Nevertheless you can try with something like this:

var changeStreamXMLMessage = generateXMLMessage({
    sequenceId: 2,
    conncetionId: connect.conncetionId,
    command: 'ChangeStream',
    inputParams: {
        VideoId: videoId,
        SeekType: 'Time',
        Time: '1550366519927'
    }
})

In order to use DemoApp you should refer to the Mobile server protocol documentation.

Instead of that I will encourage you to migrate to the MIP SDK Mobile.

It was introduced in 2018 R1 and contains very nice samples.

In addition it wraps the mobile server protocol into nice and handy JS objects.

If you migrate to the MIP SDK Mobile you can use:

/**
	 * Sends a ChangeStream command to the server. 
     * Seeks to either of: 'DbStart', 'DbEnd', 'PrevSeq', 'NextSeq', 'PrevFrame' or 'NextFrame'.
	 * 
	 * @method playbackSeek
	 * @param {VideoConnection} videoConnection - existing VideoConnection object representing a camera stream
	 * @param {String} seekType - 'DbStart', 'DbEnd', 'PrevSeq', 'NextSeq', 'PrevFrame' or 'NextFrame'
	 * 
	 * @return {ConnectionRequest} - the ConnectionRequest object
	 */
	function playbackSeek(videoConnection, seekType) {
	    return XPMobileSDK.library.Connection.playbackSeek(videoConnection, seekType);
	}
 
    /**
	 * Sends a ChangeStream command to the server. Goes to the closest possible match of specific time.
	 * 
	 * @method playbackGoTo
	 * @param {VideoConnection} videoConnection - existing VideoConnection object representing a camera stream
	 * @param {Number} millisecondsSinceUnixEpoch - Time of playback speed (in milliseconds since Unix epoch). Valid if SeekType == Time
	 * @param {String} seekType - optional, 'Time' (default), 'TimeOrBefore', 'TimeOrAfter'
	 * @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 playbackGoTo(videoConnection, millisecondsSinceUnixEpoch, seekType, successCallback, errorCallback) {
	    return XPMobileSDK.library.Connection.playbackGoTo(videoConnection, millisecondsSinceUnixEpoch, seekType, successCallback, errorCallback);
	}

Probably you are interested in “playbackGoTo” command.

Latest MIP SDK Mobile could be downloaded from here:

https://www.milestonesys.com/my-milestone/msp/mip-sdk/