MediaPlayer.time() method improvement
Created by: matt-hammond-001
This is a follow up to https://github.com/Dash-Industry-Forum/dash.js/pull/1292
That previous PR didn't sensibly handle the situation when a presentation is live (dynamic MPD) when a call to MediaPlayer.time()
includes an argument specifying a streamId
(Period ID) in order to request time relative to the start of that stream. The current behaviour is to ignore the argument and instead return the time index within the DVR buffer window.
When the stream ID argument is specified, I believe it makes more sense to instead always return time relative to the start of a period, irrespective of whether the stream is live or not. This PR implements that. This behaviour is also what is required for my original use case (see https://groups.google.com/forum/#!topic/dashjs/Zk0nzEfYNi0 )
The docstrings also did not describe behaviour when the stream is live. This PR fixes that too.