设备差异

2018-12-27  本文已影响0人  写代码的女孩最可爱

1.iPhone

window.RTCPeerConnection

if (_pta.prototype.toString() != '[object RTCPeerConnectionPrototype]') return;

Window.RTCSessionDescription

'[object RTCSessionDescriptionPrototype]'

Document.createElement

if (document.createElement.toString().length != 248) return;

window.WebGLrenderingContext

'[object WebGLRenderingContextPrototype]'

constructor

'ZnVuY3Rpb24gKCkgeyBbbmF0aXZlIGNvZGVdIH0='

2.Android

window.RTCPeerConnection

var zarry = ['[object RTCPeerConnection]', '[object webkitRTCPeerConnection]'];
if (zarry.indexOf(_pta.prototype.toString()) === -1) {
    return
}

Window.RTCSessionDescription

'[object RTCSessionDescription]'

Document.createElement

if ('prototype' in document.createElement) return;

window.WebGLrenderingContext

'[object WebGLRenderingContext]'

constructor

'ZnVuY3Rpb24gKCkgewogICAgW25hdGl2ZSBjb2RlXQp9'

注意

Document.createElement是在googleWebDesigner中改写的(且仅在ios的情况下改写了)

上一篇 下一篇

猜你喜欢

热点阅读