I want to use the method Seek of the class AVPlayer. But this method take a parameter CMTime. Could anyone knows about this object.
In order to move the playback cursor to a given time.
I want to use the method Seek of the class AVPlayer. But this method take a parameter CMTime. Could anyone knows about this object.
In order to move the playback cursor to a given time.
The Apple documentation contains information on the CMTime struct.
As I understand it, you set the "TimeScale" to a timescale suitable for the media (e.g. 44100 = 1/44100 sec - which might be suitable for a CD). Then the "Value" represents units of that timescale. So, a value of 88200 would be 2 secs.
CMTime cmTime = new CMTime();
cmTime.TimeScale = 44100;
cmTime.Value = 88200;
Isn't too clear though, I'll grant you.