_playbackUserControl.ShowTallUserControl = true;
_playbackUserControl.ShowSpeedControl = true;
_playbackUserControl.ShowTimeSpanControl = true;
_playbackUserControl.TimeSpan = new TimeSpan(60000);
In code abower I got error:
at System.DateTime.op_Subtraction(DateTime d, TimeSpan t)
at VideoOS.Platform.Client.TimeLineUserControl.SetShowTimePrivate(DateTime newCenter)
at VideoOS.Platform.Client.TimeLineUserControl.set_TimeSpan(TimeSpan value)
at VideoOS.Platform.Client.PlaybackUserControlMini.set_TimeSpan(TimeSpan value)
The added or subtracted value results in an un-representable DateTime.
Parameter name: t
when I add new TimeSpan(60000)
How can I set to 1 minute instead of 1 hour default
If you want to create a TimeSpan representing one minute, you can use
_playbackUserControl.TimeSpan = TimeSpan.FromMinutes(1);
Initializing a TimeSpan the way it is done in your example is actually using “ticks” and represents only 6 milliseconds.
I got same error what matter I using TimeSpan.FromMinutes() or TimeSpan()
I using code from milestone examle PlaybackUser.crspoj from MIPSDK example and you can try it to (http://doc.developer.milestonesys.com/html/samples/PlaybackUser.html), only what am I do is to set x86 instead of x64 but example works, when I add this
_playbackUserControl.TimeSpan = TimeSpan.FromMinutes(1);
I got error, without this line of code all works fine.
Need another explanation.
I found that it cannot be set before init, you will have to set it after.
This works:
_playbackUserControl.Init(_playbackFQID);
_playbackUserControl.TimeSpan = TimeSpan.FromMinutes(30);
A fix will be made so that in MIP SDK 2018R3 you can do it both before and after Init()