You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firefox and Safari expose very few of these signals, so it’s important
that developers build accordingly. This should, hopefully, nudge them in
the right direction.
|`deviceCapability`|`'strong'`\|`'moderate'`\|`'weak'`| Device capability stance | From `ramCategory` and `cpuCategory`|**strong** when CPU is **high****and** RAM is **medium/high**; **weak** when RAM is **very-low/low****or** CPU is **low**; otherwise **moderate**. Adds matching classes. |
223
+
224
+
## Unsupported Browsers
225
+
226
+
Most of these APIs are only available in Chromium browsers. This means you need
227
+
to decide how to handle notable absentees like iOS yourself: Obs.js does not
228
+
make opinionated decisions for you.
229
+
230
+
Your choices are:
231
+
232
+
1. Always ship the rich version to Safari, or;
233
+
2. Always ship the lite version to Safari.
234
+
235
+
You can write your `if`s and `else`s to accommodate either.
236
+
237
+
```js
238
+
if (window.obs?.shouldAvoidRichMedia===true) {
239
+
// Serve lite version to slow supportive browsers.
240
+
} else {
241
+
// Serve rich version to fast supportive browsers and Safari.
242
+
}
243
+
```
244
+
245
+
```js
246
+
if (window.obs?.canShowRichMedia===true) {
247
+
// Serve rich version to fast supportive browsers.
248
+
} else {
249
+
// Serve lite version to slow supportive browsers and Safari.
0 commit comments