mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-25 13:04:23 +00:00
do some work on fancyView and player
This commit is contained in:
@@ -3,7 +3,13 @@
|
|||||||
<span class="material-symbols-outlined fancy-view-song-art" v-if="!song.hasCoverArt">music_note</span>
|
<span class="material-symbols-outlined fancy-view-song-art" v-if="!song.hasCoverArt">music_note</span>
|
||||||
<img v-else :src="'http://localhost:8081/getSongCover?filename=' + song.filename" class="fancy-view-song-art">
|
<img v-else :src="'http://localhost:8081/getSongCover?filename=' + song.filename" class="fancy-view-song-art">
|
||||||
<button @click="exit()" id="exit-button"><span class="material-symbols-outlined" style="font-size: 4vh;">close</span></button>
|
<button @click="exit()" id="exit-button"><span class="material-symbols-outlined" style="font-size: 4vh;">close</span></button>
|
||||||
<div class="controls"></div>
|
<div class="controls">
|
||||||
|
<div>
|
||||||
|
<div style="margin-right: auto;">{{ playbackPosBeautified }}</div>
|
||||||
|
<div>{{ durationBeautified }}</div>
|
||||||
|
</div>
|
||||||
|
<sliderView :active="audioLoaded" :position="playbackPos" :duration="song.duration" @pos="( p ) => { setPos( p ) }"></sliderView>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,18 +45,43 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import SliderView from './sliderView.vue';
|
||||||
export default {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
control ( instruction ) {
|
control ( instruction, value ) {
|
||||||
|
|
||||||
|
},
|
||||||
|
setPos ( pos ) {
|
||||||
|
this.$emit( 'posUpdate', pos );
|
||||||
},
|
},
|
||||||
exit() {
|
exit() {
|
||||||
this.$emit( 'control', 'exitFancyView' );
|
this.$emit( 'control', 'exitFancyView' );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
SliderView,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
song: {
|
song: {
|
||||||
type: Object,
|
type: Object,
|
||||||
|
},
|
||||||
|
playbackPos: {
|
||||||
|
type: Number,
|
||||||
|
},
|
||||||
|
playbackPosBeautified: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
durationBeautified: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
|
shuffle: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
isPlaying: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
repeatMode: {
|
||||||
|
type: String,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<sliderView :active="audioLoaded" :position="playbackPos" :duration="playingSong.duration" @pos="( p ) => { setPos( p ) }"></sliderView>
|
<sliderView :active="audioLoaded" :position="playbackPos" :duration="playingSong.duration" @pos="( p ) => { setPos( p ) }"></sliderView>
|
||||||
</div>
|
</div>
|
||||||
<FancyView v-if="isShowingFancyView" :song="playingSong" @control="instruction => { control( instruction ) }" :playing="isPlaying"></FancyView>
|
<FancyView v-if="isShowingFancyView" :song="playingSong" @control="instruction => { control( instruction ) }" :isPlaying="isPlaying"
|
||||||
|
:shuffle="isShuffleEnabled" :repeatMode="repeatMode" :durationBeautified="durationBeautified"
|
||||||
|
:playbackPos="playbackPos" :playbackPosBeautified="playbackPosBeautified"
|
||||||
|
@posUpdate="pos => { setPos( pos ) }"></FancyView>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user