mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Fix live stream check
This commit is contained in:
@@ -33,7 +33,8 @@
|
|||||||
status.playerState === PlayerState.PAUSED;
|
status.playerState === PlayerState.PAUSED;
|
||||||
|
|
||||||
$: hasDuration = status.media?.duration && status.media?.duration > 0;
|
$: hasDuration = status.media?.duration && status.media?.duration > 0;
|
||||||
$: isLive = status.supportedMediaCommands & _MediaCommand.SEEK;
|
$: isSeekable = status.supportedMediaCommands & _MediaCommand.SEEK;
|
||||||
|
$: isLive = status.media?.streamType === StreamType.LIVE;
|
||||||
|
|
||||||
let mediaTitle: Optional<string>;
|
let mediaTitle: Optional<string>;
|
||||||
let mediaSubtitle: Optional<string>;
|
let mediaSubtitle: Optional<string>;
|
||||||
@@ -170,9 +171,9 @@
|
|||||||
|
|
||||||
<div class="media__controls">
|
<div class="media__controls">
|
||||||
<!-- Seek bar -->
|
<!-- Seek bar -->
|
||||||
{#if status.media && status.media?.duration && hasDuration && isLive}
|
{#if status.media && status.media?.duration && hasDuration && isSeekable}
|
||||||
<div class="media__seek">
|
<div class="media__seek">
|
||||||
{#if status.media?.streamType === StreamType.LIVE}
|
{#if isLive}
|
||||||
<span class="media__live">
|
<span class="media__live">
|
||||||
{_("popupMediaLive")}
|
{_("popupMediaLive")}
|
||||||
</span>
|
</span>
|
||||||
@@ -289,7 +290,7 @@
|
|||||||
</select>
|
</select>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if !(status.supportedMediaCommands & _MediaCommand.SEEK) && isLive}
|
{#if isLive && !isSeekable}
|
||||||
<span class="media__live">
|
<span class="media__live">
|
||||||
{_("popupMediaLive")}
|
{_("popupMediaLive")}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user