|
@@ -32,6 +32,10 @@ export default defineComponent({
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
+ showModel: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ },
|
|
|
imagePos: {
|
|
|
type: String,
|
|
|
default: 'left'
|
|
@@ -48,6 +52,7 @@ export default defineComponent({
|
|
|
durationNum: 0,
|
|
|
duration: '00:00',
|
|
|
showBar: true,
|
|
|
+ showAction: true,
|
|
|
afterMa3: true,
|
|
|
count: 0,
|
|
|
previousBytesLoaded: 0,
|
|
@@ -154,6 +159,14 @@ export default defineComponent({
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+ watch(
|
|
|
+ () => props.showModel,
|
|
|
+ () => {
|
|
|
+ // console.log(props.showModel, 'props.showModel')
|
|
|
+ audioForms.showAction = props.showModel;
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
const calculateSpeed = (element: any) => {
|
|
|
let previousBytesLoaded = 0;
|
|
|
let timer: any = null;
|
|
@@ -504,14 +517,14 @@ export default defineComponent({
|
|
|
<div
|
|
|
class={[
|
|
|
styles.controls,
|
|
|
- audioForms.showBar ? '' : styles.sectionAnimate
|
|
|
+ audioForms.showAction ? '' : styles.sectionAnimate
|
|
|
]}
|
|
|
onClick={(e: MouseEvent) => {
|
|
|
e.stopPropagation();
|
|
|
emit('reset');
|
|
|
}}>
|
|
|
<div class={styles.slider}>
|
|
|
- <div class={styles.time}>
|
|
|
+ {props.imagePos !== 'right' && <div class={styles.time}>
|
|
|
<div
|
|
|
class="plyr__time plyr__time--current"
|
|
|
aria-label="Current time">
|
|
@@ -523,7 +536,7 @@ export default defineComponent({
|
|
|
aria-label="Duration">
|
|
|
{audioForms.duration}
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>}
|
|
|
|
|
|
<NSlider
|
|
|
value={audioForms.currentTimeNum}
|
|
@@ -536,6 +549,19 @@ export default defineComponent({
|
|
|
audioForms.currentTime = timeFormat(Math.round(val || 0));
|
|
|
}}
|
|
|
/>
|
|
|
+ {props.imagePos === 'right' && <div class={[styles.time, styles.rightTime]}>
|
|
|
+ <div
|
|
|
+ class="plyr__time plyr__time--current"
|
|
|
+ aria-label="Current time">
|
|
|
+ {audioForms.currentTime}
|
|
|
+ </div>
|
|
|
+ <span class={styles.line}>/</span>
|
|
|
+ <div
|
|
|
+ class="plyr__time plyr__time--duration"
|
|
|
+ aria-label="Duration">
|
|
|
+ {audioForms.duration}
|
|
|
+ </div>
|
|
|
+ </div>}
|
|
|
</div>
|
|
|
<div class={styles.tools}>
|
|
|
{props.imagePos === 'right' ? (
|