Closed Bug 1334564 Opened 3 years ago Closed 3 years ago
.create Object URL(mediastream)
Per https://github.com/w3c/mediacapture-main/issues/404 we've agreed in the MediaCapture WG to not bring back createObjectURL(stream) - it's been removed from the spec since 2013. We, Chrome and Microsoft Edge are all in agreement to deprecate and remove the implementations. We should start with warnings in discuss-webrtc and elsewhere, deprecation warnings, then removal (though we could have it hold in Aurora or Beta for a release or two).
Webkit bug: https://webkit.org/b/167518
I cannot just use [Deprecated=..] in webidl because this method has many overloads (Blob/MediaStream/MediaSource) and, having only 1 of them deprecated is not supported by our codegen.
Assignee: nobody → amarchesini
Attachment #8832851 - Flags: review?(bugs)
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/95fe30082f2c Deprecate URL.createObjectURL(mediastream), r=smaug
Backed out for mochitest failure: https://hg.mozilla.org/integration/mozilla-inbound/rev/cc3e830547b342287f1f56b79c215b0a0125a7e9 Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=bfaa720977d27855278f1c1985636ea9f76d3cb4 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=73920864&repo=mozilla-inbound [task 2017-02-02T15:36:19.165181Z] 15:36:19 INFO - TEST-UNEXPECTED-FAIL | dom/bindings/test/test_exception_messages.html | Correct exception should be thrown for overload resolution failure - got "Argument 1 is not valid for any of the 1-argument overloads of URL.createObjectURL.", expected "Argument 1 is not valid for any of the 2-argument overloads of URL.createObjectURL." [task 2017-02-02T15:36:19.166963Z] 15:36:19 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:271:5 [task 2017-02-02T15:36:19.168665Z] 15:36:19 INFO - @dom/bindings/test/test_exception_messages.html:67:11
Backout by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1e55e6d3a08a Backed out changeset 95fe30082f2c
Comment on attachment 8832852 [details] [diff] [review] media_deprecate.patch Review of attachment 8832852 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/locales/en-US/chrome/dom/dom.properties @@ +321,5 @@ > GeolocationInsecureRequestIsForbidden=A Geolocation request can only be fulfilled in a secure context. > # LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name. > LargeAllocationNonWin32=This page would be loaded in a new process due to a Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms. > +# LOCALIZATION NOTE: Do not translate URL.createObjectURL(MediaSource). > +URLCreateObjectURL_MediaSource=URL.createObjectURL(MediaSource) is deprecated and will be removed soon. s/MediaSource/MediaStream/ It is URL.createObjectURL(MediaStream) that is being deprecated, not URL.createObjectURL(MediaSource). Deprecating URL.createObjectURL(MediaSource) is blocked on bug 886194.
Attachment #8832852 - Flags: review+ → review-
I'm about to write the site compatibility doc but apparently my own app  is also affected. Is there any workaround for this?  https://github.com/bzdeck/bzdeck/blob/master/webroot/static/scripts/views/login-form.js#L145
Ah okay, > $video.src = URL.createObjectURL(stream); can be simply replaced with > $video.srcObject = stream; as https://w3c.github.io/mediacapture-main/#examples shows.
Posted the site compatibility doc: https://www.fxsitecompat.com/en-CA/docs/2017/url-createobjecturl-stream-has-been-deprecated/
(In reply to Kohei Yoshino [:kohei] from comment #12) > Posted the site compatibility doc: > https://www.fxsitecompat.com/en-CA/docs/2017/url-createobjecturl-stream-has- > been-deprecated/ > HTMLMediaElement.prototype.srcObject property can still be used I'd say "should be used"
Thanks :jesup, modified the doc accordingly.
Attachment #8833214 - Flags: review?(jib) → review?(rjesup)
Comment on attachment 8833214 [details] [diff] [review] media_deprecate.patch Review of attachment 8833214 [details] [diff] [review]: ----------------------------------------------------------------- r+, though I'm not a DOM reviewer/peer
Attachment #8833214 - Flags: review?(rjesup) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/3d7fce1fab83 Deprecate URL.createObjectURL(mediastream), r=smaug, r=rjesup
I have documented this change on MDN, by first of all making sure it is adequately covered on the createObjectURL() page: https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL And second by making sure a note has been added to the Fx54 release notes: https://developer.mozilla.org/en-US/Firefox/Releases/54#Media Let me know if this looks OK. Thanks!
Fixing the misleading summary. As far as I read, it's just deprecated in Firefox 54 so the MDN docs aren't correct.
Summary: Deprecate and remove URL.createObjectURL(mediastream) → Deprecate URL.createObjectURL(mediastream)
(In reply to Kohei Yoshino [:kohei] from comment #20) > Fixing the misleading summary. As far as I read, it's just deprecated in > Firefox 54 so the MDN docs aren't correct. Damn, I misunderstood that one ;-) I've fixed the docs accordingly: https://developer.mozilla.org/en-US/Firefox/Releases/54#Media_Capture_and_Streams_API https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
Hi, Despite the deprecation, there is a bug and the console won't show a warning when using createObjectURL. :padenot submitted a patch but it has been marked as "won't fix" for FF54 https://bugzilla.mozilla.org/show_bug.cgi?id=1369698 I wonder whether we should reword the release notes.
Updated the site compat note: https://www.fxsitecompat.com/en-CA/docs/2017/url-createobjecturl-stream-has-been-deprecated/
You need to log in before you can comment on or make changes to this bug.