Chrome 62 Beta: Network Quality Estimator API, OpenType variable fonts, and media capture from DOM elements
Wednesday, September 20, 2017
Network Quality Estimator API
The Network Infomation API has been available in previous versions of Chrome, but has only provided theoretical network speeds given the type of a user's connection. In this release, the API has been expanded to provide developers with network performance metrics as experienced by the client. Using the API, a developer can inspect the current expected round trip time and throughput and be notified of performance changes. To simplify application logic, the API also summarizes measured network performance as the cellular connection type (e.g. 2G) most similar to it, even if the actual connection is WiFi or Ethernet.
Using these network quality signals, developers can tailor content to network constraints. For example, on very slow connections, developers can serve a simplified version of the page to improve page load times. These signals will also soon be available as HTTP request headers and enabled via Client Hints.
OpenType Variable Fonts
OpenType Font Variations bring new typographic capabilities to the web. Previously, one font file contained just a single instance of a font family, including only one weight (Regular, Bold, Black…) or one stretch (Normal, Condensed, Expanded…).
With variable fonts, responsive design on the web now extends to typography. OpenType Variations provide a continuous spectrum of stylistic variations while saving space and bandwidth, since they all load from a single compact font file. Stretch, style, and weight can be adjusted using the respective updated CSS properties which now allow numeric values. Fine tuning of variation axis parameters, such as weight or width, is possible using the font-variation-settings CSS property.
Media Capture from DOM Elements
The W3C Media Capture from DOM Elements API now allows sites to live-capture content in the form of a MediaStream directly from HTMLMediaElements (i.e. <video> and <audio>). By invoking the captureStream() method on HTMLMediaElements, streamed content can be recorded and sent remotely using WebRTC, processed with WebAudio, or manipulated in various other ways.
Figure: A 3D rendering being live-captured and streamed to a peer connection using WebRTC.
Other features in this release
- Lookbehind assertions are now available in addition to lookaheads, so developers can use regular expressions to ensure that a pattern is or isn’t preceded by another, e.g. matching a dollar amount without capturing the dollar sign.
- A new WebVR Origin Trial is now available, enabling developers to experiment with building rich Virtual Reality experiences on the web.
- Following previous announcements, the “Not secure” warning will now be displayed when users enter data on an HTTP page, and on all HTTP pages visited in Incognito mode.
- The `tabindex` attribute now enables the on-screen keyboard on Chrome for Android to more easily navigate between the next and previous fields within a form, thanks to a contribution from Samsung.
- Developers can now use the s flag to enable dotAll mode in ECMAScript regular expressions, making “.” match any character, including line terminators.
- Uploading images on Chrome for Android has an improved user experience and multi-select support that triggers on any site that invokes <input type="file"> with an accept attribute specifying that only images are accepted.
- Apps using the MediaSource API can now more effectively customize their HTMLMediaElement.seekable range logic using the new Media Source Extensions APIs, setLiveSeekableRange and clearLiveSeekableRange.
- The new visibility:collapse CSS declaration now hides table rows while preserving their contribution to column widths, rather than treating it like visibility:hidden, which merely skips painting the rows.
- Chrome for Android now supports Widevine L1, allowing sites to play encrypted media in a secure way.
- Loosened restrictions on escape sequences in template literals unlock new use cases for template tags, such as LaTeX processing.
- In Android O, sites with notification permissions now appear as a Notification Channel in Android Settings under Chrome, affording users a simpler way to manage permissions.
Deprecations and interoperability improvements
- Following an update to native button appearance on macOS, the appearance of <input> buttons and the <button> element have been similarly changed, affecting the default values for the background-color, border, border-radius, and padding CSS properties.
- The ability to request permission to show notifications has been removed over HTTP connections and within cross-origin iframes, in line with our policy on restricting powerful features to only HTTPS.
- To increase accuracy and ensure that users receive content in the language they expect, base language is now added immediately after language+region when generating accept-language headers from language settings.
- To improve UX and browser consistency, transitional mouse events will now be dispatched, and hover states will now be updated more quickly after the intended layout has been modified.
- OfflineAudioContext now accepts a dictionary argument, in addition to the existing constructor that takes three separate arguments.
- SharedWorker.workerStart has been removed, following its deprecation and removal from other major browsers.
Posted by Ben Greenstein and Tarun Bansal, The Network’s Watch