New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio loaded through @resource no longer playing. FF42/GM3.5 #2326
Comments
woops, that was an error in the test script. changed it to |
Ad 2) I suppose that's associated. This gives the same result: <audio controls>
<source src="" type="audio/mpeg"/>
<source src="" type="audio/ogg"/>
</audio> |
So it's acting like GM strings aren't valid anymore for audio/source tags. Because this doesnt work in FF42/GM3.5, whereas it does work in FF41/GM3.5 (just tested that) <source src="greasemonkey-script:7ca92a11-b6cc-45a9-b728-23bdf2c28c68/b" type="audio/ogg"> Using the full url obviously works in both firefox versions. <source src="https://dl.dropboxusercontent.com/u/936879/test.ogg" type="audio/ogg"> |
This is a bug, but as you've reported it happens when changing FF version and keeping GM stable, it's probably not ours. https://bugzilla.mozilla.org/show_bug.cgi?id=1222761 |
There seem to be a few new flags in nsIProtocolHandler I wonder if they would make a difference. |
Ad https://bugzilla.mozilla.org/show_bug.cgi?id=1222761#c4 For example: https://github.com/janekptacijarabaci/greasemonkey/tree/_testBranch_scriptProtocol channel.originalURI.spec = file://...mp3(ogg) Unfortunately, I see no difference. |
As comments 1 and 4 on the upstream bug report reference, the actual issue is that we don't set the originalURI on the channel, which means the protocol handler actually treats it as a file URI channel. Setting the originalURI to the URI the channel was requested for seems to indeed fix the problem (Ventero@690364b). URI_SAFE_TO_LOAD_IN_SECURE_CONTEXT is only relevant for loading http (or other insecure) content in a secure (i.e. https) environment. |
Thanks for confirming @Ventero ! |
Oh, so it has to be reversed... (yes, also https://bugzilla.mozilla.org/show_bug.cgi?id=1222761#c1 - why I hadn't noticed it before...) :-) originalURI = (file://... => greasemonkey-script://...) |
That was fast. Thanks everyone. ^^ |
I load a small audio file through @resource/GM_getResourceURL, and while it returns a GM string and inserts it correctly into each source element, it wont actually play the files anymore. Loading images still works as normal.
Firefox 42
Greasemonkey 3.5
Small test script with two audio files and an image: https://dl.dropboxusercontent.com/u/936879/test.user.js
The text was updated successfully, but these errors were encountered: