提交 38b3b2e1 编写于 作者: M mahaifeng

修改share布局与音频bug

上级 d81aa30f
......@@ -1097,7 +1097,7 @@
}
},
// #endif
// #ifdef WEB || MP || APP
// #ifdef WEB || MP || APP-ANDROID
{
"path": "pages/API/create-inner-audio-context/create-inner-audio-context",
"group": "1,7,9",
......@@ -1106,7 +1106,7 @@
}
},
// #endif
// #ifdef WEB || MP || APP
// #ifdef WEB || MP || APP-ANDROID
{
"path": "pages/API/create-inner-audio-context/inner-audio-format",
"style": {
......@@ -1114,7 +1114,7 @@
}
},
// #endif
// #ifdef WEB || MP || APP
// #ifdef WEB || MP || APP-ANDROID
{
"path": "pages/API/create-inner-audio-context/inner-audio-path",
"style": {
......
......@@ -130,7 +130,7 @@
this.onEnded()
},
onUnload() {
if (this._audioContext != null && this.isPlaying) {
if (this._audioContext != null) {
if (this.isPlaying) {
this.stop();
}
......@@ -151,8 +151,9 @@
this._isChanging = true;
},
onchange(e : UniSliderChangeEvent) {
console.log(e, 'e');
let pos = e.detail.value;
console.log('pos', pos);
this._audioContext!.seek(pos);
this.onSeeking()
this.onSeeked()
......@@ -164,7 +165,7 @@
this.onSeeked()
this._isChanging = false;
},
startTimeInput(e : InputEvent) {
startTimeInput(e : UniInputEvent) {
let startTimeValue = parseInt(e.detail.value)
this._audioContext!.startTime = startTimeValue;
this.onchangeValue(startTimeValue)
......
<template>
<!-- #ifdef APP -->
<scroll-view direction="vertical" style="flex:1; margin-bottom: 50px;">
<scroll-view direction="vertical" style="flex:1;">
<!-- #endif -->
<view id="viewshot">
<button class="button" @click="shareText()">分享文本</button>
......@@ -14,16 +14,17 @@
<button class="button" @click="sharePrivateAudios()">分享Audio文件(多个)</button>
<button class="button" @click="sharePrivateFile()">分享文件(单个)</button>
<button class="button" @click="sharePrivateFiles()">分享文件(多个)</button>
<button class="button" @click="sharePubImg()">选择图片并分享</button>
<button class="button" @click="sharePubMedias()">选择video并分享</button>
<button class="button" @click="shareSnapShot()">指定view截图并分享</button>
<button class="button" type="warn" @click="sharePrivateErrorImg()">分享单个本地图片(错误路径)</button>
<button class="button" type="warn" @click="sharePrivateErrorImgs()">分享多个本地图片(含有错误路径)</button>
<button class="button" type="warn" @click="sharePrivateErrorVideos()">分享Video文件(错误路径)</button>
<button class="button" type="warn" @click="sharePrivateErrorAudios()">分享Audio文件(错误路径)</button>
<button class="button" type="warn" @click="sharePrivateErrorFiles()">分享文件(错误路径)</button>
<button class="button" type="primary" @click="sharePrivateErrorImg()">分享单个本地图片(错误路径)</button>
<button class="button" type="primary" @click="sharePrivateErrorImgs()">分享多个本地图片(含有错误路径)</button>
<button class="button" type="primary" @click="sharePrivateErrorVideos()">分享Video文件(错误路径)</button>
<button class="button" type="primary" @click="sharePrivateErrorAudios()">分享Audio文件(错误路径)</button>
<button class="button" type="primary" @click="sharePrivateErrorFiles()">分享文件(错误路径)</button>
<button class="button" type="warn" @click="sharePubImg()">选择图片并分享</button>
<button class="button" type="warn" @click="sharePubMedias()">选择video并分享</button>
<button class="button" type="warn" @click="shareSnapShot()">指定view截图并分享</button>
</view>
</scroll-view>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册