{"action":"created","issue":{"url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1456","repository_url":"https://api.github.com/repos/jwplayer/jwplayer","labels_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1456/labels{/name}","comments_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1456/comments","events_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1456/events","html_url":"https://github.com/jwplayer/jwplayer/issues/1456","id":180089786,"number":1456,"title":"Missing quality selector","user":{"login":"kasty","id":5735310,"avatar_url":"https://avatars.githubusercontent.com/u/5735310?v=3","gravatar_id":"","url":"https://api.github.com/users/kasty","html_url":"https://github.com/kasty","followers_url":"https://api.github.com/users/kasty/followers","following_url":"https://api.github.com/users/kasty/following{/other_user}","gists_url":"https://api.github.com/users/kasty/gists{/gist_id}","starred_url":"https://api.github.com/users/kasty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kasty/subscriptions","organizations_url":"https://api.github.com/users/kasty/orgs","repos_url":"https://api.github.com/users/kasty/repos","events_url":"https://api.github.com/users/kasty/events{/privacy}","received_events_url":"https://api.github.com/users/kasty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-29T15:56:44Z","updated_at":"2016-10-18T18:40:44Z","closed_at":null,"body":"The « levels » event is not triggered after playing a preroll on a HLS video with jwplayer in flash mode. This induces the quality selector is never displayed.\r\n\r\n### Steps to reproduce\r\n\r\n1. Don't use any adblocker\r\n2. Visit this url and see that there's no \"settings\" button : http://player-v3-dev.arte.tv/index.php?json_url=https%3A%2F%2Fapi.arte.tv%2Fapi%2Fplayer%2Fv1%2Fconfig%2Ffr%2F052808-001-A%3Fautostart%3D0%26lifeCycle%3D1&lang=fr_FR&config=arte_tvguide\r\n3. Active your adblocker and refresh the page : the settings button appears\r\n\r\nI made some tests and I can tell that the \"levels\" event is never triggered in this problematic case described above\r\n\r\n### Environment\r\n\r\n- *MacBook Air*\r\n- *OS X El Capitan / Chrome Version 53.0.2785.116 / Firefox 49.0.1 / Flash Version 23*\r\n- *JW Player 7.6.0*\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jwplayer/jwplayer/issues/comments/254600285","html_url":"https://github.com/jwplayer/jwplayer/issues/1456#issuecomment-254600285","issue_url":"https://api.github.com/repos/jwplayer/jwplayer/issues/1456","id":254600285,"user":{"login":"robwalch","id":333258,"avatar_url":"https://avatars.githubusercontent.com/u/333258?v=3","gravatar_id":"","url":"https://api.github.com/users/robwalch","html_url":"https://github.com/robwalch","followers_url":"https://api.github.com/users/robwalch/followers","following_url":"https://api.github.com/users/robwalch/following{/other_user}","gists_url":"https://api.github.com/users/robwalch/gists{/gist_id}","starred_url":"https://api.github.com/users/robwalch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robwalch/subscriptions","organizations_url":"https://api.github.com/users/robwalch/orgs","repos_url":"https://api.github.com/users/robwalch/repos","events_url":"https://api.github.com/users/robwalch/events{/privacy}","received_events_url":"https://api.github.com/users/robwalch/received_events","type":"User","site_admin":false},"created_at":"2016-10-18T18:40:44Z","updated_at":"2016-10-18T18:40:44Z","body":"Hi @kasty, It looks like the \"level\" event fires, but it does not contain any levels. I'm looking into why... this is a file called settings.js on your website. It is not part of our player:\r\n\r\n```js\r\n/**\r\n * This is a special case to force settings button display if there are some versions and if the settings button has not already been display in the levels event\r\n * @see PLAYER-1012 + PLAYER-1011\r\n */\r\nself.jwplayer.on('play', function() {\r\n\r\n    if(!self.settingsBtnTested &&\r\n        $(this.getContainer()).find(self.$el).length == 0) {\r\n        self.jwplayer.trigger('levels'); \r\n    }\r\n    \r\n    // don't try anymore\r\n    self.settingsBtnTested = true;\r\n});\r\n```\r\n\r\nTriggering levels without an event object causes a JavaScript exception later in code this is part of your site and not part of jwplayer.\r\n\r\nThis might work if you made the event include an event object that included the expected data:\r\n\r\n```js\r\nself.jwplayer.trigger('levels', {\r\n    levels: self.jwplayer.getQualityLevels()\r\n    currentQuality:  self.jwplayer.getCurrentQuality()\r\n}); \r\n```"}}
{"actor":{"display_login":"robwalch"}}