mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-14 15:56:38 +03:00
47ea45d360
If the manifest has no PDT or PST it will currently result in calling `new Date(null * 1000)`, equivalent to `new Date(0)`, which results in an unexpected start time date. I believe a better behaviour in this scenario is to simply return null, since I believe startTime resolving to null here should be considered a valid case that shouldn't need to be asserted against. A manifest does not necessarily have a PDT or PST if it is a basic live or VOD manifest. The caller of the function may not know this before calling `getPresentationStartTimeAsDate`. There is no good way of checking ahead of calling `player.getPresentationStartTimeAsDate` if calling the method is valid or not. `startTime` being `null` here seems like a valid scenario to me. It should not result in a erroneous call to `new Date` with `null` and instead just return `null` and log a warning.