@aochuang/common 1.0.1 → 1.0.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/index.js +13 -0
- package/common/resizable/index.js +3 -0
- package/common/resizable/resizable.vue +260 -0
- package/common/scroll-load-more/index.js +3 -0
- package/common/scroll-load-more/scroll-load-more.vue +397 -0
- package/common/static-map/index.js +3 -0
- package/common/static-map/static-map.vue +87 -0
- package/common/tooltip/tooltip.vue +27 -7
- package/common/viewer/index.js +4 -0
- package/common/viewer/util.js +40 -0
- package/common/viewer/viewer.vue +607 -0
- package/common/viewer-pedestal/index.js +3 -0
- package/common/viewer-pedestal/viewer-pedestal.vue +70 -0
- package/common/voice/index.js +21 -0
- package/common/voice/util.js +18 -0
- package/common/voice/voice-player-aac.js +584 -0
- package/common/voice/voice-player-audio.js +159 -0
- package/common/voice/voice-player.js +309 -0
- package/common/voice/voice.vue +274 -0
- package/common/voice-player/index.js +3 -0
- package/common/voice-player/voice-player.vue +785 -0
- package/common/waterfall/index.js +3 -0
- package/common/waterfall/waterfall.vue +169 -0
- package/common/wechat-emoji/emoji/666.png +0 -0
- package/common/wechat-emoji/emoji/Emm.png +0 -0
- package/common/wechat-emoji/emoji/OK.png +0 -0
- package/common/wechat-emoji/emoji//344/272/262/344/272/262.png +0 -0
- package/common/wechat-emoji/emoji//344/276/277/344/276/277.png +0 -0
- package/common/wechat-emoji/emoji//345/201/267/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/202/262/346/205/242.png +0 -0
- package/common/wechat-emoji/emoji//345/206/215/350/247/201.png +0 -0
- package/common/wechat-emoji/emoji//345/207/213/350/260/242.png +0 -0
- package/common/wechat-emoji/emoji//345/210/240/351/231/244.png +0 -0
- package/common/wechat-emoji/emoji//345/212/240/346/262/271.png +0 -0
- package/common/wechat-emoji/emoji//345/213/276/345/274/225.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/345/221/206.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/346/200/222.png +0 -0
- package/common/wechat-emoji/emoji//345/217/221/346/212/226.png +0 -0
- package/common/wechat-emoji/emoji//345/217/257/346/200/234.png +0 -0
- package/common/wechat-emoji/emoji//345/217/263/345/223/274/345/223/274.png +0 -0
- package/common/wechat-emoji/emoji//345/217/271/346/260/224.png +0 -0
- package/common/wechat-emoji/emoji//345/220/203/347/223/234.png +0 -0
- package/common/wechat-emoji/emoji//345/220/210/345/215/201.png +0 -0
- package/common/wechat-emoji/emoji//345/220/220.png +0 -0
- package/common/wechat-emoji/emoji//345/220/220/350/210/214/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//345/221/262/347/211/231.png +0 -0
- package/common/wechat-emoji/emoji//345/222/222/351/252/202.png +0 -0
- package/common/wechat-emoji/emoji//345/222/226/345/225/241.png +0 -0
- package/common/wechat-emoji/emoji//345/223/207.png +0 -0
- package/common/wechat-emoji/emoji//345/223/210/346/254/240.png +0 -0
- package/common/wechat-emoji/emoji//345/225/244/351/205/222.png +0 -0
- package/common/wechat-emoji/emoji//345/230/230.png +0 -0
- package/common/wechat-emoji/emoji//345/230/264/345/224/207.png +0 -0
- package/common/wechat-emoji/emoji//345/230/277/345/223/210.png +0 -0
- package/common/wechat-emoji/emoji//345/233/247.png +0 -0
- package/common/wechat-emoji/emoji//345/233/260.png +0 -0
- package/common/wechat-emoji/emoji//345/235/217/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/244/247/345/223/255.png +0 -0
- package/common/wechat-emoji/emoji//345/244/251/345/225/212.png +0 -0
- package/common/wechat-emoji/emoji//345/244/252/351/230/263.png +0 -0
- package/common/wechat-emoji/emoji//345/244/261/346/234/233.png +0 -0
- package/common/wechat-emoji/emoji//345/245/213/346/226/227.png +0 -0
- package/common/wechat-emoji/emoji//345/245/270/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/245/275/347/232/204.png +0 -0
- package/common/wechat-emoji/emoji//345/247/224/345/261/210.png +0 -0
- package/common/wechat-emoji/emoji//345/256/263/347/276/236.png +0 -0
- package/common/wechat-emoji/emoji//345/260/264/345/260/254.png +0 -0
- package/common/wechat-emoji/emoji//345/267/246/345/223/274/345/223/274.png +0 -0
- package/common/wechat-emoji/emoji//345/272/206/347/245/235.png +0 -0
- package/common/wechat-emoji/emoji//345/274/261.png +0 -0
- package/common/wechat-emoji/emoji//345/274/272.png +0 -0
- package/common/wechat-emoji/emoji//345/276/227/346/204/217.png +0 -0
- package/common/wechat-emoji/emoji//345/276/256/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//345/277/203/347/242/216.png +0 -0
- package/common/wechat-emoji/emoji//345/277/253/345/223/255/344/272/206.png +0 -0
- package/common/wechat-emoji/emoji//346/200/204/347/201/253.png +0 -0
- package/common/wechat-emoji/emoji//346/201/220/346/203/247.png +0 -0
- package/common/wechat-emoji/emoji//346/202/240/351/227/262.png +0 -0
- package/common/wechat-emoji/emoji//346/203/212/346/201/220.png +0 -0
- package/common/wechat-emoji/emoji//346/203/212/350/256/266.png +0 -0
- package/common/wechat-emoji/emoji//346/204/211/345/277/253.png +0 -0
- package/common/wechat-emoji/emoji//346/206/250/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//346/211/223/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//346/212/223/347/213/202.png +0 -0
- package/common/wechat-emoji/emoji//346/212/240/351/274/273.png +0 -0
- package/common/wechat-emoji/emoji//346/212/261/346/213/263.png +0 -0
- package/common/wechat-emoji/emoji//346/213/245/346/212/261.png +0 -0
- package/common/wechat-emoji/emoji//346/213/263/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//346/215/202/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//346/217/241/346/211/213.png +0 -0
- package/common/wechat-emoji/emoji//346/222/207/345/230/264.png +0 -0
- package/common/wechat-emoji/emoji//346/223/246/346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/225/262/346/211/223.png +0 -0
- package/common/wechat-emoji/emoji//346/227/240/350/257/255.png +0 -0
- package/common/wechat-emoji/emoji//346/227/272/346/237/264.png +0 -0
- package/common/wechat-emoji/emoji//346/231/225.png +0 -0
- package/common/wechat-emoji/emoji//346/234/210/344/272/256.png +0 -0
- package/common/wechat-emoji/emoji//346/234/272/346/231/272.png +0 -0
- package/common/wechat-emoji/emoji//346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/265/201/346/261/227.png +0 -0
- package/common/wechat-emoji/emoji//346/265/201/346/263/252.png +0 -0
- package/common/wechat-emoji/emoji//347/202/270/345/274/271.png +0 -0
- package/common/wechat-emoji/emoji//347/203/237/350/212/261.png +0 -0
- package/common/wechat-emoji/emoji//347/210/206/347/253/271.png +0 -0
- package/common/wechat-emoji/emoji//347/210/261/345/277/203.png +0 -0
- package/common/wechat-emoji/emoji//347/214/252/345/244/264.png +0 -0
- package/common/wechat-emoji/emoji//347/216/253/347/221/260.png +0 -0
- package/common/wechat-emoji/emoji//347/224/237/347/227/205.png +0 -0
- package/common/wechat-emoji/emoji//347/226/221/351/227/256.png +0 -0
- package/common/wechat-emoji/emoji//347/231/274.png +0 -0
- package/common/wechat-emoji/emoji//347/231/275/347/234/274.png +0 -0
- package/common/wechat-emoji/emoji//347/232/261/347/234/211.png +0 -0
- package/common/wechat-emoji/emoji//347/235/241.png +0 -0
- package/common/wechat-emoji/emoji//347/240/264/346/266/225/344/270/272/347/254/221.png +0 -0
- package/common/wechat-emoji/emoji//347/244/274/347/211/251.png +0 -0
- package/common/wechat-emoji/emoji//347/244/276/344/274/232/347/244/276/344/274/232.png +0 -0
- package/common/wechat-emoji/emoji//347/246/217.png +0 -0
- package/common/wechat-emoji/emoji//347/254/221/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//347/272/242/345/214/205.png +0 -0
- package/common/wechat-emoji/emoji//347/277/273/347/231/275/347/234/274.png +0 -0
- package/common/wechat-emoji/emoji//350/200/266.png +0 -0
- package/common/wechat-emoji/emoji//350/203/234/345/210/251.png +0 -0
- package/common/wechat-emoji/emoji//350/204/270/347/272/242.png +0 -0
- package/common/wechat-emoji/emoji//350/211/262.png +0 -0
- package/common/wechat-emoji/emoji//350/213/246/346/266/251.png +0 -0
- package/common/wechat-emoji/emoji//350/217/234/345/210/200.png +0 -0
- package/common/wechat-emoji/emoji//350/233/213/347/263/225.png +0 -0
- package/common/wechat-emoji/emoji//350/241/260.png +0 -0
- package/common/wechat-emoji/emoji//350/243/202/345/274/200.png +0 -0
- package/common/wechat-emoji/emoji//350/245/277/347/223/234.png +0 -0
- package/common/wechat-emoji/emoji//350/256/251/346/210/221/347/234/213/347/234/213.png +0 -0
- package/common/wechat-emoji/emoji//350/260/203/347/232/256.png +0 -0
- package/common/wechat-emoji/emoji//350/267/263/350/267/263.png +0 -0
- package/common/wechat-emoji/emoji//350/275/254/345/234/210.png +0 -0
- package/common/wechat-emoji/emoji//351/204/231/350/247/206.png +0 -0
- package/common/wechat-emoji/emoji//351/227/255/345/230/264.png +0 -0
- package/common/wechat-emoji/emoji//351/230/264/351/231/251.png +0 -0
- package/common/wechat-emoji/emoji//351/232/276/350/277/207.png +0 -0
- package/common/wechat-emoji/emoji//351/252/267/351/253/205.png +0 -0
- package/common/wechat-emoji/emoji//351/254/274/350/204/270.png +0 -0
- package/common/wechat-emoji/emoji//351/270/241.png +0 -0
- package/common/wechat-emoji/emoji//351/274/223/346/216/214.png +0 -0
- package/common/wechat-emoji/index.js +14 -0
- package/common/wechat-emoji/order.json +111 -0
- package/common/wechat-emoji/utils.js +52 -0
- package/common/wechat-emoji/wechat-emoji.vue +74 -0
- package/common/wechat-emoji-select/index.js +3 -0
- package/common/wechat-emoji-select/wechat-emoji-select.vue +67 -0
- package/components/advanced-filter/advanced-filter-condition.vue +1 -1
- package/components/advanced-filter/advanced-filter.vue +6 -1
- package/components/advanced-filter/index.js +11 -12
- package/components/avatar/avatar.vue +9 -5
- package/components/button/button.vue +15 -2
- package/components/date-picker/date-picker.vue +9 -2
- package/components/dialog/dialog.vue +6 -1
- package/components/dropdown/dropdown-item.vue +10 -2
- package/components/dropdown/dropdown.vue +45 -5
- package/components/dropdown/index.js +8 -8
- package/components/empty/empty.vue +29 -2
- package/components/filter/filter.vue +1 -1
- package/components/filter/index.js +10 -10
- package/components/form/form.vue +33 -2
- package/components/form/index.js +11 -0
- package/components/grid/grid-column.vue +1 -0
- package/components/grid/grid-table.vue +6 -4
- package/components/grid/grid.vue +15 -3
- package/components/grid/index.js +31 -32
- package/components/icon/demo_index.html +2752 -1073
- package/components/icon/iconfont.css +299 -7
- package/components/icon/iconfont.js +1 -1
- package/components/icon/iconfont.json +518 -7
- package/components/icon/iconfont.ttf +0 -0
- package/components/icon/iconfont.woff +0 -0
- package/components/icon/iconfont.woff2 +0 -0
- package/components/image/image.vue +91 -13
- package/components/image/index.js +3 -1
- package/components/image/util.js +82 -1
- package/components/index.js +6 -2
- package/components/menu/index.js +13 -7
- package/components/menu/menu-group.vue +6 -1
- package/components/menu/menu-item.vue +57 -3
- package/components/menu/menu.vue +1 -1
- package/components/message/message.js +12 -9
- package/components/message-box/index.js +4 -0
- package/components/pagination/pagination.vue +11 -7
- package/components/popover/popover.vue +24 -1
- package/components/searchbox/searchbox.vue +15 -3
- package/components/select/index.js +2 -0
- package/components/select/select.vue +7 -1
- package/components/skeleton/index.js +2 -0
- package/components/sortable/index.js +7 -5
- package/components/sortable/sortable.vue +5 -0
- package/components/tabbar/index.js +9 -0
- package/components/tabbar/tabbar-item.vue +162 -0
- package/components/tabbar/tabbar.vue +49 -0
- package/components/tabs/index.js +2 -0
- package/components/tabs/tabs.vue +5 -0
- package/components/tag/index.js +4 -4
- package/components/tag/tag.less +12 -3
- package/components/textarea/textarea.vue +19 -3
- package/components/time-picker/time-picker.vue +7 -0
- package/components/toolbar/index.js +2 -0
- package/components/transfer/index.js +4 -4
- package/components/transfer/transfer-element.vue +109 -0
- package/components/transfer/transfer.vue +22 -7
- package/components/tree/tree.vue +175 -16
- package/components/video/video.vue +50 -2
- package/package.json +12 -1
- package/uni-common/more-button/more-button.vue +23 -0
- package/uni-common/popup-select/popup-select.vue +217 -0
- package/uni-common/portray/portray.vue +54 -0
- package/uni-common/refresh-view/refresh-view.vue +94 -0
- package/uni-common/scroll-load-more/scroll-load-more.vue +201 -0
- package/uni-common/tree-popup-select/index.js +3 -0
- package/uni-common/tree-popup-select/tree-popup-select-panel.vue +92 -0
- package/uni-common/tree-popup-select/tree-popup-select.vue +124 -0
- package/uni-common/tree-popup-select/util.js +19 -0
- package/uni-common/wechat-emoji/index.js +13 -0
- package/uni-common/wechat-emoji/order.json +438 -0
- package/uni-common/wechat-emoji/utils.js +52 -0
- package/uni-common/wechat-emoji/wechat-emoji.vue +74 -0
- package/uni-components/avatar/avatar.vue +81 -0
- package/uni-components/badge/badge.vue +57 -0
- package/uni-components/empty/empty.vue +27 -0
- package/uni-components/exception/exception.vue +47 -0
- package/uni-components/icon/demo.css +539 -0
- package/uni-components/icon/demo_index.html +1591 -0
- package/uni-components/icon/icon.vue +48 -0
- package/uni-components/icon/iconfont.css +259 -0
- package/uni-components/icon/iconfont.js +1 -0
- package/uni-components/icon/iconfont.json +436 -0
- package/uni-components/icon/iconfont.ttf +0 -0
- package/uni-components/icon/iconfont.woff +0 -0
- package/uni-components/icon/iconfont.woff2 +0 -0
- package/uni-components/icon/index.js +3 -0
- package/uni-components/image/image.vue +38 -0
- package/uni-components/image/index.js +3 -0
- package/uni-components/loading/index.js +3 -0
- package/uni-components/loading/loading.vue +30 -0
- package/uni-components/message/message-item.vue +29 -0
- package/uni-components/message/message.js +80 -0
- package/uni-components/message/message.vue +30 -0
- package/uni-components/message-box/message-box-item.vue +54 -0
- package/uni-components/message-box/message-box.js +91 -0
- package/uni-components/message-box/message-box.vue +52 -0
- package/uni-components/picker/picker.vue +270 -0
- package/uni-components/popup/index.js +3 -0
- package/uni-components/popup/popup.vue +143 -0
- package/uni-components/search/index.js +3 -0
- package/uni-components/search/search.vue +86 -0
- package/uni-components/skeleton/skeleton-chat.vue +85 -0
- package/uni-components/skeleton/skeleton-contact.vue +84 -0
- package/uni-components/skeleton/skeleton-detail.vue +84 -0
- package/uni-components/skeleton/skeleton.vue +32 -0
- package/uni-components/tabbar/tabbar-item.vue +33 -0
- package/uni-components/tabbar/tabbar.vue +87 -0
- package/uni-components/tree/index.js +3 -0
- package/uni-components/tree/tree-select-loading.vue +48 -0
- package/uni-components/tree/tree-select-node.vue +202 -0
- package/uni-components/tree/tree-select-store.js +520 -0
- package/uni-components/tree/tree-select.vue +210 -0
- package/uni-components/tree/utils.js +33 -0
- package/uni-components/video/index.js +3 -0
- package/uni-components/video/video.vue +29 -0
- package/uni-components/voice/index.js +3 -0
- package/uni-components/voice/voice.vue +24 -0
- package/uni-components/waterfall/index.js +3 -0
- package/uni-components/waterfall/util.js +72 -0
- package/uni-components/waterfall/waterfall.vue +147 -0
- package/utils/data.js +128 -0
- package/utils/date.js +484 -44
- package/utils/dom.js +37 -0
- package/utils/event.js +92 -0
- package/utils/file.js +76 -0
- package/utils/json.js +22 -1
- package/utils/network-detector.js +258 -0
- package/utils/oss.js +11 -0
- package/utils/share-message.js +81 -0
- package/utils/share-websocket.js +127 -0
- package/utils/string.js +59 -0
- package/utils/time-task.js +60 -0
- package/utils/url.js +46 -0
- package/utils/util.js +416 -1
|
@@ -0,0 +1,785 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ac-voice-player" :class="['bi-wechat-chat-voice-player--' + type, {'is-error': isError}]">
|
|
3
|
+
<div class="ac-voice-player__switch">
|
|
4
|
+
<ui-icon
|
|
5
|
+
v-if="isLoading || isGetUrling || loading"
|
|
6
|
+
class="ac-voice-player__loading"
|
|
7
|
+
name="loading"
|
|
8
|
+
title="资源加载中"
|
|
9
|
+
/>
|
|
10
|
+
<ui-icon
|
|
11
|
+
v-else-if="isPlaying"
|
|
12
|
+
class="ac-voice-player__switch-btn"
|
|
13
|
+
name="stop-line1"
|
|
14
|
+
:title="isSuperPause ? '暂停' : '停止'"
|
|
15
|
+
@click="handlePauseClick"
|
|
16
|
+
/>
|
|
17
|
+
<ui-icon
|
|
18
|
+
v-else
|
|
19
|
+
class="ac-voice-player__switch-btn"
|
|
20
|
+
name="play-line1"
|
|
21
|
+
title="播放"
|
|
22
|
+
@click="handlePlayClick"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="ac-voice-player__progress">
|
|
26
|
+
<div v-if="isError" class="ac-voice-player__error" :title="errorMsg">{{ errorMsg }}</div>
|
|
27
|
+
<div v-else class="ac-voice-player__progerss-fields">
|
|
28
|
+
<div class="ac-voice-player__progerss-field">{{ playSecondsText }}</div>
|
|
29
|
+
<div class="ac-voice-player__progerss-field">{{ totalSecondsText }}</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="ac-voice-player__progerss-bar">
|
|
32
|
+
<input
|
|
33
|
+
class="ac-voice-player__progerss-bar-control"
|
|
34
|
+
type="range"
|
|
35
|
+
:value="playCurrPosition"
|
|
36
|
+
:max="voiceSeconds"
|
|
37
|
+
min="0"
|
|
38
|
+
step="0.001"
|
|
39
|
+
:style="controlStyle"
|
|
40
|
+
:disabled="isLoading || isGetUrling || loading"
|
|
41
|
+
@input="handleControlChange"
|
|
42
|
+
>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="ac-voice-player__rote">
|
|
46
|
+
<ui-popover ref="popover" :visible-arrow="true" trigger="click">
|
|
47
|
+
<span slot="reference" class="ac-voice-player__rote-btn">
|
|
48
|
+
<span class="ac-voice-player__rote-text">{{ currRateOption.showText }}</span>
|
|
49
|
+
</span>
|
|
50
|
+
<ul class="ac-voice-player__rote-menu">
|
|
51
|
+
<template v-if="isSuperChangeRate">
|
|
52
|
+
<li
|
|
53
|
+
v-for="(item, index) in rateOptions"
|
|
54
|
+
:key="index"
|
|
55
|
+
class="ac-voice-player__rote-menu-item"
|
|
56
|
+
:class="{'is-active': item.value === controlPlayRate}"
|
|
57
|
+
@click="handleRateItemClick(item)"
|
|
58
|
+
>{{ item.text }}</li>
|
|
59
|
+
</template>
|
|
60
|
+
<template v-else>
|
|
61
|
+
<li
|
|
62
|
+
class="ac-voice-player__rote-menu-item is-disabled"
|
|
63
|
+
@click="handleRateItemClick(item, true)"
|
|
64
|
+
>AAC格式音频不支持切换倍率</li>
|
|
65
|
+
</template>
|
|
66
|
+
</ul>
|
|
67
|
+
</ui-popover>
|
|
68
|
+
</div>
|
|
69
|
+
<div v-if="isOrigAmr && enableConvertToWav" class="ac-voice-player__wav" :class="{'is-disabled': !isNeedConvertWav || progressing}" @click="handleConvertToWavClick">
|
|
70
|
+
<ac-tooltip :text="isNowWav ? '已经转为wav格式,无需再次转换' : progressing ? '播放中不允许转换' : '转成wav格式后,下次播放速度会提高,播放时也会自动转换'">
|
|
71
|
+
<ui-icon
|
|
72
|
+
v-if="converting"
|
|
73
|
+
class="ac-voice-player__loading"
|
|
74
|
+
name="loading"
|
|
75
|
+
title="转换中"
|
|
76
|
+
/>
|
|
77
|
+
<span v-else class="ac-voice-player__wav-btn">转WAV</span>
|
|
78
|
+
</ac-tooltip>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="ac-voice-player__download" v-if="allowDownload" @click="handleDownloadClick">
|
|
81
|
+
<ui-icon
|
|
82
|
+
class="ac-voice-player__download-btn"
|
|
83
|
+
name="download-line"
|
|
84
|
+
title="下载"
|
|
85
|
+
></ui-icon>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
<script>
|
|
90
|
+
import AcTooltip from '../tooltip'
|
|
91
|
+
import { getRateOptions } from '../voice'
|
|
92
|
+
import { formatOssPath } from '@aochuang/common/utils/oss'
|
|
93
|
+
import Message from '../../components/message'
|
|
94
|
+
|
|
95
|
+
function formatSeconds (seconds) {
|
|
96
|
+
if (!seconds) {
|
|
97
|
+
return '00:00'
|
|
98
|
+
} else {
|
|
99
|
+
const nextMinutes = Math.floor(seconds / 60)
|
|
100
|
+
const nextSeconds = Math.ceil(seconds - nextMinutes * 60)
|
|
101
|
+
let result = ''
|
|
102
|
+
if (nextMinutes <= 9) {
|
|
103
|
+
result = '0' + nextMinutes
|
|
104
|
+
} else {
|
|
105
|
+
result = nextMinutes
|
|
106
|
+
}
|
|
107
|
+
result += ':'
|
|
108
|
+
if (nextSeconds <= 9) {
|
|
109
|
+
result += '0' + nextSeconds
|
|
110
|
+
} else {
|
|
111
|
+
result += nextSeconds
|
|
112
|
+
}
|
|
113
|
+
return result
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default {
|
|
118
|
+
name: 'AcVoicePlayer',
|
|
119
|
+
components: {
|
|
120
|
+
AcTooltip
|
|
121
|
+
},
|
|
122
|
+
inject: ['AcVoice'],
|
|
123
|
+
props: {
|
|
124
|
+
id: {
|
|
125
|
+
type: [String, Number],
|
|
126
|
+
required: true
|
|
127
|
+
},
|
|
128
|
+
url: {
|
|
129
|
+
type: String
|
|
130
|
+
},
|
|
131
|
+
type: {
|
|
132
|
+
type: String,
|
|
133
|
+
default: 'default'
|
|
134
|
+
},
|
|
135
|
+
seconds: {
|
|
136
|
+
type: [String, Number]
|
|
137
|
+
},
|
|
138
|
+
allowDownload: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
default: true
|
|
141
|
+
},
|
|
142
|
+
getUrlMethod: {
|
|
143
|
+
type: Function
|
|
144
|
+
},
|
|
145
|
+
enableConvertToWav: {
|
|
146
|
+
type: Boolean,
|
|
147
|
+
default: false
|
|
148
|
+
},
|
|
149
|
+
updateWavMethod: {
|
|
150
|
+
type: Function
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
data () {
|
|
154
|
+
return {
|
|
155
|
+
loading: false,
|
|
156
|
+
progressing: false, // 真正的播放中
|
|
157
|
+
converting: false,
|
|
158
|
+
innerUrl: this.url,
|
|
159
|
+
isGetUrling: false,
|
|
160
|
+
controlPlaySeconds: this.seconds,
|
|
161
|
+
controlPlayRate: 1,
|
|
162
|
+
controlPlayPosition: 0,
|
|
163
|
+
isSuperChangeProgress: false
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
computed: {
|
|
167
|
+
isOrigAmr () {
|
|
168
|
+
if (!this.url) {
|
|
169
|
+
return false
|
|
170
|
+
}
|
|
171
|
+
const url = this.url.toLocaleLowerCase()
|
|
172
|
+
return url.indexOf('.amr') >= 0
|
|
173
|
+
},
|
|
174
|
+
isNowWav () {
|
|
175
|
+
if (!this.innerUrl) {
|
|
176
|
+
return false
|
|
177
|
+
}
|
|
178
|
+
const url = this.innerUrl.toLocaleLowerCase()
|
|
179
|
+
return url.indexOf('.wav') >= 0
|
|
180
|
+
},
|
|
181
|
+
isNeedConvertWav () {
|
|
182
|
+
if (this.isNowWav) {
|
|
183
|
+
return false
|
|
184
|
+
}
|
|
185
|
+
return this.isOrigAmr
|
|
186
|
+
},
|
|
187
|
+
rateOptions () {
|
|
188
|
+
return getRateOptions()
|
|
189
|
+
},
|
|
190
|
+
currRateOption () {
|
|
191
|
+
return this.rateOptions.find(v => v.value === this.controlPlayRate)
|
|
192
|
+
},
|
|
193
|
+
controlStyle () {
|
|
194
|
+
return {
|
|
195
|
+
'background-size': `${this.playPercentage}% 100%`
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
isLoading () {
|
|
199
|
+
if (!this.AcVoice) {
|
|
200
|
+
return false
|
|
201
|
+
}
|
|
202
|
+
if (!this.AcVoice.isPlaying(this.id)) {
|
|
203
|
+
return false
|
|
204
|
+
}
|
|
205
|
+
return this.AcVoice.loading
|
|
206
|
+
},
|
|
207
|
+
isPlaying () {
|
|
208
|
+
let rs = null
|
|
209
|
+
if (this.AcVoice) {
|
|
210
|
+
rs = this.AcVoice.isPlaying(this.id)
|
|
211
|
+
}
|
|
212
|
+
return rs
|
|
213
|
+
},
|
|
214
|
+
isPause () {
|
|
215
|
+
let rs = null
|
|
216
|
+
if (this.AcVoice) {
|
|
217
|
+
rs = this.AcVoice.isPause(this.id)
|
|
218
|
+
}
|
|
219
|
+
return rs
|
|
220
|
+
},
|
|
221
|
+
isStop () {
|
|
222
|
+
return !this.isPlaying && !this.isPause
|
|
223
|
+
},
|
|
224
|
+
errorMsg () {
|
|
225
|
+
let rs = null
|
|
226
|
+
if (this.AcVoice) {
|
|
227
|
+
rs = this.AcVoice.getErrorMsg(this.id)
|
|
228
|
+
}
|
|
229
|
+
return rs
|
|
230
|
+
},
|
|
231
|
+
isError () {
|
|
232
|
+
return !!this.errorMsg
|
|
233
|
+
},
|
|
234
|
+
voiceSrc () {
|
|
235
|
+
return this.innerUrl
|
|
236
|
+
},
|
|
237
|
+
voiceSeconds () {
|
|
238
|
+
return this.controlPlaySeconds ? this.controlPlaySeconds : 0
|
|
239
|
+
},
|
|
240
|
+
playPercentage () {
|
|
241
|
+
if (this.isStop) {
|
|
242
|
+
return 0
|
|
243
|
+
}
|
|
244
|
+
return this.AcVoice.percentage
|
|
245
|
+
},
|
|
246
|
+
playTotalPosition () {
|
|
247
|
+
if (this.isStop) {
|
|
248
|
+
return 0
|
|
249
|
+
}
|
|
250
|
+
return this.AcVoice.totalPosition
|
|
251
|
+
},
|
|
252
|
+
totalSecondsText () {
|
|
253
|
+
return formatSeconds(this.voiceSeconds)
|
|
254
|
+
},
|
|
255
|
+
playCurrPosition () {
|
|
256
|
+
if (this.isStop) {
|
|
257
|
+
return 0
|
|
258
|
+
}
|
|
259
|
+
return this.AcVoice.currPosition
|
|
260
|
+
},
|
|
261
|
+
playSecondsText () {
|
|
262
|
+
let seconds = 0
|
|
263
|
+
if (this.isPlaying || this.isPause) {
|
|
264
|
+
seconds = this.AcVoice.currPosition
|
|
265
|
+
}
|
|
266
|
+
return formatSeconds(seconds)
|
|
267
|
+
},
|
|
268
|
+
isSuperChangeRate () {
|
|
269
|
+
return this.AcVoice.isSuperChangeRate(this.innerUrl)
|
|
270
|
+
},
|
|
271
|
+
isSuperPause () {
|
|
272
|
+
return this.isSuperChangeRate
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
watch: {
|
|
276
|
+
seconds () {
|
|
277
|
+
this.controlPlaySeconds = this.seconds
|
|
278
|
+
},
|
|
279
|
+
playTotalPosition () {
|
|
280
|
+
if (!this.playTotalPosition) {
|
|
281
|
+
return
|
|
282
|
+
}
|
|
283
|
+
if (this.controlPlaySeconds) {
|
|
284
|
+
return
|
|
285
|
+
}
|
|
286
|
+
this.controlPlaySeconds = this.playTotalPosition
|
|
287
|
+
},
|
|
288
|
+
playCurrPosition (val) {
|
|
289
|
+
this.controlPlayPosition = val
|
|
290
|
+
},
|
|
291
|
+
url () {
|
|
292
|
+
this.innerUrl = this.url
|
|
293
|
+
},
|
|
294
|
+
isPlaying (val) {
|
|
295
|
+
if (!val) {
|
|
296
|
+
this.progressing = false
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
mounted () {
|
|
301
|
+
this.AcVoice.$on('playing', this.handleVoicePlaying)
|
|
302
|
+
this.AcVoice.$on('end', this.handleVoiceEnd)
|
|
303
|
+
this.AcVoice.$on('error', this.handleVoiceError)
|
|
304
|
+
},
|
|
305
|
+
beforeDestroy () {
|
|
306
|
+
this.AcVoice.remove(this.id)
|
|
307
|
+
this.AcVoice.$off('playing', this.handleVoicePlaying)
|
|
308
|
+
this.AcVoice.$off('end', this.handleVoiceEnd)
|
|
309
|
+
this.AcVoice.$off('error', this.handleVoiceError)
|
|
310
|
+
},
|
|
311
|
+
methods: {
|
|
312
|
+
handleVoiceError (e) {
|
|
313
|
+
if (e.type === 'aac' && e.playId === this.id) {
|
|
314
|
+
if (e.message && e.message === 'Maximum call stack size exceeded') {
|
|
315
|
+
if (this.allowDownload) {
|
|
316
|
+
Message.error('抱歉,目前不支持该文件播放,请下载本地进行播放~')
|
|
317
|
+
} else {
|
|
318
|
+
Message.error('抱歉,目前不支持该文件播放~')
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
handleVoiceEnd () {
|
|
324
|
+
this.progressing = false
|
|
325
|
+
},
|
|
326
|
+
handleVoicePlaying (evt) {
|
|
327
|
+
this.isSuperChangeProgress = this.AcVoice.isSuperChangeProgress(this.innerUrl)
|
|
328
|
+
if (!this.isNeedConvertWav) {
|
|
329
|
+
return
|
|
330
|
+
}
|
|
331
|
+
if (!this.isPlaying) {
|
|
332
|
+
return
|
|
333
|
+
}
|
|
334
|
+
if (this.converting) {
|
|
335
|
+
return
|
|
336
|
+
}
|
|
337
|
+
// 拿到raw数据转成wav并上传
|
|
338
|
+
if (!evt.playRawData) {
|
|
339
|
+
return
|
|
340
|
+
}
|
|
341
|
+
this.progressing = true
|
|
342
|
+
this.converting = true
|
|
343
|
+
this.AcVoice.convertToWavByBuffer(evt.playRawData).then(rs => {
|
|
344
|
+
if (this.updateWavMethod) {
|
|
345
|
+
return this.updateWavMethod({
|
|
346
|
+
blob: rs
|
|
347
|
+
}).then((nextUrl) => {
|
|
348
|
+
if (nextUrl) {
|
|
349
|
+
this.innerUrl = nextUrl
|
|
350
|
+
}
|
|
351
|
+
})
|
|
352
|
+
}
|
|
353
|
+
}).finally(() => {
|
|
354
|
+
this.converting = false
|
|
355
|
+
})
|
|
356
|
+
},
|
|
357
|
+
handleConvertToWavClick () {
|
|
358
|
+
if (this.converting || this.progressing || !this.isNeedConvertWav) {
|
|
359
|
+
return
|
|
360
|
+
}
|
|
361
|
+
this.converting = true
|
|
362
|
+
this.AcVoice.convertToWavByUrl(this.url).then(rs => {
|
|
363
|
+
if (this.updateWavMethod) {
|
|
364
|
+
return this.updateWavMethod({
|
|
365
|
+
blob: rs
|
|
366
|
+
}).then((nextUrl) => {
|
|
367
|
+
if (nextUrl) {
|
|
368
|
+
this.innerUrl = nextUrl
|
|
369
|
+
}
|
|
370
|
+
})
|
|
371
|
+
}
|
|
372
|
+
}).finally(() => {
|
|
373
|
+
this.converting = false
|
|
374
|
+
})
|
|
375
|
+
},
|
|
376
|
+
handleRateItemClick (item, isDisabled) {
|
|
377
|
+
if (isDisabled === true) {
|
|
378
|
+
this.$warn('AAC格式音频不支持切换倍率')
|
|
379
|
+
return
|
|
380
|
+
}
|
|
381
|
+
this.controlPlayRate = item.value
|
|
382
|
+
if (this.isPlaying) {
|
|
383
|
+
this.controlPlayPosition = 0
|
|
384
|
+
this.play()
|
|
385
|
+
} else {
|
|
386
|
+
this.AcVoice.setPlaybackRate(item.value)
|
|
387
|
+
}
|
|
388
|
+
this.$refs.popover.hide()
|
|
389
|
+
},
|
|
390
|
+
handleDownloadClick () {
|
|
391
|
+
if (!this.voiceSrc) {
|
|
392
|
+
if (this.getUrlMethod) {
|
|
393
|
+
this.$warn('请先点击播放按钮,获取录音文件地址后再来下载')
|
|
394
|
+
return
|
|
395
|
+
}
|
|
396
|
+
this.$warn('未找到录音文件地址,无法下载')
|
|
397
|
+
return
|
|
398
|
+
}
|
|
399
|
+
window.open(formatOssPath(this.voiceSrc), '_blank')
|
|
400
|
+
},
|
|
401
|
+
handleControlChange (evt) {
|
|
402
|
+
const targetValue = evt.target.value
|
|
403
|
+
clearTimeout(this._controlChangeTimer)
|
|
404
|
+
if (this.AcVoice.playUrl !== this.innerUrl) {
|
|
405
|
+
Promise.all([
|
|
406
|
+
this.play()
|
|
407
|
+
]).then(() => {
|
|
408
|
+
if (!this.AcVoice.isSuperChangeProgress(this.innerUrl)) {
|
|
409
|
+
!this._notTips && this.$warn('AAC格式音频不支持更改播放进度,可以下载本地播放', () => {
|
|
410
|
+
this._notTips = false
|
|
411
|
+
})
|
|
412
|
+
this._notTips = true
|
|
413
|
+
return
|
|
414
|
+
}
|
|
415
|
+
this._controlChangeTimer = setTimeout(() => {
|
|
416
|
+
this.AcVoice.setPosition(parseFloat(targetValue))
|
|
417
|
+
}, 100)
|
|
418
|
+
})
|
|
419
|
+
} else {
|
|
420
|
+
if (!this.isPlaying) {
|
|
421
|
+
this.play().then(() => {
|
|
422
|
+
if (!this.AcVoice.isSuperChangeProgress(this.innerUrl)) {
|
|
423
|
+
!this._notTips && this.$warn('AAC格式音频不支持更改播放进度,可以下载本地播放', () => {
|
|
424
|
+
this._notTips = false
|
|
425
|
+
})
|
|
426
|
+
this._notTips = true
|
|
427
|
+
return
|
|
428
|
+
}
|
|
429
|
+
this._controlChangeTimer = setTimeout(() => {
|
|
430
|
+
this.AcVoice.setPosition(parseFloat(targetValue))
|
|
431
|
+
}, 100)
|
|
432
|
+
})
|
|
433
|
+
} else {
|
|
434
|
+
if (!this.AcVoice.isSuperChangeProgress(this.innerUrl)) {
|
|
435
|
+
!this._notTips && this.$warn('AAC格式音频不支持更改播放进度,可以下载本地播放', () => {
|
|
436
|
+
this._notTips = false
|
|
437
|
+
})
|
|
438
|
+
this._notTips = true
|
|
439
|
+
return
|
|
440
|
+
}
|
|
441
|
+
this.AcVoice.setPosition(parseFloat(targetValue))
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
handlePauseClick () {
|
|
446
|
+
if (this.loading) {
|
|
447
|
+
return
|
|
448
|
+
}
|
|
449
|
+
this.AcVoice.pause()
|
|
450
|
+
},
|
|
451
|
+
handlePlayClick () {
|
|
452
|
+
if (!this.url) {
|
|
453
|
+
this.$warn('未找到录音文件地址,无法播放')
|
|
454
|
+
return
|
|
455
|
+
}
|
|
456
|
+
if (this.isPause) {
|
|
457
|
+
this.resume()
|
|
458
|
+
} else {
|
|
459
|
+
let ps = Promise.resolve()
|
|
460
|
+
if (this.getUrlMethod) {
|
|
461
|
+
this.isGetUrling = true
|
|
462
|
+
ps = this.getUrlMethod().then((url) => {
|
|
463
|
+
this.innerUrl = url
|
|
464
|
+
}).finally(() => {
|
|
465
|
+
this.isGetUrling = false
|
|
466
|
+
})
|
|
467
|
+
}
|
|
468
|
+
ps.then(() => {
|
|
469
|
+
this.controlPlayPosition = 0
|
|
470
|
+
this.play()
|
|
471
|
+
})
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
resume () {
|
|
475
|
+
this.AcVoice.resume()
|
|
476
|
+
},
|
|
477
|
+
play () {
|
|
478
|
+
if (this.loading) {
|
|
479
|
+
return
|
|
480
|
+
}
|
|
481
|
+
if (this.isPlaying) {
|
|
482
|
+
return
|
|
483
|
+
}
|
|
484
|
+
this.progressing = true
|
|
485
|
+
this.AcVoice.setPlaybackRate(this.controlPlayRate)
|
|
486
|
+
this.AcVoice.setPosition(this.controlPlayPosition)
|
|
487
|
+
this.loading = true
|
|
488
|
+
return Promise.all([
|
|
489
|
+
this.AcVoice.start(this.id, this.voiceSrc, this.voiceSeconds, ctx => {
|
|
490
|
+
if (ctx.status === 'success' && ctx.duration) {
|
|
491
|
+
this.controlPlaySeconds = ctx.duration
|
|
492
|
+
}
|
|
493
|
+
})
|
|
494
|
+
]).finally(() => {
|
|
495
|
+
this.loading = false
|
|
496
|
+
})
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
beforeDestroy () {
|
|
500
|
+
clearTimeout(this._controlChangeTimer)
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
</script>
|
|
504
|
+
<style lang="less">
|
|
505
|
+
.ac-voice-player__rote-menu{
|
|
506
|
+
list-style: none;
|
|
507
|
+
margin: 0;
|
|
508
|
+
padding: 6px 0;
|
|
509
|
+
}
|
|
510
|
+
.ac-voice-player__rote-menu-item{
|
|
511
|
+
height: 30px;
|
|
512
|
+
line-height: 30px;
|
|
513
|
+
padding: 0 24px 0 12px;
|
|
514
|
+
cursor: pointer;
|
|
515
|
+
transition: all .3s;
|
|
516
|
+
position: relative;
|
|
517
|
+
&.is-active{
|
|
518
|
+
background-color: #F0F8FC;
|
|
519
|
+
color: #00A0EB;
|
|
520
|
+
&:after{
|
|
521
|
+
position: absolute;
|
|
522
|
+
right: 12px;
|
|
523
|
+
top: 50%;
|
|
524
|
+
transform: translateY(-50%) rotate(-45deg);
|
|
525
|
+
content: '';
|
|
526
|
+
display: inline-block;
|
|
527
|
+
width: 6px;
|
|
528
|
+
height: 4px;
|
|
529
|
+
border: 1px solid #00A0EB;
|
|
530
|
+
border-top: 0;
|
|
531
|
+
border-right: 0;
|
|
532
|
+
margin-top: -1px;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
&.is-disabled{
|
|
536
|
+
color: #999;
|
|
537
|
+
cursor: not-allowed;
|
|
538
|
+
}
|
|
539
|
+
&:hover{
|
|
540
|
+
&:not(.is-disabled) {
|
|
541
|
+
background-color: rgba(0,0,0,.06);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
.bi-wechat-chat-voice-player--default {
|
|
546
|
+
&.ac-voice-player{
|
|
547
|
+
display: flex;
|
|
548
|
+
flex-direction: row;
|
|
549
|
+
height: 40px;
|
|
550
|
+
border: 1px solid #ddd;
|
|
551
|
+
border-radius: 3px;
|
|
552
|
+
background-color: #fff;
|
|
553
|
+
font-size: 12px;
|
|
554
|
+
line-height: 1.75em;
|
|
555
|
+
&.is-error{
|
|
556
|
+
border: 1px solid #f36d6f;
|
|
557
|
+
background-color: rgba(225, 118, 114,.1);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
.ac-voice-player__error{
|
|
561
|
+
white-space: nowrap;
|
|
562
|
+
text-overflow: ellipsis;
|
|
563
|
+
overflow: hidden;
|
|
564
|
+
color: #f36d6f;
|
|
565
|
+
}
|
|
566
|
+
.ac-voice-player__switch,
|
|
567
|
+
.ac-voice-player__progress,
|
|
568
|
+
.ac-voice-player__rote,
|
|
569
|
+
.ac-voice-player__download,
|
|
570
|
+
.ac-voice-player__wav{
|
|
571
|
+
border-right: 1px solid #ddd;
|
|
572
|
+
padding: 0 6px;
|
|
573
|
+
&:last-child{
|
|
574
|
+
border-right: 0;
|
|
575
|
+
}
|
|
576
|
+
&.is-disabled{
|
|
577
|
+
opacity: .5;
|
|
578
|
+
cursor: not-allowed;
|
|
579
|
+
.ac-voice-player__switch-btn,
|
|
580
|
+
.ac-voice-player__rote-btn,
|
|
581
|
+
.ac-voice-player__download-btn,
|
|
582
|
+
.ac-voice-player__wav-btn{
|
|
583
|
+
cursor: not-allowed;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
&:not(.is-disabled) {
|
|
587
|
+
.ac-voice-player__switch-btn,
|
|
588
|
+
.ac-voice-player__rote-btn,
|
|
589
|
+
.ac-voice-player__download-btn,
|
|
590
|
+
.ac-voice-player__wav-btn{
|
|
591
|
+
&:hover{
|
|
592
|
+
color: #00A0EB;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
.ac-voice-player__switch-btn,
|
|
598
|
+
.ac-voice-player__rote-btn,
|
|
599
|
+
.ac-voice-player__download-btn,
|
|
600
|
+
.ac-voice-player__wav-btn{
|
|
601
|
+
vertical-align: top;
|
|
602
|
+
margin-top: 8px;
|
|
603
|
+
display: inline-block;
|
|
604
|
+
cursor: pointer;
|
|
605
|
+
height: 24px;
|
|
606
|
+
line-height: 24px;
|
|
607
|
+
}
|
|
608
|
+
.ac-voice-player__wav{
|
|
609
|
+
min-width: 40px;
|
|
610
|
+
text-align: center;
|
|
611
|
+
}
|
|
612
|
+
.ac-voice-player__loading{
|
|
613
|
+
vertical-align: top;
|
|
614
|
+
margin-top: 7px;
|
|
615
|
+
display: inline-block;
|
|
616
|
+
height: 24px;
|
|
617
|
+
line-height: 24px;
|
|
618
|
+
color: #999;
|
|
619
|
+
cursor: not-allowed;
|
|
620
|
+
}
|
|
621
|
+
.ac-voice-player__rote-btn{
|
|
622
|
+
min-width: 28px;
|
|
623
|
+
text-align: center;
|
|
624
|
+
}
|
|
625
|
+
.ac-voice-player__progress{
|
|
626
|
+
flex: 1;
|
|
627
|
+
min-width: 0;
|
|
628
|
+
}
|
|
629
|
+
.ac-voice-player__progerss-fields{
|
|
630
|
+
display: flex;
|
|
631
|
+
flex-direction: row;
|
|
632
|
+
justify-content: space-between;
|
|
633
|
+
margin-bottom: 4px;
|
|
634
|
+
}
|
|
635
|
+
.ac-voice-player__progerss-bar{
|
|
636
|
+
line-height: 1;
|
|
637
|
+
position: relative;
|
|
638
|
+
&.is-disabled{
|
|
639
|
+
&:after {
|
|
640
|
+
content: '';
|
|
641
|
+
position: absolute;
|
|
642
|
+
left: 0;
|
|
643
|
+
top: 0;
|
|
644
|
+
right: 0;
|
|
645
|
+
bottom: 0;
|
|
646
|
+
z-index: 10;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
.ac-voice-player__progerss-bar-control{
|
|
651
|
+
outline: none;
|
|
652
|
+
vertical-align: top;
|
|
653
|
+
-webkit-appearance: none;/*清除系统默认样式*/
|
|
654
|
+
width:100% !important;
|
|
655
|
+
background: -webkit-linear-gradient(#1aa2e8, #1aa2e8) no-repeat, #ddd;
|
|
656
|
+
background-size: 0% 100%;/*设置左右宽度比例*/
|
|
657
|
+
height: 3px;/*横条的高度*/
|
|
658
|
+
&::-webkit-slider-thumb {
|
|
659
|
+
-webkit-appearance: none;/*清除系统默认样式*/
|
|
660
|
+
height:12px;/*拖动块高度*/
|
|
661
|
+
width: 12px;/*拖动块宽度*/
|
|
662
|
+
background: #fff;/*拖动块背景*/
|
|
663
|
+
border-radius: 50%; /*外观设置为圆形*/
|
|
664
|
+
border: solid 1px #ddd; /*设置边框*/
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
.bi-wechat-chat-voice-player--concise{
|
|
669
|
+
position: relative;
|
|
670
|
+
padding-bottom: 32px;
|
|
671
|
+
.ac-voice-player__progress{
|
|
672
|
+
position: relative;
|
|
673
|
+
padding: 13px 60px 6px;
|
|
674
|
+
}
|
|
675
|
+
.ac-voice-player__progerss-fields{
|
|
676
|
+
.ac-voice-player__progerss-field{
|
|
677
|
+
&:first-child {
|
|
678
|
+
position: absolute;
|
|
679
|
+
left: 6px;
|
|
680
|
+
top: 0;
|
|
681
|
+
}
|
|
682
|
+
&:last-child {
|
|
683
|
+
position: absolute;
|
|
684
|
+
right: 6px;
|
|
685
|
+
top: 0;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
.ac-voice-player__switch{
|
|
690
|
+
position: absolute;
|
|
691
|
+
left: 50%;
|
|
692
|
+
bottom: 0;
|
|
693
|
+
transform: translateX(-50%);
|
|
694
|
+
width: 28px;
|
|
695
|
+
height: 28px;
|
|
696
|
+
border-radius: 50%;
|
|
697
|
+
border: 1px solid #404040;
|
|
698
|
+
cursor: pointer;
|
|
699
|
+
display: flex;
|
|
700
|
+
flex-direction: column;
|
|
701
|
+
align-items: center;
|
|
702
|
+
justify-content: center;
|
|
703
|
+
transition: all .25s;
|
|
704
|
+
&:hover {
|
|
705
|
+
background-color: #F4F5F7;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
.ac-voice-player__progerss-bar{
|
|
709
|
+
line-height: 1;
|
|
710
|
+
}
|
|
711
|
+
.ac-voice-player__progerss-bar-control{
|
|
712
|
+
outline: none;
|
|
713
|
+
vertical-align: top;
|
|
714
|
+
-webkit-appearance: none;/*清除系统默认样式*/
|
|
715
|
+
width:100% !important;
|
|
716
|
+
background: -webkit-linear-gradient(#1aa2e8, #1aa2e8) no-repeat, #ddd;
|
|
717
|
+
background-size: 0% 100%;/*设置左右宽度比例*/
|
|
718
|
+
height: 6px;/*横条的高度*/
|
|
719
|
+
&::-webkit-slider-thumb {
|
|
720
|
+
-webkit-appearance: none;/*清除系统默认样式*/
|
|
721
|
+
height:16px;/*拖动块高度*/
|
|
722
|
+
width: 16px;/*拖动块宽度*/
|
|
723
|
+
background: #fff;/*拖动块背景*/
|
|
724
|
+
border-radius: 50%; /*外观设置为圆形*/
|
|
725
|
+
border: solid 1px #ddd; /*设置边框*/
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
.ac-voice-player__rote{
|
|
729
|
+
position: absolute;
|
|
730
|
+
bottom: 0;
|
|
731
|
+
left: 0;
|
|
732
|
+
}
|
|
733
|
+
.ac-voice-player__rote-btn{
|
|
734
|
+
height: 28px;
|
|
735
|
+
line-height: 28px;
|
|
736
|
+
display: inline-block;
|
|
737
|
+
vertical-align: top;
|
|
738
|
+
cursor: pointer;
|
|
739
|
+
padding: 0 6px;
|
|
740
|
+
border-radius: 3px;
|
|
741
|
+
transition: all .25s;
|
|
742
|
+
&:before {
|
|
743
|
+
content: '\500D\901F\FF1A';
|
|
744
|
+
}
|
|
745
|
+
&:after {
|
|
746
|
+
content: '';
|
|
747
|
+
vertical-align: top;
|
|
748
|
+
margin-top: 12px;
|
|
749
|
+
margin-left: 4px;
|
|
750
|
+
display: inline-block;
|
|
751
|
+
border: 4px solid #999;
|
|
752
|
+
border-left-color: transparent;
|
|
753
|
+
border-right-color: transparent;
|
|
754
|
+
border-bottom: 0;
|
|
755
|
+
}
|
|
756
|
+
&:hover {
|
|
757
|
+
background-color: #F4F5F7;
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
.ac-voice-player__download{
|
|
761
|
+
position: absolute;
|
|
762
|
+
bottom: 0;
|
|
763
|
+
right: 0;
|
|
764
|
+
height: 28px;
|
|
765
|
+
line-height: 28px;
|
|
766
|
+
display: inline-block;
|
|
767
|
+
vertical-align: top;
|
|
768
|
+
cursor: pointer;
|
|
769
|
+
padding: 0 6px;
|
|
770
|
+
border-radius: 3px;
|
|
771
|
+
transition: all .25s;
|
|
772
|
+
.ui-icon {
|
|
773
|
+
vertical-align: top;
|
|
774
|
+
display: inline-block;
|
|
775
|
+
margin-right: 3px;
|
|
776
|
+
}
|
|
777
|
+
&:after {
|
|
778
|
+
content: '\4E0B\8F7Dmp3';
|
|
779
|
+
}
|
|
780
|
+
&:hover {
|
|
781
|
+
background-color: #F4F5F7;
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
</style>
|