Commit c7b2f6be authored by wang's avatar wang

9999

parent ffa62e96
...@@ -33,3 +33,33 @@ r = [ ...@@ -33,3 +33,33 @@ r = [
117, 126, 1, 73, 255, 50, 12, 194, 158, 142, 195, 117, 126, 1, 73, 255, 50, 12, 194, 158, 142, 195,
80, 110, 218, 250, 167, 27, 39, 220, 96 80, 110, 218, 250, 167, 27, 39, 220, 96
] ]
self.devicedata = {"parameters": {"antialias": True, "maxAnisotropy": 16, "dimensions": ["11", "11024", "3276732767"],
"params": {"alphaBits": 8, "blueBits": 8, "greenBits": 8, "redBits": 8,
"depthBits": 24, "maxCombinedTextureImageUnits": 32,
"maxCubeMapTextureSize": 16384, "maxFragmentUniformVectors": 1024,
"maxRenderbufferSize": 16384, "maxTextureImageUnits": 16,
"maxTextureSize": 16384, "maxVaryingVectors": 30, "maxVertexAttribs": 16,
"maxVertexTextureImageUnits": 16, "maxVertexUniformVectors": 4096,
"renderer": "WebKit WebGL",
"shadingLanguageVersion": "WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)",
"stencilBits": 0, "vendor": "WebKit",
"version": "WebGL 1.0 (OpenGL ES 2.0 Chromium)"},
"debugInfo": {"vendor": "Google Inc.", "renderer": random.choice(GRAPHICSDRIVER)}},
"shaderPrecisions": ["23127127", "23127127", "23127127", "23127127", "23127127", "23127127", "03130",
"03130", "03130", "03130", "03130", "03130"],
"supportedExtensions": ["ANGLE_instanced_arrays", "EXT_blend_minmax", "EXT_color_buffer_half_float",
"EXT_disjoint_timer_query", "EXT_float_blend", "EXT_frag_depth",
"EXT_shader_texture_lod", "EXT_texture_filter_anisotropic",
"WEBKIT_EXT_texture_filter_anisotropic", "EXT_sRGB",
"KHR_parallel_shader_compile", "OES_element_index_uint",
"OES_standard_derivatives", "OES_texture_float", "OES_texture_float_linear",
"OES_texture_half_float", "OES_texture_half_float_linear",
"OES_vertex_array_object", "WEBGL_color_buffer_float",
"WEBGL_compressed_texture_s3tc", "WEBKIT_WEBGL_compressed_texture_s3tc",
"WEBGL_compressed_texture_s3tc_srgb", "WEBGL_debug_renderer_info",
"WEBGL_debug_shaders", "WEBGL_depth_texture", "WEBKIT_WEBGL_depth_texture",
"WEBGL_draw_buffers", "WEBGL_lose_context", "WEBKIT_WEBGL_lose_context"],
"contextProperties": -368668372}
This diff is collapsed.
let fonts = [{"font":"50px sans-serif","text":"0-_{w."},{"font":"50px serif","text":"0-_{w."},{"font":"50px 'Andale Mono', sans-serif","text":"0-_{w."},{"font":"50px 'Arial Narrow', sans-serif","text":"0-_{w."},{"font":"50px 'Arial Unicode MS', sans-serif","text":"0-_{w."},{"font":"50px 'Batang', sans-serif","text":"0-_{w."},{"font":"50px 'Batang', serif","text":"0-_{w."},{"font":"50px 'Bell MT', sans-serif","text":"0-_{w."},{"font":"50px 'Bell MT', serif","text":"0-_{w."},{"font":"50px 'Brush Script', sans-serif","text":"0-_{w."},{"font":"50px 'Brush Script', serif","text":"0-_{w."},{"font":"50px 'Brush Script MT', sans-serif","text":"0-_{w."},{"font":"50px 'Calibri', sans-serif","text":"0-_{w."},{"font":"50px 'Calibri', serif","text":"0-_{w."},{"font":"50px 'Charter', sans-serif","text":"0-_{w."},{"font":"50px 'Courier', sans-serif","text":"0-_{w."},{"font":"50px 'Courier New', sans-serif","text":"0-_{w."},{"font":"50px 'Curlz MT', sans-serif","text":"0-_{w."},{"font":"50px 'Curlz MT', serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans', serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans Mono', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Sans Mono', serif","text":"0-_{w."},{"font":"50px 'DejaVu Serif Condensed', sans-serif","text":"0-_{w."},{"font":"50px 'DejaVu Serif Condensed', serif","text":"0-_{w."},{"font":"50px 'Droid Sans', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Sans', serif","text":"0-_{w."},{"font":"50px 'Droid Sans Fallback', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Sans Fallback', serif","text":"0-_{w."},{"font":"50px 'Droid Serif', sans-serif","text":"0-_{w."},{"font":"50px 'Droid Serif', serif","text":"0-_{w."},{"font":"50px 'Forte', sans-serif","text":"0-_{w."},{"font":"50px 'Forte', serif","text":"0-_{w."},{"font":"50px 'Futura', sans-serif","text":"0-_{w."},{"font":"50px 'Geneva', sans-serif","text":"0-_{w."},{"font":"50px 'Hei', sans-serif","text":"0-_{w."},{"font":"50px 'Leelawadee', sans-serif","text":"0-_{w."},{"font":"50px 'Leelawadee', serif","text":"0-_{w."},{"font":"50px 'Levenim MT', sans-serif","text":"0-_{w."},{"font":"50px 'Levenim MT', serif","text":"0-_{w."},{"font":"50px 'Liberation Sans', sans-serif","text":"0-_{w."},{"font":"50px 'Liberation Sans', serif","text":"0-_{w."},{"font":"50px 'Liberation Sans Narrow', sans-serif","text":"0-_{w."},{"font":"50px 'Liberation Sans Narrow', serif","text":"0-_{w."},{"font":"50px 'Marlett', sans-serif","text":"0-_{w."},{"font":"50px 'Marlett', serif","text":"0-_{w."},{"font":"50px 'Meiryo UI', sans-serif","text":"0-_{w."},{"font":"50px 'Meiryo UI', serif","text":"0-_{w."},{"font":"50px 'Microsoft Uighur', sans-serif","text":"0-_{w."},{"font":"50px 'Microsoft Uighur', serif","text":"0-_{w."},{"font":"50px 'Microsoft YaHei UI', sans-serif","text":"0-_{w."},{"font":"50px 'Microsoft YaHei UI', serif","text":"0-_{w."},{"font":"50px 'MS Mincho', sans-serif","text":"0-_{w."},{"font":"50px 'MS Mincho', serif","text":"0-_{w."},{"font":"50px 'MS UI Gothic', sans-serif","text":"0-_{w."},{"font":"50px 'MS UI Gothic', serif","text":"0-_{w."},{"font":"50px 'NanumGothic', sans-serif","text":"0-_{w."},{"font":"50px 'Nirmala UI', sans-serif","text":"0-_{w."},{"font":"50px 'Nirmala UI', serif","text":"0-_{w."},{"font":"50px 'Palatino', sans-serif","text":"0-_{w."},{"font":"50px 'Papyrus', sans-serif","text":"0-_{w."},{"font":"50px 'PMingLiU', sans-serif","text":"0-_{w."},{"font":"50px 'PMingLiU', serif","text":"0-_{w."},{"font":"50px 'PT Serif', sans-serif","text":"0-_{w."},{"font":"50px 'SimHei', sans-serif","text":"0-_{w."},{"font":"50px 'SimHei', serif","text":"0-_{w."},{"font":"50px 'STIXVariants', sans-serif","text":"0-_{w."},{"font":"50px 'STSong', sans-serif","text":"0-_{w."},{"font":"50px 'Traditional Arabic', sans-serif","text":"0-_{w."},{"font":"50px 'Traditional Arabic', serif","text":"0-_{w."},{"font":"50px 'Urdu Typesetting', sans-serif","text":"0-_{w."},{"font":"50px 'Urdu Typesetting', serif","text":"0-_{w."},{"font":"50px 'Verdana', sans-serif","text":"0-_{w."},{"font":"50px 'Wingdings', sans-serif","text":"0-_{w."},{"font":"50px 'Wingdings 3', sans-serif","text":"0-_{w."},{"font":"50px 'Helkevtrica', sans-serif","text":"0-_{w."},{"font":"50px 'Helkevtrica', serif","text":"0-_{w."}]
let fontsRes = {}
console.log(fonts.length)
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d')
ctx.textBaseline = 'top';
for (let i = 0; i < fonts.length; i++) {
ctx.font = fonts[i].font;
let met = ctx.measureText(fonts[i].text)
if (fontsRes[fonts[i]]) {
fontsRes[fonts[i].font][fonts[i].text] = {
width: met.width,
actualBoundingBoxAscent: met.actualBoundingBoxAscent,
actualBoundingBoxLeft: met.actualBoundingBoxLeft,
actualBoundingBoxRight: met.actualBoundingBoxRight,
fontBoundingBoxAscent: met.fontBoundingBoxAscent,
}
}
}
console.log(JSON.stringify(fontsRes))
let imgsRes = {};
let sss = [{
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["😎", -1, 96],
"imageData": [18, 90, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["6️⃣", -1, 96],
"imageData": [38, 77, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["🍼", -1, 96],
"imageData": [48, 28, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96],
"imageData": [94, 23, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["📊", -1, 96],
"imageData": [26, 46, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["🏴󠁧󠁢󠁥󠁮󠁧󠁿", -1, 96],
"imageData": [47, 23, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["㊗️", -1, 96],
"imageData": [37, 17, 1, 1]
}, {
"font": "94px sans-serif",
"fillStyle": "#000000",
"fillText": ["⛎", -1, 96],
"imageData": [62, 28, 1, 1]
}
]
let imgRes = {};
for (let i = 0; i < sss.length; i++) {
var a = document.createElement('canvas')
a.width = 96
a.height = 96
let ctx = a.getContext('2d');
let s = sss[i];
ctx.font = s.font;
ctx.fillStyle = s.fillStyle;
ctx.fillText(...s.fillText)
let data = ctx.getImageData(...s.imageData);
if (!imgRes[s.font]){
imgRes[s.font] = {}
}
imgRes[s.font][s.imageData+''] = data.data+''
}
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/collect.js')
def js():
return render_template('collect.js')
@app.route('/collect', methods=["POST"])
def collect():
print(request.data.decode())
return 'ok'
if __name__ == '__main__':
app.run(host='0.0.0.0',debug=True, port=11222)
\ No newline at end of file
...@@ -40,3 +40,15 @@ VM192:39 (f) [FeaturePolicy allowedFeatures func] [] ===> (52) ['geolocation' ...@@ -40,3 +40,15 @@ VM192:39 (f) [FeaturePolicy allowedFeatures func] [] ===> (52) ['geolocation'
VM192:39 (f) [FeaturePolicy getAllowlistForFeature func] ['display-capture'] ===> ['http://localhost:63342'] VM192:39 (f) [FeaturePolicy getAllowlistForFeature func] ['display-capture'] ===> ['http://localhost:63342']
``` ```
```angular2html
innerHeight ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 innerWidth ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 outerHeight ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 outerWidth ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 screenX ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 screenY ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 devicePixelRatio ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
src_out.js:2632 isSecureContext ininin Window {window: Window, self: Window, document: document, name: '', location: Location, …} true
```
\ No newline at end of file
if (typeof OffscreenCanvas !== 'function') { window.onssage = function (a){
postMessage(false); console.log(a)
console.log(JSON.stringify(a))
}
if (typeof window.OffscreenCanvas !== 'function') {
window.onssage(false);
}
getWebGL = function (c) {
let graphicsLib = null;
try {
graphicsLib = c.getContext('webgl') || c.getContext('experimental-webgl');
} catch (ignored) {
}
return graphicsLib;
} }
var canvas = new OffscreenCanvas(0, 0); let canvas = new window.OffscreenCanvas(0, 0);
var gl = getWebGL(canvas); let gl = getWebGL(canvas);
if (!gl) { if (!gl) {
postMessage(false); window.onssage(false);
} }
onmessage = function (e) { onmessage = function (e) {
var segment = e.data.segment; let segment = e.data.segment;
try { try {
if (segment === 'a' || segment === 'b') { if (segment === 'a' || segment === 'b') {
var _e$data = e.data, parameters = _e$data.parameters, methods = _e$data.methods; let _e$data = e.data, parameters = _e$data.parameters, methods = _e$data.methods;
var result = []; let result = [];
for (var i = 0; i < parameters.length; i++) { for (let i = 0; i < parameters.length; i++) {
result.push(gl[methods[0]](parameters[i])); result.push(gl[methods[0]](parameters[i]));
} }
postMessage({segment: segment, result: result}); return {segment: segment, result: result};
} else if (segment === 'c' || segment === 'd') { } else if (segment === 'c' || segment === 'd') {
var _e$data2 = e.data, _parameters = _e$data2.parameters, extensions = _e$data2.extensions, let _e$data2 = e.data, _parameters = _e$data2.parameters, extensions = _e$data2.extensions,
_methods = _e$data2.methods; _methods = _e$data2.methods;
var _result = []; let _result = [];
var ext = false; let ext = false;
for (var _i = 0; _i < extensions.length; _i++) { for (let _i = 0; _i < extensions.length; _i++) {
ext = ext || gl[_methods[0]](extensions[_i]); ext = ext || gl[_methods[0]](extensions[_i]);
} }
if (ext) { if (ext) {
for (var _i2 = 0; _i2 < _parameters.length; _i2++) { for (let _i2 = 0; _i2 < _parameters.length; _i2++) {
_result.push(gl[_methods[1]](ext[_parameters[_i2]])); _result.push(gl[_methods[1]](ext[_parameters[_i2]]));
} }
} else { } else {
_result = -1; _result = -1;
} }
postMessage({segment: segment, result: _result}); return {segment: segment, result: _result};
} else if (segment === 'e') { } else if (segment === 'e') {
var _e$data3 = e.data, _methods2 = _e$data3.methods, properties = _e$data3.properties; let _e$data3 = e.data, _methods2 = _e$data3.methods, properties = _e$data3.properties;
var _result2 = function (x) { let _result2 = function (x) {
return x ? x[properties[0]] : false; return x ? x[properties[0]] : false;
}(gl[_methods2[0]]()); }(gl[_methods2[0]]());
postMessage({segment: segment, result: _result2}); return {segment: segment, result: _result2};
} else if (segment === 'f') { } else if (segment === 'f') {
var _e$data4 = e.data, _methods3 = _e$data4.methods, shaderParams = _e$data4.shaderParams, let _e$data4 = e.data, _methods3 = _e$data4.methods, shaderParams = _e$data4.shaderParams,
shaderFloatPrecision = _e$data4.shaderFloatPrecision, shaderIntPrecision = _e$data4.shaderIntPrecision, shaderFloatPrecision = _e$data4.shaderFloatPrecision, shaderIntPrecision = _e$data4.shaderIntPrecision,
shaderProperties = _e$data4.shaderProperties; shaderProperties = _e$data4.shaderProperties;
var _result3 = []; let _result3 = [];
if (typeof gl[_methods3[0]] === 'function') { if (typeof gl[_methods3[0]] === 'function') {
for (var _i3 = 0; _i3 < shaderParams.length; _i3++) { for (let _i3 = 0; _i3 < shaderParams.length; _i3++) {
for (var j = 0; j < shaderFloatPrecision.length; j++) { for (let j = 0; j < shaderFloatPrecision.length; j++) {
var x = gl[_methods3[0]](shaderParams[_i3], shaderFloatPrecision[j]); let x = gl[_methods3[0]](shaderParams[_i3], shaderFloatPrecision[j]);
x = x == null ? '' : [x[shaderProperties[0]], x[shaderProperties[1]], x[shaderProperties[2]]].join(''); x = x == null ? '' : [x[shaderProperties[0]], x[shaderProperties[1]], x[shaderProperties[2]]].join('');
_result3.push(x); _result3.push(x);
} }
} }
for (var _i4 = 0; _i4 < shaderParams.length; _i4++) { for (let _i4 = 0; _i4 < shaderParams.length; _i4++) {
for (var _j = 0; _j < shaderIntPrecision.length; _j++) { for (let _j = 0; _j < shaderIntPrecision.length; _j++) {
var _x = gl[_methods3[0]](shaderParams[_i4], shaderIntPrecision[_j]); let _x = gl[_methods3[0]](shaderParams[_i4], shaderIntPrecision[_j]);
_x = _x == null ? '' : [_x[shaderProperties[0]], _x[shaderProperties[1]], _x[shaderProperties[2]]].join(''); _x = _x == null ? '' : [_x[shaderProperties[0]], _x[shaderProperties[1]], _x[shaderProperties[2]]].join('');
_result3.push(_x); _result3.push(_x);
} }
...@@ -61,28 +73,139 @@ onmessage = function (e) { ...@@ -61,28 +73,139 @@ onmessage = function (e) {
} else { } else {
_result3 = void 0; _result3 = void 0;
} }
postMessage({segment: segment, result: _result3}); return {segment: segment, result: _result3};
} else if (segment === 'g') { } else if (segment === 'g') {
var _methods4 = e.data.methods; let _methods4 = e.data.methods;
var _result4 = gl[_methods4[0]]() || []; let _result4 = gl[_methods4[0]]() || [];
postMessage({segment: segment, result: _result4}); return {segment: segment, result: _result4};
} else if (segment === 'h') { } else if (segment === 'h') {
var _result5 = []; let _result5 = [];
for (var prop in gl) { for (let prop in gl) {
_result5.push(prop); _result5.push(prop);
} }
postMessage({segment: segment, result: _result5}); return {segment: segment, result: _result5};
} }
} catch (error) { } catch (error) {
postMessage(false); return false;
} }
}; };
let gl1 = onmessage({
function getWebGL(c) { data:{
var graphicsLib = null; "segment": "a",
try { "parameters": [
graphicsLib = c.getContext('webgl') || c.getContext('experimental-webgl'); 33902,
} catch (ignored) { 33901,
} 3386
return graphicsLib; ],
"methods": [
"getParameter"
]
} }
})
let gl2 = onmessage({data:{
"segment": "b",
"parameters": [
3413,
3412,
3411,
3410,
3414,
35661,
34076,
36349,
34024,
34930,
3379,
36348,
34921,
35660,
36347,
7937,
35724,
3415,
7936,
7938
],
"methods": [
"getParameter"
]
}})
let gl3 = onmessage({data:{
"segment": "c",
"parameters": [
"UNMASKED_VENDOR_WEBGL",
"UNMASKED_RENDERER_WEBGL"
],
"extensions": [
"WEBGL_debug_renderer_info"
],
"methods": [
"getExtension",
"getParameter"
]
}})
let gl4 = onmessage({data:{
"segment": "d",
"parameters": [
"MAX_TEXTURE_MAX_ANISOTROPY_EXT"
],
"extensions": [
"EXT_texture_filter_anisotropic",
"WEBKIT_EXT_texture_filter_anisotropic",
"MOZ_EXT_texture_filter_anisotropic"
],
"methods": [
"getExtension",
"getParameter"
]
}})
let gl5 = onmessage({data:{
"segment": "e",
"methods": [
"getContextAttributes"
],
"properties": [
"antialias"
]
}})
let gl6 = onmessage({data:{
"segment": "f",
"methods": [
"getShaderPrecisionFormat"
],
"shaderParams": [
35633,
35632
],
"shaderFloatPrecision": [
36338,
36337,
36336
],
"shaderIntPrecision": [
36341,
36340,
36339
],
"shaderProperties": [
"precision",
"rangeMin",
"rangeMax"
]
}})
let gl7 = onmessage({data:{
"segment": "g",
"methods": [
"getSupportedExtensions"
]
}})
let gl8 = onmessage({data:{
"segment": "h"
}})
let glRes = [gl1,gl2,gl3,gl4,gl5,gl6,gl7,gl8]
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
<script src="collect.js"></script>
\ No newline at end of file
This diff is collapsed.
...@@ -90,7 +90,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -90,7 +90,7 @@ exports.install = (globalObject, globalNames) => {
const args = []; const args = [];
{ {
let curArg = arguments[0]; let curArg = arguments[0];
console.log('new Blob', curArg) if (curArg[0])curArg[0] = curArg[0].replaceAll('OffscreenCanvas', 'window.OffscreenCanvas')
if (curArg !== undefined) { if (curArg !== undefined) {
if (!utils.isObject(curArg)) { if (!utils.isObject(curArg)) {
throw new TypeError("Failed to construct 'Blob': parameter 1" + " is not an iterable object."); throw new TypeError("Failed to construct 'Blob': parameter 1" + " is not an iterable object.");
...@@ -119,7 +119,11 @@ exports.install = (globalObject, globalNames) => { ...@@ -119,7 +119,11 @@ exports.install = (globalObject, globalNames) => {
curArg = BlobPropertyBag.convert(curArg, { context: "Failed to construct 'Blob': parameter 2" }); curArg = BlobPropertyBag.convert(curArg, { context: "Failed to construct 'Blob': parameter 2" });
args.push(curArg); args.push(curArg);
} }
return exports.setup(Object.create(new.target.prototype), globalObject, args); console.log('blob', args)
let res = exports.setup(Object.create(new.target.prototype), globalObject, args);
res.jsCode = args[0]
return res;
} }
slice() { slice() {
......
...@@ -233,9 +233,33 @@ exports.install = (globalObject, globalNames) => { ...@@ -233,9 +233,33 @@ exports.install = (globalObject, globalNames) => {
} }
featurePolicy() { featurePolicy() {
return function FeaturePolicy(){ class FeaturePolicy{
constructor(props) {
}() }
}
Object.defineProperties(FeaturePolicy.prototype, {
features: {
value: function (){
return window.ENV.featurePolicy.features
},
enumerable: true
},
allowedFeatures: {
value: function (){
return window.ENV.featurePolicy.allowedFeatures
},
enumerable: true
},
getAllowlistForFeature: {
value: function (){
return 'https://www.jetblue.com/'
},
enumerable: true
}
})
return new FeaturePolicy()
} }
createElement(localName) { createElement(localName) {
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
......
...@@ -138,7 +138,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -138,7 +138,7 @@ exports.install = (globalObject, globalNames) => {
} }
let res = utils.tryWrapperForImpl(esValue[implSymbol].canPlayType(...args)); let res = utils.tryWrapperForImpl(esValue[implSymbol].canPlayType(...args));
window.videos.push(type) window.videos.push(type)
if (videos[type]){ if (window.ENV.canPlay[type]){
res = videos[type] res = videos[type]
} }
console.log('canPlayType', type, res) console.log('canPlayType', type, res)
......
...@@ -118,7 +118,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -118,7 +118,7 @@ exports.install = (globalObject, globalNames) => {
} }
get appCodeName() { get appCodeName() {
return window.fingerprint.navigator.appCodeName return window.ENV.navigatorParams.appCodeName
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -130,7 +130,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -130,7 +130,7 @@ exports.install = (globalObject, globalNames) => {
} }
get appName() { get appName() {
return window.fingerprint.navigator.appName return window.ENV.navigatorParams.appName
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -142,7 +142,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -142,7 +142,7 @@ exports.install = (globalObject, globalNames) => {
} }
get appVersion() { get appVersion() {
return window.fingerprint.navigator.appVersion return window.ENV.navigatorParams.appVersion
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -154,7 +154,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -154,7 +154,7 @@ exports.install = (globalObject, globalNames) => {
} }
get platform() { get platform() {
return window.fingerprint.navigator.platform return window.ENV.navigatorParams.platform
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) { if (!exports.is(esValue)) {
...@@ -165,7 +165,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -165,7 +165,7 @@ exports.install = (globalObject, globalNames) => {
} }
get product() { get product() {
return window.fingerprint.navigator.product return window.ENV.navigatorParams.product
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -177,7 +177,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -177,7 +177,7 @@ exports.install = (globalObject, globalNames) => {
} }
get productSub() { get productSub() {
return window.fingerprint.navigator.productSub return window.ENV.navigatorParams.productSub
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -328,7 +328,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -328,7 +328,7 @@ exports.install = (globalObject, globalNames) => {
} }
get userAgent() { get userAgent() {
return window.fingerprint.navigator.userAgent return window.ENV.navigatorParams.userAgent
// return window.browser.ua; // return window.browser.ua;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -341,7 +341,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -341,7 +341,7 @@ exports.install = (globalObject, globalNames) => {
} }
get vendor() { get vendor() {
return window.fingerprint.navigator.vendor return window.ENV.navigatorParams.vendor
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -353,7 +353,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -353,7 +353,7 @@ exports.install = (globalObject, globalNames) => {
} }
get vendorSub() { get vendorSub() {
return window.fingerprint.navigator.vendorSub return window.ENV.navigatorParams.vendorSub
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -365,7 +365,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -365,7 +365,7 @@ exports.install = (globalObject, globalNames) => {
} }
get language() { get language() {
return window.fingerprint.navigator.language return window.ENV.navigatorParams.language
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -377,7 +377,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -377,7 +377,7 @@ exports.install = (globalObject, globalNames) => {
} }
get languages() { get languages() {
return window.fingerprint.navigator.languages return window.ENV.navigatorParams.languages
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -389,7 +389,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -389,7 +389,7 @@ exports.install = (globalObject, globalNames) => {
} }
get onLine() { get onLine() {
// return window.fingerprint.navigator.onLine // return window.ENV.navigatorParams.onLine
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -413,7 +413,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -413,7 +413,7 @@ exports.install = (globalObject, globalNames) => {
get hardwareConcurrency() { get hardwareConcurrency() {
return window.fingerprint.navigator.hardwareConcurrency return window.ENV.navigatorParams.hardwareConcurrency
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
......
...@@ -92,9 +92,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -92,9 +92,9 @@ exports.install = (globalObject, globalNames) => {
} }
get availWidth() { get availWidth() {
console.log('availWidth', window.fingerprint.screen.availWidth) console.log('availWidth', window.ENV.screenParams.availWidth)
// return 1920; // return 1920;
return window.fingerprint.screen.availWidth; return window.ENV.screenParams.availWidth;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -106,9 +106,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -106,9 +106,9 @@ exports.install = (globalObject, globalNames) => {
} }
get availHeight() { get availHeight() {
console.log('availHeight', window.fingerprint.screen.availHeight) console.log('availHeight', window.ENV.screenParams.availHeight)
// return 1080; // return 1080;
return window.fingerprint.screen.availHeight; return window.ENV.screenParams.availHeight;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -120,9 +120,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -120,9 +120,9 @@ exports.install = (globalObject, globalNames) => {
} }
get width() { get width() {
console.log('width', window.fingerprint.screen.width) console.log('width', window.ENV.screenParams.width)
return window.fingerprint.screen.width; return window.ENV.screenParams.width;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -134,9 +134,9 @@ exports.install = (globalObject, globalNames) => { ...@@ -134,9 +134,9 @@ exports.install = (globalObject, globalNames) => {
} }
get height() { get height() {
console.log('height', window.fingerprint.screen.height) console.log('height', window.ENV.screenParams.height)
return window.fingerprint.screen.height; return window.ENV.screenParams.height;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -148,7 +148,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -148,7 +148,7 @@ exports.install = (globalObject, globalNames) => {
} }
get colorDepth() { get colorDepth() {
return window.fingerprint.screen.colorDepth; return window.ENV.screenParams.colorDepth;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
...@@ -160,7 +160,7 @@ exports.install = (globalObject, globalNames) => { ...@@ -160,7 +160,7 @@ exports.install = (globalObject, globalNames) => {
} }
get pixelDepth() { get pixelDepth() {
return window.fingerprint.screen.pixelDepth; return window.ENV.screenParams.pixelDepth;
const esValue = this !== null && this !== undefined ? this : globalObject; const esValue = this !== null && this !== undefined ? this : globalObject;
if (!exports.is(esValue)) { if (!exports.is(esValue)) {
...@@ -171,55 +171,55 @@ exports.install = (globalObject, globalNames) => { ...@@ -171,55 +171,55 @@ exports.install = (globalObject, globalNames) => {
} }
get availTop() { get availTop() {
return window.fingerprint.screen.availTop return window.ENV.screenParams.availTop
} }
get availLeft() { get availLeft() {
return window.fingerprint.screen.availLeft return window.ENV.screenParams.availLeft
} }
get innerHeight() { get innerHeight() {
return window.fingerprint.screen.innerHeight return window.ENV.screenParams.innerHeight
} }
get outerHeight() { get outerHeight() {
return window.fingerprint.screen.outerHeight return window.ENV.screenParams.outerHeight
} }
get outerWidth() { get outerWidth() {
return window.fingerprint.screen.outerWidth return window.ENV.screenParams.outerWidth
} }
get innerWidth() { get innerWidth() {
return window.fingerprint.screen.innerWidth return window.ENV.screenParams.innerWidth
} }
get screenX() { get screenX() {
return window.fingerprint.screen.screenX return window.ENV.screenParams.screenX
} }
get pageXOffset() { get pageXOffset() {
return window.fingerprint.screen.pageXOffset return window.ENV.screenParams.pageXOffset
} }
get pageYOffset() { get pageYOffset() {
return window.fingerprint.screen.pageYOffset return window.ENV.screenParams.pageYOffset
} }
get devicePixelRatio() { get devicePixelRatio() {
return window.fingerprint.screen.devicePixelRatio return window.ENV.screenParams.devicePixelRatio
} }
get clientWidth() { get clientWidth() {
return window.fingerprint.screen.clientWidth return window.ENV.screenParams.clientWidth
} }
get clientHeight() { get clientHeight() {
return window.fingerprint.screen.clientHeight return window.ENV.screenParams.clientHeight
} }
get hasHDR() { get hasHDR() {
return window.fingerprint.screen.hasHDR return window.ENV.screenParams.hasHDR
} }
} }
......
...@@ -186,7 +186,14 @@ exports.implementation = class PluginArray { ...@@ -186,7 +186,14 @@ exports.implementation = class PluginArray {
item() { item() {
console.log('getPlugin idx', arguments[0]) console.log('getPlugin idx', arguments[0])
return proxy( plugins[arguments[0]], 'plugins.'+arguments[0])
let plugins = window.ENV.plugins
var plggs = [];
for (let i = 0; i < 5; i++) {
plggs.push(plugins[i])
}
return proxy( plggs[arguments[0]], 'plugins.'+arguments[0])
// switch (arguments[0]){ // switch (arguments[0]){
// case 2: // case 2:
// return { // return {
......
This diff is collapsed.
This diff is collapsed.
...@@ -656,7 +656,7 @@ Object.defineProperties(HTMLMediaElement.prototype, { ...@@ -656,7 +656,7 @@ Object.defineProperties(HTMLMediaElement.prototype, {
canPlayType: { canPlayType: {
value: v_saf(function canPlayType() { value: v_saf(function canPlayType() {
v_console_log(" [*] HTMLMediaElement -> canPlayType[func]", [].slice.call(arguments)); v_console_log(" [*] HTMLMediaElement -> canPlayType[func]", [].slice.call(arguments));
let values = {'audio/aac; codecs="flac"':'', let mediaResult = {'audio/aac; codecs="flac"':'',
'audio/flac':'probably', 'audio/flac':'probably',
'audio/mpeg; codecs="mp3"':"probably", 'audio/mpeg; codecs="mp3"':"probably",
'audio/mpeg; codecs="vp9"':"", 'audio/mpeg; codecs="vp9"':"",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment