mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 18:06:04 -05:00
[web-src] add fast skip fwd/back on now playing
Conflicts: web-src/src/pages/PageNowPlaying.vue
This commit is contained in:
parent
b298fc1170
commit
cb6b1919a8
25
web-src/src/components/PlayerButtonSkipBack.vue
Normal file
25
web-src/src/components/PlayerButtonSkipBack.vue
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<a v-on:click="play_skip_back">
|
||||||
|
<span class="icon"><i class="mdi mdi-replay"></i></span>
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import webapi from '@/webapi'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlayerButtonSkipBack',
|
||||||
|
props: [ 'when_ms' ],
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
play_skip_back: function () {
|
||||||
|
if (this.$store.state.player.state !== 'stop') {
|
||||||
|
webapi.player_seek(this.when_ms - 10000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
25
web-src/src/components/PlayerButtonSkipFwd.vue
Normal file
25
web-src/src/components/PlayerButtonSkipFwd.vue
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<a v-on:click="play_skip_fwd">
|
||||||
|
<span class="icon"><i class="mdi mdi-flip-h mdi-replay"></i></span>
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import webapi from '@/webapi'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PlayerButtonSkipFwd',
|
||||||
|
props: [ 'when_ms' ],
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
play_skip_fwd: function () {
|
||||||
|
if (this.$store.state.player.state !== 'stop') {
|
||||||
|
webapi.player_seek(this.when_ms + 10000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
Loading…
x
Reference in New Issue
Block a user