提交 704b6827 编写于 作者: fxy060608's avatar fxy060608

Merge branch 'dev' of https://github.com/dcloudio/uni-app into dev

<template>
<uni-page :data-page="$route.meta.pagePath">
<page-head
v-if="navigationBar.type!=='none'"
<page-head
v-if="navigationBar.type!=='none'"
v-bind="navigationBar" />
<page-refresh
v-if="enablePullDownRefresh"
......@@ -195,7 +195,7 @@ export default {
let offset = upx2px(refreshOptions.offset)
if (titleNView.type !== 'transparent') {
if (titleNView.type !== 'none' && titleNView.type !== 'transparent') {
offset += NAVBAR_HEIGHT + safeAreaInsets.top
}
......
......@@ -50,7 +50,7 @@ export function chooseVideo ({
size: file.size,
duration: 0,
width: 0,
height: 0,
height: 0,
name: file.name
}
......@@ -58,11 +58,20 @@ export function chooseVideo ({
if (video.onloadedmetadata !== undefined) {
// 尝试获取视频的宽高信息
video.onloadedmetadata = function () {
callbackResult.duration = video.duration || 0
callbackResult.width = video.videoWidth || 0
callbackResult.height = video.videoHeight || 0
invoke(callbackId, callbackResult)
invoke(callbackId, Object.assign({}, callbackResult, {
duration: video.duration || 0,
width: video.videoWidth || 0,
height: video.videoHeight || 0
}))
}
// 部分浏览器(如微信内置浏览器)未播放无法触发loadedmetadata事件
setTimeout(() => {
invoke(callbackId, Object.assign({}, callbackResult, {
duration: 0,
width: 0,
height: 0
}))
}, 300)
video.src = filePath
} else {
invoke(callbackId, callbackResult)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册