I am trying to ensure I am not missing something with regard to the implementation of the seek trait, and to see if there is a method by which i can begin a stream from a specified position.
As I understand, the SeekTrait of a Media Element only becomes available when its 'canSeek' property returns true, which only seems to occur once playback begins.
This is causing me a bit of a headache with reporting metrics. For example if i want to begin a stream from a certain position, lets say 60 secs in, then in order to do this ( as far as i understand ) :
1 ) I must play the stream from beginning, listen for the 'canSeekChange' property to return true, making the Seek Trait available,
2 ) then perform a seek(60) method call and await the Seek request to complete before playback
Problem is that this will by default record an initial 'play' metric from where it begins at 0, then a second play after is it completes the seek to 60secs. This feature is becoming commonplace in video services, where a user can 'resume' watching some ( longform ) content when returning to view it in a separate session i.e. the next day.
Is this the only way to play a stream from a specified position???
Yeah, it is a bit confusing.
What you can try doing is creating dynamicStreamingResource and specify start time and end time.
var resource:DynamicStreamingResource = new DynamicStreamingResource(VideoItem.base);
resource.clipStartTime = startTime;
resource.clipEndTime = endTime;
The only problem is you will not be able to seek before the start time...
If you find anything else let me know