media icon indicating copy to clipboard operation
media copied to clipboard

Gracefully fall back to dummy backend

Open ghost opened this issue 5 years ago • 3 comments
trafficstars

As discussed in https://github.com/servo/servo/pull/24829, we should gracefully fall back to the dummy backend, when the system dependencies are unavailable or fail to work.

/cc @jdm

ghost avatar Jan 12 '20 00:01 ghost

Probably should have a printed warning though

Manishearth avatar Jan 12 '20 03:01 Manishearth

That's a good idea. Is there a central event/log system in servo for that? I suppose trying to render media elements and, when one fails, drawing a placeholder is already a thing in servo, similar to Firefox, right?

ghost avatar Jan 13 '20 14:01 ghost

Oh, just use warn!() or probably error!() from the log crate, we already use it in the codebase, e.g.

https://github.com/servo/media/blob/220ed1388f2ba008b05f5e94aca21dd14aa37290/backends/gstreamer/lib.rs#L162

Manishearth avatar Jan 14 '20 08:01 Manishearth