W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > January 2017

Re: [mediacapture-main] Revive createObjectURL?

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Tue, 10 Jan 2017 17:10:36 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-271635506-1484068235-sysbot+gh@w3.org>
@foolip The first fallback you mention:
if ('srcObject' in video) {
  video.srcObject = stream;
} else {
  video.src = URL.createObjectURL(stream);
is right IMHO, but createObjectURL *is* the fallback there, putting it
 in the existing srcObject (0.0003%) column, i.e. it's not a fallback 
that will can reduce the 0.007-0.1% breakage number.

The other one boils down to:
try {
  // try old code
} catch (e) {
  // try new code
which I agree is unlikely, because I don't think people generally 
write fallbacks for old code. That would require them to anticipate it
 being removed, which they don't.

Sadly, there's no fallback for createObjectURL. I see no way to reduce
 breakage other than putting in deprecation warnings and waiting for 
srcObject adoption.

GitHub Notification of comment by jan-ivar
Please view or discuss this issue at 
 using your GitHub account
Received on Tuesday, 10 January 2017 17:10:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:31 UTC