{"action":"created","issue":{"url":"https://api.github.com/repos/mitodl/odl-video-service/issues/471","repository_url":"https://api.github.com/repos/mitodl/odl-video-service","labels_url":"https://api.github.com/repos/mitodl/odl-video-service/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/odl-video-service/issues/471/comments","events_url":"https://api.github.com/repos/mitodl/odl-video-service/issues/471/events","html_url":"https://github.com/mitodl/odl-video-service/pull/471","id":306821932,"number":471,"title":"Custom quality selector function for videojs","user":{"login":"mbertrand","id":187676,"avatar_url":"https://avatars2.githubusercontent.com/u/187676?v=4","gravatar_id":"","url":"https://api.github.com/users/mbertrand","html_url":"https://github.com/mbertrand","followers_url":"https://api.github.com/users/mbertrand/followers","following_url":"https://api.github.com/users/mbertrand/following{/other_user}","gists_url":"https://api.github.com/users/mbertrand/gists{/gist_id}","starred_url":"https://api.github.com/users/mbertrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbertrand/subscriptions","organizations_url":"https://api.github.com/users/mbertrand/orgs","repos_url":"https://api.github.com/users/mbertrand/repos","events_url":"https://api.github.com/users/mbertrand/events{/privacy}","received_events_url":"https://api.github.com/users/mbertrand/received_events","type":"User","site_admin":false},"labels":[{"id":634548170,"url":"https://api.github.com/repos/mitodl/odl-video-service/labels/Waiting%20on%20Author","name":"Waiting on Author","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"noisecapella","id":863262,"avatar_url":"https://avatars2.githubusercontent.com/u/863262?v=4","gravatar_id":"","url":"https://api.github.com/users/noisecapella","html_url":"https://github.com/noisecapella","followers_url":"https://api.github.com/users/noisecapella/followers","following_url":"https://api.github.com/users/noisecapella/following{/other_user}","gists_url":"https://api.github.com/users/noisecapella/gists{/gist_id}","starred_url":"https://api.github.com/users/noisecapella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisecapella/subscriptions","organizations_url":"https://api.github.com/users/noisecapella/orgs","repos_url":"https://api.github.com/users/noisecapella/repos","events_url":"https://api.github.com/users/noisecapella/events{/privacy}","received_events_url":"https://api.github.com/users/noisecapella/received_events","type":"User","site_admin":false},"assignees":[{"login":"noisecapella","id":863262,"avatar_url":"https://avatars2.githubusercontent.com/u/863262?v=4","gravatar_id":"","url":"https://api.github.com/users/noisecapella","html_url":"https://github.com/noisecapella","followers_url":"https://api.github.com/users/noisecapella/followers","following_url":"https://api.github.com/users/noisecapella/following{/other_user}","gists_url":"https://api.github.com/users/noisecapella/gists{/gist_id}","starred_url":"https://api.github.com/users/noisecapella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisecapella/subscriptions","organizations_url":"https://api.github.com/users/noisecapella/orgs","repos_url":"https://api.github.com/users/noisecapella/repos","events_url":"https://api.github.com/users/noisecapella/events{/privacy}","received_events_url":"https://api.github.com/users/noisecapella/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-03-20T11:14:11Z","updated_at":"2018-03-22T17:08:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mitodl/odl-video-service/pulls/471","html_url":"https://github.com/mitodl/odl-video-service/pull/471","diff_url":"https://github.com/mitodl/odl-video-service/pull/471.diff","patch_url":"https://github.com/mitodl/odl-video-service/pull/471.patch"},"body":"#### What are the relevant tickets?\r\nCloses #458\r\n\r\n#### What's this PR do?\r\nReplaces the default VideoJS player `selectQuality` function with a simplified function that only takes available bandwidth into account, not player dimensions, and forces the first 10 seconds of the video to play at the highest available resolution.\r\n\r\n#### How should this be manually tested?\r\n- Your `.env` file should have `ET_PRESET_IDS=1504127981769-6cnqhq,1504127981819-v44xlx,1504127981867-06dkm6,1506369700634-2gfhf9`\r\n- Upload a video of moderate length (~10 minutes or more)\r\n- Open the network tab and start playing the video.  You should see `*.ts` video files being downloaded, and `2gfhf9` should be in the filename (the highest bandwidth).\r\n- Try to simulate a lower connection speed\r\n    - in Chrome, use the 'toggle device toolbar' and choose iphone 6/7/8 with mid-tier mobile; or on OSX, you can also use the 'Network Link Conditioner' under 'System Preferences'.  \r\n    - The highest bandwidth should still play (or attempt to) initially, then lower bandwidth video files (`6cnqhq`, `v44xlx`, or `06dkm6`) should start to load for slower speeds. \r\n    - There will be a delay before switching video quality because VideoJS will continue playing whatever segment its already downloaded, you can FF the video to avoid this.\r\n\r\n#### Any background context you want to provide?\r\nhttps://github.com/videojs/videojs-contrib-hls/blob/master/docs/bitrate-switching.md\r\n"},"comment":{"url":"https://api.github.com/repos/mitodl/odl-video-service/issues/comments/375383800","html_url":"https://github.com/mitodl/odl-video-service/pull/471#issuecomment-375383800","issue_url":"https://api.github.com/repos/mitodl/odl-video-service/issues/471","id":375383800,"user":{"login":"mbertrand","id":187676,"avatar_url":"https://avatars2.githubusercontent.com/u/187676?v=4","gravatar_id":"","url":"https://api.github.com/users/mbertrand","html_url":"https://github.com/mbertrand","followers_url":"https://api.github.com/users/mbertrand/followers","following_url":"https://api.github.com/users/mbertrand/following{/other_user}","gists_url":"https://api.github.com/users/mbertrand/gists{/gist_id}","starred_url":"https://api.github.com/users/mbertrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbertrand/subscriptions","organizations_url":"https://api.github.com/users/mbertrand/orgs","repos_url":"https://api.github.com/users/mbertrand/repos","events_url":"https://api.github.com/users/mbertrand/events{/privacy}","received_events_url":"https://api.github.com/users/mbertrand/received_events","type":"User","site_admin":false},"created_at":"2018-03-22T17:08:05Z","updated_at":"2018-03-22T17:08:05Z","author_association":"CONTRIBUTOR","body":"@noisecapella to check on the first 10 seconds, could try this:\r\n- artificially lower bandwidth before playback\r\n- open up network tab\r\n- Start playing the video\r\n- In the network tab, you should see `*-2gfhf9.ts` files being downloaded.  \r\n- Sometime after the video's first 10 seconds (depends on when the initial video segment finishes), it should switch to a different resolution: at that point the `*.ts` files in the network tab will not have `2gfhf9` in their names."}}
{"actor":{"display_login":"mbertrand"}}