{"action":"created","comment":{"url":"https://api.github.com/repos/mangui/flashls/pulls/comments/32704197","id":32704197,"diff_hunk":"@@ -188,13 +188,13 @@ package org.mangui.hls.loader {\n                          */\n                     } else if (HLSSettings.maxBufferLength == 0 || _hls.stream.bufferLength < HLSSettings.maxBufferLength) {\n                         // select level for next fragment load\n-                        if(_levelNext != -1) {\n-                            level = _levelNext;","path":"src/org/mangui/hls/loader/FragmentLoader.as","position":5,"original_position":5,"commit_id":"e900df4f0571d7b479a3579ba27a3b865988036e","original_commit_id":"e900df4f0571d7b479a3579ba27a3b865988036e","user":{"login":"mangui","id":1798553,"avatar_url":"https://avatars.githubusercontent.com/u/1798553?v=3","gravatar_id":"","url":"https://api.github.com/users/mangui","html_url":"https://github.com/mangui","followers_url":"https://api.github.com/users/mangui/followers","following_url":"https://api.github.com/users/mangui/following{/other_user}","gists_url":"https://api.github.com/users/mangui/gists{/gist_id}","starred_url":"https://api.github.com/users/mangui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangui/subscriptions","organizations_url":"https://api.github.com/users/mangui/orgs","repos_url":"https://api.github.com/users/mangui/repos","events_url":"https://api.github.com/users/mangui/events{/privacy}","received_events_url":"https://api.github.com/users/mangui/received_events","type":"User","site_admin":false},"body":"yes, but changing the priority is like removing it... there are several cases in auto Level mode during which _levelNext should take precedence over re-asking for a new autolevel :\r\nwhen switching level and when next level playlist is not available yet : when playlist finally become available we stick to that same next level.\r\nwhen switching level, and when PTS analysis is in progress, we might need to load 2 fragments before reaching the one with the right timestamps (on live playlists).\r\n_levelNext ensure that we will stick to that level until we load the right fragment.\r\n\r\nmy point is that you should not change the priority order here, or you might introduce more frequent buffer stalling when switching down, especially on sliding live playlists.\r\n\r\nhowever you can change the check condition as follow :\r\nthis will ensure that, you won't stick to _nextLevel if it is greater than max authorized level.\r\n\r\n`if(_levelNext != -1 && (_levelNext <  maxCappedLevel || !HLSSettings.capLevelToStage))`\r\n\r\nwith maxCappedLevel being equal to LevelController._maxLevel\r\nhttps://github.com/mangui/flashls/blob/dev/src/org/mangui/hls/controller/LevelController.as#L157","created_at":"2015-06-18T07:18:58Z","updated_at":"2015-06-18T07:18:58Z","html_url":"https://github.com/mangui/flashls/pull/307#discussion_r32704197","pull_request_url":"https://api.github.com/repos/mangui/flashls/pulls/307","_links":{"self":{"href":"https://api.github.com/repos/mangui/flashls/pulls/comments/32704197"},"html":{"href":"https://github.com/mangui/flashls/pull/307#discussion_r32704197"},"pull_request":{"href":"https://api.github.com/repos/mangui/flashls/pulls/307"}}},"pull_request":{"url":"https://api.github.com/repos/mangui/flashls/pulls/307","id":37285315,"html_url":"https://github.com/mangui/flashls/pull/307","diff_url":"https://github.com/mangui/flashls/pull/307.diff","patch_url":"https://github.com/mangui/flashls/pull/307.patch","issue_url":"https://api.github.com/repos/mangui/flashls/issues/307","number":307,"state":"open","locked":false,"title":"Reset Max Level On Resize","user":{"login":"ryanhefner","id":317749,"avatar_url":"https://avatars.githubusercontent.com/u/317749?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanhefner","html_url":"https://github.com/ryanhefner","followers_url":"https://api.github.com/users/ryanhefner/followers","following_url":"https://api.github.com/users/ryanhefner/following{/other_user}","gists_url":"https://api.github.com/users/ryanhefner/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhefner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhefner/subscriptions","organizations_url":"https://api.github.com/users/ryanhefner/orgs","repos_url":"https://api.github.com/users/ryanhefner/repos","events_url":"https://api.github.com/users/ryanhefner/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhefner/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nThis adds a new option to `HLSSettings`, `refreshLevelsOnResize`. The goal of this is to reset the `_maxUniqueLevels` in the `AutoLevelController` and set a new `_level` in the `FragmentLoader` on a `Event.RESIZE` of the `stage` object in an `HLS` instance.\r\n\r\nThis option is also reliant on the `HLSSettings.capLevelToStage` being set to `true`.\r\n\r\nI tried to change as little as possible with this update, but please let me know if you have any issues with it.\r\n\r\nThanks.\r\n\r\n(Ok, this should be good. Finally!)","created_at":"2015-06-09T18:41:49Z","updated_at":"2015-06-18T07:18:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa6cf1d5ef74db02055d8d7bef0b5758a08e6d9f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mangui/flashls/pulls/307/commits","review_comments_url":"https://api.github.com/repos/mangui/flashls/pulls/307/comments","review_comment_url":"https://api.github.com/repos/mangui/flashls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mangui/flashls/issues/307/comments","statuses_url":"https://api.github.com/repos/mangui/flashls/statuses/e900df4f0571d7b479a3579ba27a3b865988036e","head":{"label":"ryanhefner:stage-resize","ref":"stage-resize","sha":"e900df4f0571d7b479a3579ba27a3b865988036e","user":{"login":"ryanhefner","id":317749,"avatar_url":"https://avatars.githubusercontent.com/u/317749?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanhefner","html_url":"https://github.com/ryanhefner","followers_url":"https://api.github.com/users/ryanhefner/followers","following_url":"https://api.github.com/users/ryanhefner/following{/other_user}","gists_url":"https://api.github.com/users/ryanhefner/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhefner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhefner/subscriptions","organizations_url":"https://api.github.com/users/ryanhefner/orgs","repos_url":"https://api.github.com/users/ryanhefner/repos","events_url":"https://api.github.com/users/ryanhefner/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhefner/received_events","type":"User","site_admin":false},"repo":{"id":22383749,"name":"flashls","full_name":"ryanhefner/flashls","owner":{"login":"ryanhefner","id":317749,"avatar_url":"https://avatars.githubusercontent.com/u/317749?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanhefner","html_url":"https://github.com/ryanhefner","followers_url":"https://api.github.com/users/ryanhefner/followers","following_url":"https://api.github.com/users/ryanhefner/following{/other_user}","gists_url":"https://api.github.com/users/ryanhefner/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhefner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhefner/subscriptions","organizations_url":"https://api.github.com/users/ryanhefner/orgs","repos_url":"https://api.github.com/users/ryanhefner/repos","events_url":"https://api.github.com/users/ryanhefner/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhefner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryanhefner/flashls","description":"HLS Flash Plugin/Player (Chromeless,OSMF,FlowPlayer)","fork":true,"url":"https://api.github.com/repos/ryanhefner/flashls","forks_url":"https://api.github.com/repos/ryanhefner/flashls/forks","keys_url":"https://api.github.com/repos/ryanhefner/flashls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryanhefner/flashls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryanhefner/flashls/teams","hooks_url":"https://api.github.com/repos/ryanhefner/flashls/hooks","issue_events_url":"https://api.github.com/repos/ryanhefner/flashls/issues/events{/number}","events_url":"https://api.github.com/repos/ryanhefner/flashls/events","assignees_url":"https://api.github.com/repos/ryanhefner/flashls/assignees{/user}","branches_url":"https://api.github.com/repos/ryanhefner/flashls/branches{/branch}","tags_url":"https://api.github.com/repos/ryanhefner/flashls/tags","blobs_url":"https://api.github.com/repos/ryanhefner/flashls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryanhefner/flashls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryanhefner/flashls/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryanhefner/flashls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryanhefner/flashls/statuses/{sha}","languages_url":"https://api.github.com/repos/ryanhefner/flashls/languages","stargazers_url":"https://api.github.com/repos/ryanhefner/flashls/stargazers","contributors_url":"https://api.github.com/repos/ryanhefner/flashls/contributors","subscribers_url":"https://api.github.com/repos/ryanhefner/flashls/subscribers","subscription_url":"https://api.github.com/repos/ryanhefner/flashls/subscription","commits_url":"https://api.github.com/repos/ryanhefner/flashls/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryanhefner/flashls/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryanhefner/flashls/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryanhefner/flashls/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryanhefner/flashls/contents/{+path}","compare_url":"https://api.github.com/repos/ryanhefner/flashls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryanhefner/flashls/merges","archive_url":"https://api.github.com/repos/ryanhefner/flashls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryanhefner/flashls/downloads","issues_url":"https://api.github.com/repos/ryanhefner/flashls/issues{/number}","pulls_url":"https://api.github.com/repos/ryanhefner/flashls/pulls{/number}","milestones_url":"https://api.github.com/repos/ryanhefner/flashls/milestones{/number}","notifications_url":"https://api.github.com/repos/ryanhefner/flashls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryanhefner/flashls/labels{/name}","releases_url":"https://api.github.com/repos/ryanhefner/flashls/releases{/id}","created_at":"2014-07-29T14:58:41Z","updated_at":"2015-05-06T15:05:49Z","pushed_at":"2015-06-12T15:59:24Z","git_url":"git://github.com/ryanhefner/flashls.git","ssh_url":"git@github.com:ryanhefner/flashls.git","clone_url":"https://github.com/ryanhefner/flashls.git","svn_url":"https://github.com/ryanhefner/flashls","homepage":"http://www.flashls.org","size":62254,"stargazers_count":0,"watchers_count":0,"language":"ActionScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mangui:dev","ref":"dev","sha":"1c8ca36b18d91d8cb3f9dc4dd94e6d43e2bfb5ef","user":{"login":"mangui","id":1798553,"avatar_url":"https://avatars.githubusercontent.com/u/1798553?v=3","gravatar_id":"","url":"https://api.github.com/users/mangui","html_url":"https://github.com/mangui","followers_url":"https://api.github.com/users/mangui/followers","following_url":"https://api.github.com/users/mangui/following{/other_user}","gists_url":"https://api.github.com/users/mangui/gists{/gist_id}","starred_url":"https://api.github.com/users/mangui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangui/subscriptions","organizations_url":"https://api.github.com/users/mangui/orgs","repos_url":"https://api.github.com/users/mangui/repos","events_url":"https://api.github.com/users/mangui/events{/privacy}","received_events_url":"https://api.github.com/users/mangui/received_events","type":"User","site_admin":false},"repo":{"id":21170833,"name":"flashls","full_name":"mangui/flashls","owner":{"login":"mangui","id":1798553,"avatar_url":"https://avatars.githubusercontent.com/u/1798553?v=3","gravatar_id":"","url":"https://api.github.com/users/mangui","html_url":"https://github.com/mangui","followers_url":"https://api.github.com/users/mangui/followers","following_url":"https://api.github.com/users/mangui/following{/other_user}","gists_url":"https://api.github.com/users/mangui/gists{/gist_id}","starred_url":"https://api.github.com/users/mangui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mangui/subscriptions","organizations_url":"https://api.github.com/users/mangui/orgs","repos_url":"https://api.github.com/users/mangui/repos","events_url":"https://api.github.com/users/mangui/events{/privacy}","received_events_url":"https://api.github.com/users/mangui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mangui/flashls","description":"HLS Flash Plugin/Player (Chromeless,OSMF,FlowPlayer,mediaelement.js,video.js,Clappr)","fork":false,"url":"https://api.github.com/repos/mangui/flashls","forks_url":"https://api.github.com/repos/mangui/flashls/forks","keys_url":"https://api.github.com/repos/mangui/flashls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mangui/flashls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mangui/flashls/teams","hooks_url":"https://api.github.com/repos/mangui/flashls/hooks","issue_events_url":"https://api.github.com/repos/mangui/flashls/issues/events{/number}","events_url":"https://api.github.com/repos/mangui/flashls/events","assignees_url":"https://api.github.com/repos/mangui/flashls/assignees{/user}","branches_url":"https://api.github.com/repos/mangui/flashls/branches{/branch}","tags_url":"https://api.github.com/repos/mangui/flashls/tags","blobs_url":"https://api.github.com/repos/mangui/flashls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mangui/flashls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mangui/flashls/git/refs{/sha}","trees_url":"https://api.github.com/repos/mangui/flashls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mangui/flashls/statuses/{sha}","languages_url":"https://api.github.com/repos/mangui/flashls/languages","stargazers_url":"https://api.github.com/repos/mangui/flashls/stargazers","contributors_url":"https://api.github.com/repos/mangui/flashls/contributors","subscribers_url":"https://api.github.com/repos/mangui/flashls/subscribers","subscription_url":"https://api.github.com/repos/mangui/flashls/subscription","commits_url":"https://api.github.com/repos/mangui/flashls/commits{/sha}","git_commits_url":"https://api.github.com/repos/mangui/flashls/git/commits{/sha}","comments_url":"https://api.github.com/repos/mangui/flashls/comments{/number}","issue_comment_url":"https://api.github.com/repos/mangui/flashls/issues/comments{/number}","contents_url":"https://api.github.com/repos/mangui/flashls/contents/{+path}","compare_url":"https://api.github.com/repos/mangui/flashls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mangui/flashls/merges","archive_url":"https://api.github.com/repos/mangui/flashls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mangui/flashls/downloads","issues_url":"https://api.github.com/repos/mangui/flashls/issues{/number}","pulls_url":"https://api.github.com/repos/mangui/flashls/pulls{/number}","milestones_url":"https://api.github.com/repos/mangui/flashls/milestones{/number}","notifications_url":"https://api.github.com/repos/mangui/flashls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mangui/flashls/labels{/name}","releases_url":"https://api.github.com/repos/mangui/flashls/releases{/id}","created_at":"2014-06-24T15:51:34Z","updated_at":"2015-06-18T02:08:48Z","pushed_at":"2015-06-15T15:37:12Z","git_url":"git://github.com/mangui/flashls.git","ssh_url":"git@github.com:mangui/flashls.git","clone_url":"https://github.com/mangui/flashls.git","svn_url":"https://github.com/mangui/flashls","homepage":"http://www.flashls.org","size":71484,"stargazers_count":291,"watchers_count":291,"language":"ActionScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":123,"mirror_url":null,"open_issues_count":110,"forks":123,"open_issues":110,"watchers":291,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/mangui/flashls/pulls/307"},"html":{"href":"https://github.com/mangui/flashls/pull/307"},"issue":{"href":"https://api.github.com/repos/mangui/flashls/issues/307"},"comments":{"href":"https://api.github.com/repos/mangui/flashls/issues/307/comments"},"review_comments":{"href":"https://api.github.com/repos/mangui/flashls/pulls/307/comments"},"review_comment":{"href":"https://api.github.com/repos/mangui/flashls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mangui/flashls/pulls/307/commits"},"statuses":{"href":"https://api.github.com/repos/mangui/flashls/statuses/e900df4f0571d7b479a3579ba27a3b865988036e"}}}}