Hide viewer count when offline (#1091)
* Hide viewer count when offline * cleanup
This commit is contained in:
parent
e396207c08
commit
2659dc3646
@ -227,6 +227,11 @@ export default class VideoOnly extends Component {
|
|||||||
|
|
||||||
const { logo = TEMP_IMAGE, customStyles } = configData;
|
const { logo = TEMP_IMAGE, customStyles } = configData;
|
||||||
|
|
||||||
|
const viewerCountMessage =
|
||||||
|
streamOnline && viewerCount > 0
|
||||||
|
? html`${viewerCount} ${pluralize('viewer', viewerCount)}`
|
||||||
|
: null;
|
||||||
|
|
||||||
const mainClass = playerActive ? 'online' : '';
|
const mainClass = playerActive ? 'online' : '';
|
||||||
|
|
||||||
const poster = isPlaying
|
const poster = isPlaying
|
||||||
@ -257,9 +262,7 @@ export default class VideoOnly extends Component {
|
|||||||
class="flex text-center flex-row justify-between font-mono py-2 px-8 bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid"
|
class="flex text-center flex-row justify-between font-mono py-2 px-8 bg-gray-900 text-indigo-200 shadow-md border-b border-gray-100 border-solid"
|
||||||
>
|
>
|
||||||
<span>${streamStatusMessage}</span>
|
<span>${streamStatusMessage}</span>
|
||||||
<span id="stream-viewer-count"
|
<span id="stream-viewer-count">${viewerCountMessage}</span>
|
||||||
>${viewerCount} ${pluralize('viewer', viewerCount)}.</span
|
|
||||||
>
|
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user