diff --git a/src/inputs/file_http.c b/src/inputs/file_http.c index 6864e103..ca570ecb 100644 --- a/src/inputs/file_http.c +++ b/src/inputs/file_http.c @@ -120,6 +120,15 @@ seek(struct input_source *source, int seek_ms) return transcode_seek(source->input_ctx, seek_ms); } +static int +seek_http(struct input_source *source, int seek_ms) +{ + // stream is live/unknown length so obvs can't seek + if (source->len_ms == 0) + return -1; + return transcode_seek(source->input_ctx, seek_ms); +} + static int metadata_get_http(struct input_metadata *metadata, struct input_source *source) { @@ -168,4 +177,5 @@ struct input_definition input_http = .play = play, .stop = stop, .metadata_get = metadata_get_http, + .seek = seek_http }; diff --git a/web-src/src/components/PlayerButtonPlayPause.vue b/web-src/src/components/PlayerButtonPlayPause.vue index 7b6ecb3a..5b95a5b8 100644 --- a/web-src/src/components/PlayerButtonPlayPause.vue +++ b/web-src/src/components/PlayerButtonPlayPause.vue @@ -18,7 +18,10 @@ export default { }, is_pause_allowed () { - return this.$store.getters.now_playing && this.$store.getters.now_playing.data_kind !== 'url' && this.$store.getters.now_playing.data_kind !== 'pipe' + return this.$store.getters.now_playing && + (this.$store.getters.now_playing.data_kind === 'file' || + ((this.$store.getters.now_playing.data_kind === 'url' && this.$store.state.player.item_length_ms !== 0) && this.$store.getters.now_playing.data_kind !== 'pipe') + ) } },