Skip to content

Commit

Permalink
video-player-widget: Split status messages with \\n, to improve tex…
Browse files Browse the repository at this point in the history
…t formatting.
  • Loading branch information
rafaellehmkuhl authored and ArturoManzoli committed Jul 26, 2024
1 parent 6f532f1 commit e101ea2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/widgets/VideoPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@
<div class="no-video-alert">
<p>
<span class="text-xl font-bold">Server status: </span>
<span>{{ serverStatus }}</span>
<span v-for="(statusParagraph, i) in serverStatus.toString().split('\\n')" :key="i">
{{ statusParagraph }}
<br />
</span>
</p>
<p>
<span class="text-xl font-bold">Stream status: </span>
<span>{{ streamStatus }}</span>
<span v-for="(statusParagraph, i) in streamStatus.toString().split('\\n')" :key="i">
{{ statusParagraph }}
<br />
</span>
</p>
</div>
</div>
Expand Down Expand Up @@ -206,7 +212,7 @@ const streamStatus = computed(() => {
const availableSources = videoStore.availableIceIps
if (!availableSources.isEmpty() && !availableSources.find((ip) => videoStore.allowedIceIps.includes(ip))) {
return `Stream is coming from IPs [${availableSources.join(', ')}], which are not in the list of allowed sources
[${videoStore.allowedIceIps.join(', ')}]. Please check your configuration.`
[${videoStore.allowedIceIps.join(', ')}].\\n Please check your configuration.`
}
return videoStore.getStreamData(nameSelectedStream.value)?.webRtcManager.streamStatus ?? 'Unknown.'
})
Expand Down

0 comments on commit e101ea2

Please sign in to comment.