{"action":"created","issue":{"url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/1628","repository_url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon","labels_url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/1628/labels{/name}","comments_url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/1628/comments","events_url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/1628/events","html_url":"https://github.com/MoonchildProductions/Pale-Moon/issues/1628","id":302505794,"number":1628,"title":"Crash involving `AudioContext#createMediaElementSource`.","user":{"login":"leewz","id":6633759,"avatar_url":"https://avatars1.githubusercontent.com/u/6633759?v=4","gravatar_id":"","url":"https://api.github.com/users/leewz","html_url":"https://github.com/leewz","followers_url":"https://api.github.com/users/leewz/followers","following_url":"https://api.github.com/users/leewz/following{/other_user}","gists_url":"https://api.github.com/users/leewz/gists{/gist_id}","starred_url":"https://api.github.com/users/leewz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leewz/subscriptions","organizations_url":"https://api.github.com/users/leewz/orgs","repos_url":"https://api.github.com/users/leewz/repos","events_url":"https://api.github.com/users/leewz/events{/privacy}","received_events_url":"https://api.github.com/users/leewz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-05T23:32:09Z","updated_at":"2018-03-07T10:17:22Z","closed_at":null,"author_association":"NONE","body":"The following code, based on [MDN example code](https://developer.mozilla.org/en-US/docs/Web/API/StereoPannerNode/pan), causes the browser to crash in Youtube video pages.\r\n\r\n```js\r\nvar audioCtx = new window.AudioContext();\r\nvar myAudio = document.querySelector('video, audio, media');\r\nvar source = audioCtx.createMediaElementSource(myAudio);\r\n```\r\n\r\nI haven't tested it too thoroughly, but here's what I did test.\r\n- I've tested on two different profiles and a fresh profile.\r\n- I've tested on two video pages, a profile page, and the main site. Note that the main site and profile page actually have multiple video elements, and the first one is not the one that's playing.\r\n- The videos are not especially DRM'd.\r\n- The crash doesn't happen if the video is paused. Pausing, running the above code, and unpausing will result in the crash.\r\n- The video actually plays for about a second (with no audio) before crashing.\r\n\r\nSystem details: Windows 10. Pale Moon x64 27.7.2."},"comment":{"url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/comments/371091463","html_url":"https://github.com/MoonchildProductions/Pale-Moon/issues/1628#issuecomment-371091463","issue_url":"https://api.github.com/repos/MoonchildProductions/Pale-Moon/issues/1628","id":371091463,"user":{"login":"wolfbeast","id":3359132,"avatar_url":"https://avatars3.githubusercontent.com/u/3359132?v=4","gravatar_id":"","url":"https://api.github.com/users/wolfbeast","html_url":"https://github.com/wolfbeast","followers_url":"https://api.github.com/users/wolfbeast/followers","following_url":"https://api.github.com/users/wolfbeast/following{/other_user}","gists_url":"https://api.github.com/users/wolfbeast/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfbeast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfbeast/subscriptions","organizations_url":"https://api.github.com/users/wolfbeast/orgs","repos_url":"https://api.github.com/users/wolfbeast/repos","events_url":"https://api.github.com/users/wolfbeast/events{/privacy}","received_events_url":"https://api.github.com/users/wolfbeast/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T10:17:22Z","updated_at":"2018-03-07T10:17:22Z","author_association":"OWNER","body":"What you're doing doesn't make sense. I'm not surprised that this causes a crash because you're effectively replacing the media content, this will result in the player trying to \"catch up\" with the new media source that is nonsensical by deleting chunks of the existing streams that are no longer current for the context, while still trying to play from that context (and assigning incompatible media at that).\r\n\r\nI don't think there's much we can do to avoid this."}}
{"actor":{"display_login":"wolfbeast"}}