Open s2t2 opened 8 years ago
EXPECTED BEHAVIOR
https://developers.google.com/youtube/iframe_api_reference
Retrieving video information
player.getDuration():Number
Returns the duration in seconds of the currently playing video. Note that getDuration() will return 0 until the video's metadata is loaded, which normally happens just after the video starts playing.
If the currently playing video is a live event, the getDuration() function will return the elapsed time since the live video stream began. Specifically, this is the amount of time that the video has streamed without being reset or interrupted. In addition, this duration is commonly longer than the actual event time since streaming may begin before the event's start time.
Observed behavior differs from the behavior described in the youtube documentation.
OBSERVED BEHAVIOR
For live-stream events, while live-streaming, player.getDuration()
returns 0
.
EDIT: I think player.getDuration()
was 0
only because it was set before player started playing. it seems to be fine after setting it during the getRating()
function
results chart does not work during livestream events.