Load video (playback) from some time (2018.7.1. 10:00:00 to 10:00:30) and take only 30 secoonds

Is it possible to load some playback for only 30 secconds, not all from that camera, I need to load only from datetime1 to datetime2?

If you got some example it will be nice.

The Milestone way is to goto the first time, play forward until you reach the second time then stop. This is what the playback samples shows. Try to look at VideoViewer sample as a starter.

http://doc.developer.milestonesys.com/html/index.html?base=samples/videoviewer_sample.html&tree=tree_2.html

I dont wanna load more than 30 seconds, on that example what you give to me it load till present if I move tracking line and I dont wanna give that possibility to end user, I just need to give him video from 30 seconds

I suggest that you do not load anything, but limit the “time” the user can see.

The concept of loading anything does not fit how Milestone is designed to work.

Anny suggestion or example how to limit time for end user, I’m new to milestone SDK.

In the VideoViewer sample I modified the RecordedImageReceived -

void _imageViewerControl1_RecordedImageReceivedEvent(object sender, RecordedImageReceivedEventArgs e)
{
    if (e.DateTime > periodStop)
    {
        EnvironmentManager.Instance.SendMessage(
            new VideoOS.Platform.Messaging.Message(
                MessageId.SmartClient.PlaybackCommand,
                new PlaybackCommandData() { Command = PlaybackData.PlayStop }
                ));
        EnvironmentManager.Instance.SendMessage(
            new VideoOS.Platform.Messaging.Message(
                MessageId.SmartClient.PlaybackCommand,
                new PlaybackCommandData() { Command = PlaybackData.Goto, DateTime=periodStart }
                ));
        EnvironmentManager.Instance.SendMessage(
            new VideoOS.Platform.Messaging.Message(
                MessageId.SmartClient.PlaybackCommand,
                new PlaybackCommandData() { Command = PlaybackData.PlayForward, Speed = _speed }
                ));
    }
}

This is not half the story, you will need to make sure you cannot go in live mode, cannot use the buttons that might send you out of the period, cannot play backward out of the period. But you will of course not need the buttons that could do that (I imagine), so all in all I think this will not be a huge task.

The starting point is the VideoViewer sample.

Thinking about what you ask. A totally different approach might be to export 30 seconds of fooage as AVI and give this to the user. This is not very fancy but perhaps it is fully in line with your requirements. If you find this appealing I recommend you to explore the ExportSample.