|
@@ -38,7 +38,7 @@ function initOnlibeRecord() {
|
|
|
innerAudioContext.value = uni.createInnerAudioContext();
|
|
innerAudioContext.value = uni.createInnerAudioContext();
|
|
|
innerAudioContext.value.autoplay = true;
|
|
innerAudioContext.value.autoplay = true;
|
|
|
recorderManager.value?.onStop(function (res) {
|
|
recorderManager.value?.onStop(function (res) {
|
|
|
- if (res.duration < 2000) {
|
|
|
|
|
|
|
+ if (res.duration < 1000) {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '录音时间过短',
|
|
title: '录音时间过短',
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
@@ -217,9 +217,9 @@ onUnmounted(() => {
|
|
|
<Back />
|
|
<Back />
|
|
|
<view class="video-container">
|
|
<view class="video-container">
|
|
|
<video v-if="progress2 !== 4" id="video1" class="w-full h-full " enable-play-gesture :src="data.videoSrc"
|
|
<video v-if="progress2 !== 4" id="video1" class="w-full h-full " enable-play-gesture :src="data.videoSrc"
|
|
|
- :show-center-play-btn="false" :show-background-playback-button="false" :show-fullscreen-btn="false"
|
|
|
|
|
- :show-casting-button="false" autoplay @controlstoggle="handleControlsToggle" @ended="handleEnded"
|
|
|
|
|
- @loadedmetadata="handleLoadedMetadata">
|
|
|
|
|
|
|
+ enable-auto-rotation :show-center-play-btn="false" :show-background-playback-button="false"
|
|
|
|
|
+ :show-fullscreen-btn="false" :show-casting-button="false" autoplay @controlstoggle="handleControlsToggle"
|
|
|
|
|
+ @ended="handleEnded" @play="handleLoadedMetadata">
|
|
|
</video>
|
|
</video>
|
|
|
<view v-else class="w-full h-full ">
|
|
<view v-else class="w-full h-full ">
|
|
|
<image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/assert_1.gif" alt=""
|
|
<image mode="aspectFill" src="https://oss.xiaoxiongcode.com/static/home/assert_1.gif" alt=""
|
|
@@ -234,9 +234,9 @@ onUnmounted(() => {
|
|
|
|
|
|
|
|
<!-- 居中麦克风按钮 -->
|
|
<!-- 居中麦克风按钮 -->
|
|
|
<view class=" mic flex flex-col items-center w-[220px] h-[220px]">
|
|
<view class=" mic flex flex-col items-center w-[220px] h-[220px]">
|
|
|
- <view v-show="timer" class="mic">
|
|
|
|
|
|
|
+ <!-- <view v-show="timer" class="mic">
|
|
|
<cl-progress-circle :value="timers"></cl-progress-circle>
|
|
<cl-progress-circle :value="timers"></cl-progress-circle>
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view> -->
|
|
|
|
|
|
|
|
<view
|
|
<view
|
|
|
class="mic w-[120px] h-[120px] bg-[#3CB8FF] rounded-full flex items-center justify-center z-[2] border-[4px] border-white border-solid"
|
|
class="mic w-[120px] h-[120px] bg-[#3CB8FF] rounded-full flex items-center justify-center z-[2] border-[4px] border-white border-solid"
|
|
@@ -247,7 +247,10 @@ onUnmounted(() => {
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
<view class="mic w-[120px] h-[120px] bg-[#3CB8FF] rounded-full flex items-center justify-center z-[2]"
|
|
<view class="mic w-[120px] h-[120px] bg-[#3CB8FF] rounded-full flex items-center justify-center z-[2]"
|
|
|
@tap="endRecord">
|
|
@tap="endRecord">
|
|
|
- <view class="w-[50px] h-[50px] rounded-[5px] bg-white"></view>
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="w-[50px] h-[50px] rounded-[5px] bg-white flex items-center justify-center text-[20px] font-bold text-[#3CB8FF]">
|
|
|
|
|
+ {{ timers }}
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|