NetworkInformation
The Network Information API provides information about the system's connection in terms of general connection type (e.g., 'wifi, 'cellular', etc.). This can be used to select high definition content or low definition content based on the user's connection.
The interface consists of a single NetworkInformation object, an instance of which is returned by the Navigator.connection property or the WorkerNavigator.connection property.