veplayer-mp-wechat
Advanced tools
Comparing version
@@ -24,2 +24,3 @@ "use strict"; | ||
PlayerModes["PORTRAIT"] = "portrait"; | ||
PlayerModes["FULLSCREEN"] = "fullscreen"; | ||
})(PlayerModes = exports.PlayerModes || (exports.PlayerModes = {})); | ||
@@ -26,0 +27,0 @@ /** |
@@ -233,2 +233,3 @@ "use strict"; | ||
this.initControls(); | ||
console.log((0, index_2.getSystemInfoSync)()); | ||
}, | ||
@@ -235,0 +236,0 @@ /** |
@@ -11,5 +11,24 @@ "use strict"; | ||
value: true | ||
}, | ||
// 不同的模式需要确定是否需要添加底部边距 | ||
mode: { | ||
type: String, | ||
value: "portrait" /* PlayerModes.PORTRAIT */, | ||
observer(newVal, oldVal, _changedPath) { | ||
if (newVal === "portrait" /* PlayerModes.PORTRAIT */ || newVal === "fullscreen" /* PlayerModes.FULLSCREEN */) { | ||
this.setData({ | ||
modeClass: 'xgplayer-controls-portrait' | ||
}); | ||
} | ||
else { | ||
this.setData({ | ||
modeClass: '' | ||
}); | ||
} | ||
} | ||
} | ||
}, | ||
data: {}, | ||
data: { | ||
modeClass: 'xgplayer-controls-portrait' | ||
}, | ||
lifetimes: { | ||
@@ -16,0 +35,0 @@ // 生命周期函数,可以为函数,或一个在methods段中定义的方法名 |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTouch = exports.classNames = exports.format = exports.padStart = void 0; | ||
exports.getSystemInfoSync = exports.getTouch = exports.classNames = exports.format = exports.padStart = void 0; | ||
/** | ||
@@ -90,1 +90,19 @@ * Util | ||
exports.getTouch = getTouch; | ||
function getSystemInfoSync() { | ||
try { | ||
const res = wx.getSystemInfoSync(); | ||
console.log('>>>getSystemInfoSync model', res.model); | ||
console.log('>>>getSystemInfoSync', res.pixelRatio); | ||
console.log('>>>getSystemInfoSync windowWidth', res.windowWidth); | ||
console.log('>>>getSystemInfoSync windowHeight', res.windowHeight); | ||
console.log('>>>getSystemInfoSync bottom', res.bottom); | ||
// console.log(res.language) | ||
// console.log(res.version) | ||
// console.log(res.platform) | ||
return res; | ||
} | ||
catch (e) { | ||
return {}; | ||
} | ||
} | ||
exports.getSystemInfoSync = getSystemInfoSync; |
{ | ||
"name": "veplayer-mp-wechat", | ||
"version": "1.2.2-alpha.11", | ||
"version": "1.2.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "miniprogram": "dist", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
148445
1.07%2508
1.58%1
-50%