WebRTC
RTCNetworkType
enumerated type defines a set of strings used to identify the type of network used by a connection between two peers.
This type is used as the value or the following properties:
bluetooth
A Bluetooth connection is used by the described connection.
cellular
The connection uses a cellular data service to connect. This includes all cellular data services including EDGE (2G), HSPA (3G), LTE (4G), and NR (5G).
ethernet
The described connection uses an Ethernet network.
wifi
The described connection uses WiFi.
wimax
vpn
The connection uses a Virtual Private Network (VPN). The VPN obscures the underlying network type, which is not discernible.
未知
注意:
Keep in mind that the specified value only reflects the initial connection between the local peer and the next hop along the network toward reaching the remote peer. For example, if the
networkType
is
wifi
but the user is connected using a cellular hotspot, the connection will be bottlenecked by the underlying cellular network (and any other networks between the two peers).
| 规范 | 状态 | 注释 |
|---|---|---|
|
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCNetworkType' in that specification. |
候选推荐 | 初始定义。 |
No compatibility data found. Please contribute data for "api.RTCNetworkType" (depth: 1) to the MDN 兼容性数据存储库 .
RTCNetworkType
MediaDevices.getUserMedia()
Navigator.mediaDevices
RTCCertificate
RTCDTMFSender
RTCDTMFToneChangeEvent
RTCDataChannel
RTCDataChannelEvent
RTCDtlsTransport
RTCErrorEvent
RTCIceCandidate
RTCIceTransport
RTCPeerConnection
RTCPeerConnectionIceErrorEvent
RTCPeerConnectionIceEvent
RTCRtpReceiver
RTCRtpSender
RTCRtpTransceiver
RTCSctpTransport
RTCSessionDescription
RTCStatsEvent
RTCStatsReport
RTCTrackEvent