{"action":"created","issue":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/690","labels_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/690/labels{/name}","comments_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/690/comments","events_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/690/events","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/690","id":99204307,"number":690,"title":"Never create a native SourceBuffer for fragmented text","user":{"login":"bbcrddave","id":5390145,"avatar_url":"https://avatars.githubusercontent.com/u/5390145?v=3","gravatar_id":"","url":"https://api.github.com/users/bbcrddave","html_url":"https://github.com/bbcrddave","followers_url":"https://api.github.com/users/bbcrddave/followers","following_url":"https://api.github.com/users/bbcrddave/following{/other_user}","gists_url":"https://api.github.com/users/bbcrddave/gists{/gist_id}","starred_url":"https://api.github.com/users/bbcrddave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbcrddave/subscriptions","organizations_url":"https://api.github.com/users/bbcrddave/orgs","repos_url":"https://api.github.com/users/bbcrddave/repos","events_url":"https://api.github.com/users/bbcrddave/events{/privacy}","received_events_url":"https://api.github.com/users/bbcrddave/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T13:26:25Z","updated_at":"2015-08-05T15:18:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/pulls/690","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/690","diff_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/690.diff","patch_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/690.patch"},"body":"Safari makes some dubious claims about codec support in both HTMLMediaElement.canPlayType and Mediasource.isTypeSupported. Presumably based on the same logic, it will allow SourceBuffers to be created for types it does not actually understand.\r\n\r\nA native SourceBuffer is created for type application/mp4;codecs=\"stpp\", but when the initialisation segment for that stream is appended the browser crashes with SIGSEGV.\r\n\r\nThis patch checks the codec type and ensures the native addSourceBuffer is never called for application/mp4;codecs=\"stpp\". No current UA supports this type so this change should not affect any UA other than Safari (I am happy to be corrected if I have this wrong). I have verified this with IE11, Edge, FF (Nightly), Chrome and Safari.\r\n\r\nCurrently attempting to play http://rdmedia.bbc.co.uk/dash/ondemand/elephants_dream/1/client_manifest-all.mpd shows the fault. On applying this patch, Safari will no longer crash but will still not play anything because Safari does not support AVC3 video (despite claiming it does, similar to above).\r\n\r\nEDIT: Clearly it would be preferable not to require this workaround, and that all UAs respond correctly with the types of sourcebuffer they can support. I am also aware that should any UA choose to support TTML via MSE in the future this patch will need to be revisited.\r\n\r\nAdditionally I am filing a bug with Apple relating to this."},"comment":{"url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/comments/128033923","html_url":"https://github.com/Dash-Industry-Forum/dash.js/pull/690#issuecomment-128033923","issue_url":"https://api.github.com/repos/Dash-Industry-Forum/dash.js/issues/690","id":128033923,"user":{"login":"nigelmegitt","id":4988915,"avatar_url":"https://avatars.githubusercontent.com/u/4988915?v=3","gravatar_id":"","url":"https://api.github.com/users/nigelmegitt","html_url":"https://github.com/nigelmegitt","followers_url":"https://api.github.com/users/nigelmegitt/followers","following_url":"https://api.github.com/users/nigelmegitt/following{/other_user}","gists_url":"https://api.github.com/users/nigelmegitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nigelmegitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigelmegitt/subscriptions","organizations_url":"https://api.github.com/users/nigelmegitt/orgs","repos_url":"https://api.github.com/users/nigelmegitt/repos","events_url":"https://api.github.com/users/nigelmegitt/events{/privacy}","received_events_url":"https://api.github.com/users/nigelmegitt/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T15:18:24Z","updated_at":"2015-08-05T15:18:24Z","body":"> Clearly it would be preferable not to require this workaround, and that all UAs respond correctly with the types of sourcebuffer they can support.\r\n\r\n+1\r\n\r\nBy taping over Safari's fault here we also give an argument back to browser implementors to say 'it's okay never to support TTML because even dash.js explicitly never passes it through' whereas better messages would be a) UAs should respond correctly when queried for what they support and b) we might have wanted to pass TTML to the browser to display but in the absence of native playback we had to roll our own player solution.\r\n\r\nSpecifically in the case of IE11, which already supports non-MSE TTML, it would be great to be able to back out of this change if Microsoft were to implement TTML in MSE. Naively I'd guess that's a low impact addition, but I don't know how this fits with their roadmap or what Edge supports.\r\n\r\nAny embedded browsers built to support HbbTV 2 will also need to handle TTML in DASH of course (as the EBU-TT-D profile)."}}