{"action":"created","issue":{"url":"https://api.github.com/repos/dailymotion/hls.js/issues/642","repository_url":"https://api.github.com/repos/dailymotion/hls.js","labels_url":"https://api.github.com/repos/dailymotion/hls.js/issues/642/labels{/name}","comments_url":"https://api.github.com/repos/dailymotion/hls.js/issues/642/comments","events_url":"https://api.github.com/repos/dailymotion/hls.js/issues/642/events","html_url":"https://github.com/dailymotion/hls.js/issues/642","id":172721693,"number":642,"title":"VOD with multi audio end of stream","user":{"login":"sergiojm","id":16645629,"avatar_url":"https://avatars.githubusercontent.com/u/16645629?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiojm","html_url":"https://github.com/sergiojm","followers_url":"https://api.github.com/users/sergiojm/followers","following_url":"https://api.github.com/users/sergiojm/following{/other_user}","gists_url":"https://api.github.com/users/sergiojm/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiojm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiojm/subscriptions","organizations_url":"https://api.github.com/users/sergiojm/orgs","repos_url":"https://api.github.com/users/sergiojm/repos","events_url":"https://api.github.com/users/sergiojm/events{/privacy}","received_events_url":"https://api.github.com/users/sergiojm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-23T14:55:41Z","updated_at":"2016-08-23T18:01:54Z","closed_at":null,"body":"<!-- If you are raising a bug playing a stream, you must fill out the following or your issue may not be responded to. For features or improvements, you may delete this. -->\r\n##### Environment\r\n<!-- Replace [ ] with [x] to check off the list -->\r\n- [x] The stream has correct Access-Control-Allow-Origin headers (CORS)\r\n- [x] There are no network errors such as 404s in the browser console when trying to play the stream\r\n- [x] The issue observed is not already reported by searching on Github under https://github.com/dailymotion/hls.js/issues\r\n- [x] The issue occurs in the latest reference client on http://dailymotion.github.io/hls.js/demo and not just on my page\r\n* Link to playable M3U8 file: http://mediaspace.streamamg.com/videoandaudio.m3u8\r\n* Hls.js version: Latest\r\n* Browser name/version: at least chrome/firefox\r\n* OS name/version: at least Mac and Windows\r\n\r\nWith a VOD and multi audio when buffer reach end of stream if we try to change audio track it doesn't play the sound(first try, second yes)\r\n \r\n##### Expected behavior\r\nPlay audio even when buffer reached end\r\n\r\n##### Actual behavior\r\nnot playing on first attempt\r\n\r\nWhat we saw is that a endOfStream is fired when buffer fetch reach the end so when swapping audio doesn't attach correctly.\r\n\r\nWith cache enable is easier to replicate.\r\n\r\nWe did make a fix but correct logic on how should be trigger the endOfStream needs to be revisited.\r\n\r\n```\r\nvalue: function _findFragment(_ref3) {\r\n(...)\r\n if (!levelDetails.live&&!(this.hls.audioTracks.length>1))  {\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dailymotion/hls.js/issues/comments/241820349","html_url":"https://github.com/dailymotion/hls.js/issues/642#issuecomment-241820349","issue_url":"https://api.github.com/repos/dailymotion/hls.js/issues/642","id":241820349,"user":{"login":"sergiojm","id":16645629,"avatar_url":"https://avatars.githubusercontent.com/u/16645629?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiojm","html_url":"https://github.com/sergiojm","followers_url":"https://api.github.com/users/sergiojm/followers","following_url":"https://api.github.com/users/sergiojm/following{/other_user}","gists_url":"https://api.github.com/users/sergiojm/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiojm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiojm/subscriptions","organizations_url":"https://api.github.com/users/sergiojm/orgs","repos_url":"https://api.github.com/users/sergiojm/repos","events_url":"https://api.github.com/users/sergiojm/events{/privacy}","received_events_url":"https://api.github.com/users/sergiojm/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T18:01:54Z","updated_at":"2016-08-23T18:01:54Z","body":"Change of audio after endOfStream() is raised dont play audio track:\r\n\r\n[log] > parsed video,PTS:[240.040,240.200],DTS:[240.000/240.200],nb:5,dropped:0\r\nlogger.js:37 [log] > engine state transition from PARSING to PARSED\r\nlogger.js:37 [log] > main buffered : [0,18][202,240.2]\r\nlogger.js:37 [log] > engine state transition from PARSED to IDLE\r\nlogger.js:37 [log] > all media data available, signal endOfStream() to MediaSource and stop loading fragment\r\nlogger.js:37 [log] > engine state transition from IDLE to ENDED\r\nlogger.js:37 [log] > media source ended\r\nlogger.js:37 [log] > demuxing in webworker\r\nlogger.js:37 [log] > Demuxing 109 of [0 ,120],track 1\r\nlogger.js:37 [log] > track:audio,container:audio/mp4,codecs[level/parsed]=[mp4a.40.2/mp4a.40.2]\r\nlogger.js:37 [log] > parsed audio,PTS:[218.000,220.020],DTS:[218.000/220.020],nb:87\r\nlogger.js:37 [log] > audio buffered : [218,220.019863]\r\nlogger.js:37 [log] > Loading 110 of [0 ,120],track 1, currentTime:219.324859,bufferEnd:220.020\r\nlogger.js:37 [log] > Demuxing 110 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[220.020,222.018],DTS:[220.020/222.018],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,222.017686]\r\nlogger.js:37 [log] > Loading 111 of [0 ,120],track 1, currentTime:219.835269,bufferEnd:222.018\r\nlogger.js:37 [log] > Demuxing 111 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[222.018,224.015],DTS:[222.018/224.015],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,224.01467]\r\nlogger.js:37 [log] > Loading 112 of [0 ,120],track 1, currentTime:220.085721,bufferEnd:224.015\r\nlogger.js:37 [log] > Demuxing 112 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[224.015,226.009],DTS:[224.015/226.009],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,226.008661]\r\nlogger.js:37 [log] > Loading 113 of [0 ,120],track 1, currentTime:220.222679,bufferEnd:226.009\r\nlogger.js:37 [log] > Demuxing 113 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[226.009,228.006],DTS:[226.009/228.006],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,228.005667]\r\nlogger.js:37 [log] > Loading 114 of [0 ,120],track 1, currentTime:220.348563,bufferEnd:228.006\r\nlogger.js:37 [log] > Demuxing 114 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[228.006,230.003],DTS:[228.006/230.003],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,230.002674]\r\nlogger.js:37 [log] > Loading 115 of [0 ,120],track 1, currentTime:220.475609,bufferEnd:230.003\r\nlogger.js:37 [log] > Demuxing 115 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[230.003,232.000],DTS:[230.003/232.000],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,231.999681]\r\nlogger.js:37 [log] > Loading 116 of [0 ,120],track 1, currentTime:220.60155,bufferEnd:232.000\r\nlogger.js:37 [log] > Demuxing 116 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[232.000,234.020],DTS:[232.000/234.020],nb:87\r\nlogger.js:37 [log] > audio buffered : [218,234.019863]\r\nlogger.js:37 [log] > Loading 117 of [0 ,120],track 1, currentTime:220.727962,bufferEnd:234.020\r\nlogger.js:37 [log] > Demuxing 117 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[234.020,236.018],DTS:[234.020/236.018],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,236.017686]\r\nlogger.js:37 [log] > Loading 118 of [0 ,120],track 1, currentTime:220.857531,bufferEnd:236.018\r\nlogger.js:37 [log] > Demuxing 118 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[236.018,238.015],DTS:[236.018/238.015],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,238.01467]\r\nlogger.js:37 [log] > Loading 119 of [0 ,120],track 1, currentTime:221.110083,bufferEnd:238.015\r\nlogger.js:37 [log] > Demuxing 119 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[238.015,240.012],DTS:[238.015/240.012],nb:86\r\nlogger.js:37 [log] > audio buffered : [218,240.011677]\r\nlogger.js:37 [log] > Loading 120 of [0 ,120],track 1, currentTime:221.23687,bufferEnd:240.012\r\nlogger.js:37 [log] > Demuxing 120 of [0 ,120],track 1\r\nlogger.js:37 [log] > parsed audio,PTS:[240.012,240.291],DTS:[240.012/240.291],nb:12\r\nlogger.js:37 [log] > audio buffered : [218,240.290611]"}}
{"actor":{"display_login":"sergiojm"}}