{"action":"created","issue":{"url":"https://api.github.com/repos/videojs/video.js/issues/3653","repository_url":"https://api.github.com/repos/videojs/video.js","labels_url":"https://api.github.com/repos/videojs/video.js/issues/3653/labels{/name}","comments_url":"https://api.github.com/repos/videojs/video.js/issues/3653/comments","events_url":"https://api.github.com/repos/videojs/video.js/issues/3653/events","html_url":"https://github.com/videojs/video.js/issues/3653","id":180037376,"number":3653,"title":"Spinner hides before video has loaded and can play.","user":{"login":"floorish","id":623528,"avatar_url":"https://avatars.githubusercontent.com/u/623528?v=3","gravatar_id":"","url":"https://api.github.com/users/floorish","html_url":"https://github.com/floorish","followers_url":"https://api.github.com/users/floorish/followers","following_url":"https://api.github.com/users/floorish/following{/other_user}","gists_url":"https://api.github.com/users/floorish/gists{/gist_id}","starred_url":"https://api.github.com/users/floorish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floorish/subscriptions","organizations_url":"https://api.github.com/users/floorish/orgs","repos_url":"https://api.github.com/users/floorish/repos","events_url":"https://api.github.com/users/floorish/events{/privacy}","received_events_url":"https://api.github.com/users/floorish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-29T12:37:19Z","updated_at":"2016-09-29T16:32:31Z","closed_at":null,"body":"## Description\r\nOn a slow connection it can take a while to load the video, but the spinner is hidden before the video is loaded and the `canplay` event is fired. This means the spinner is hidden too soon and the user gets no feedback about what's going on. Only a black screen is visible while loading.\r\n\r\n## Steps to reproduce\r\n1. Open http://jsfiddle.net/floorish/gvu1rwdr/ in Chrome\r\n2. Set Network throttling to something low (GPRS)\r\n3. (make sure the video is not cached)\r\n4. Click play on the video\r\n\r\n## Results\r\n### Expected\r\nSpinner shows until video is ready to play (after `canplay` event fired)\r\n\r\n### Actual\r\nSpinner hides after first `timeupdate` event, but video is still buffering so a black screen is visible.\r\n\r\n## Additional Information\r\nWhat happens is when the video enters `waiting`, the spinner is hidden after the first `timeupdate` event. See  https://github.com/videojs/video.js/pull/3138  ,  https://github.com/videojs/video.js/blob/master/src/js/player.js#L908.\r\nThe `timeupdate` event is fired even though the video is buffering/loading (Might be connected to this issue: https://github.com/videojs/video.js/issues/1641), which shouldn't happen. \r\n\r\n### versions\r\n#### videojs\r\n5.11.6\r\n#### browsers\r\nTested on Chrome 53 with network throttling enabled. Also reproducible on iPad with slow connection.\r\n#### OSes\r\nmacOS\r\n### plugins\r\nnone\r\n"},"comment":{"url":"https://api.github.com/repos/videojs/video.js/issues/comments/250520298","html_url":"https://github.com/videojs/video.js/issues/3653#issuecomment-250520298","issue_url":"https://api.github.com/repos/videojs/video.js/issues/3653","id":250520298,"user":{"login":"misteroneill","id":214723,"avatar_url":"https://avatars.githubusercontent.com/u/214723?v=3","gravatar_id":"","url":"https://api.github.com/users/misteroneill","html_url":"https://github.com/misteroneill","followers_url":"https://api.github.com/users/misteroneill/followers","following_url":"https://api.github.com/users/misteroneill/following{/other_user}","gists_url":"https://api.github.com/users/misteroneill/gists{/gist_id}","starred_url":"https://api.github.com/users/misteroneill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/misteroneill/subscriptions","organizations_url":"https://api.github.com/users/misteroneill/orgs","repos_url":"https://api.github.com/users/misteroneill/repos","events_url":"https://api.github.com/users/misteroneill/events{/privacy}","received_events_url":"https://api.github.com/users/misteroneill/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T16:32:31Z","updated_at":"2016-09-29T16:32:31Z","body":"I can verify this behavior per your instructions - thanks for the detailed test case!\r\n\r\nI'm not sure what the best path forward here would be. Perhaps we could track whether we've seen `canplay` for the current source and only add the one-off `timeupdate` listener if we have seen `canplay`?"}}
{"actor":{"display_login":"misteroneill"}}