|
1 | 1 | <template>
|
2 |
| - <div class="audio-player-wrapper"> |
3 |
| - <div class="audio-player-controls"> |
4 |
| - <span v-if="isPlaying" @click="togglePlay"> |
5 |
| - <svg class="audio-player-button" width="12px" height="18px" viewBox="0 0 12 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
6 |
| - <g id="Pause" stroke="none" stroke-width="1" fill-rule="nonzero"> |
7 |
| - <path d="M4.61538462,17.351355 C4.61538462,17.7095549 4.33986449,18 4,18 L0.615384615,18 C0.275520128,18 0,17.7095885 0,17.351355 L0,0.648645015 C0,0.290411481 0.275520128,0 0.615384615,0 L4,0 C4.33986449,0 4.61538462,0.290411481 4.61538462,0.648645015 L4.61538462,17.351355 Z" id="Shape"></path> |
8 |
| - <path d="M12,17.351355 C12,17.7095549 11.7244799,18 11.3846154,18 L8,18 C7.66013551,18 7.38461538,17.7095885 7.38461538,17.351355 L7.38461538,0.648645015 C7.38461538,0.290411481 7.66013551,0 8,0 L11.3846154,0 C11.7244799,0 12,0.290411481 12,0.648645015 L12,17.351355 Z" id="Shape"></path> |
| 2 | + <div :class="'bubble ' + position"> |
| 3 | + <div class="audio-player-wrapper"> |
| 4 | + <div class="audio-player-controls"> |
| 5 | + <span v-if="isPlaying" @click="togglePlay"> |
| 6 | + <svg class="audio-player-button" width="12px" height="18px" viewBox="0 0 12 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 7 | + <g id="Pause" stroke="none" stroke-width="1" fill-rule="nonzero"> |
| 8 | + <path d="M4.61538462,17.351355 C4.61538462,17.7095549 4.33986449,18 4,18 L0.615384615,18 C0.275520128,18 0,17.7095885 0,17.351355 L0,0.648645015 C0,0.290411481 0.275520128,0 0.615384615,0 L4,0 C4.33986449,0 4.61538462,0.290411481 4.61538462,0.648645015 L4.61538462,17.351355 Z" id="Shape"></path> |
| 9 | + <path d="M12,17.351355 C12,17.7095549 11.7244799,18 11.3846154,18 L8,18 C7.66013551,18 7.38461538,17.7095885 7.38461538,17.351355 L7.38461538,0.648645015 C7.38461538,0.290411481 7.66013551,0 8,0 L11.3846154,0 C11.7244799,0 12,0.290411481 12,0.648645015 L12,17.351355 Z" id="Shape"></path> |
| 10 | + </g> |
| 11 | + </svg> |
| 12 | + </span> |
| 13 | + <span v-else @click="togglePlay"> |
| 14 | + <svg class="audio-player-button" width="14px" height="18px" viewBox="0 0 14 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 15 | + <g id="Play" stroke="none" stroke-width="1" fill-rule="evenodd"> |
| 16 | + <path d="M13.3805199,7.82862117 C14.2064934,8.35374536 14.2064934,9.64760806 13.3805199,10.1700254 L1.21459333,17.8790651 C0.677273234,18.2201251 0,17.7992137 0,17.1238607 L0,0.876139285 C0,0.200786266 0.677273234,-0.220125134 1.21459333,0.120934907 L13.3805199,7.82862117 Z" id="play-copy-3"></path> |
9 | 17 | </g>
|
10 |
| - </svg> |
11 |
| - </span> |
12 |
| - <span v-else @click="togglePlay"> |
13 |
| - <svg class="audio-player-button" width="14px" height="18px" viewBox="0 0 14 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> |
14 |
| - <g id="Play" stroke="none" stroke-width="1" fill-rule="evenodd"> |
15 |
| - <path d="M13.3805199,7.82862117 C14.2064934,8.35374536 14.2064934,9.64760806 13.3805199,10.1700254 L1.21459333,17.8790651 C0.677273234,18.2201251 0,17.7992137 0,17.1238607 L0,0.876139285 C0,0.200786266 0.677273234,-0.220125134 1.21459333,0.120934907 L13.3805199,7.82862117 Z" id="play-copy-3"></path> |
16 |
| - </g> |
17 |
| - </svg> |
18 |
| - </span> |
19 |
| - <div class="audio-player-bar"> |
20 |
| - <div class="slider" data-direction="horizontal" ref="audioSlider"> |
21 |
| - <div class="progress" ref="audioProgress"> |
22 |
| - <div class="pin" id="progress-pin" data-method="rewind"></div> |
| 18 | + </svg> |
| 19 | + </span> |
| 20 | + <div class="audio-player-bar"> |
| 21 | + <div class="slider" data-direction="horizontal" ref="audioSlider"> |
| 22 | + <div class="progress" ref="audioProgress"> |
| 23 | + <div class="pin" id="progress-pin" data-method="rewind"></div> |
| 24 | + </div> |
| 25 | + </div> |
| 26 | + <input class="audio-player-range" type="range" :value="this.currentTime" :max="this.totalTime" @input="setAudioPosition($event)" @change="setAudioPosition($event)"> |
| 27 | + <div class="audio-player-time"> |
| 28 | + <span>{{getTimeFromSeconds(this.currentTime)}}</span> |
| 29 | + <span>{{getTimeFromSeconds(this.totalTime)}}</span> |
23 | 30 | </div>
|
24 |
| - </div> |
25 |
| - <input class="audio-player-range" type="range" :value="this.currentTime" :max="this.totalTime" @input="setAudioPosition($event)" @change="setAudioPosition($event)"> |
26 |
| - <div class="audio-player-time"> |
27 |
| - <span>{{getTimeFromSeconds(this.currentTime)}}</span> |
28 |
| - <span>{{getTimeFromSeconds(this.totalTime)}}</span> |
29 | 31 | </div>
|
30 | 32 | </div>
|
31 | 33 | </div>
|
32 | 34 | </div>
|
33 |
| - |
34 | 35 | </template>
|
35 | 36 |
|
36 | 37 | <script>
|
|
0 commit comments