Skip to content

Commit

Permalink
fix: always add a / at last char to stream url
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Sep 16, 2023
1 parent 0eeb2f0 commit f928bb1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/webcams/WebrtcMediaMTX.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export default class WebrtcMediaMTX extends Mixins(BaseMixin, WebcamMixin) {
}
get url() {
let baseUrl = new URL('whep', this.camSettings.stream_url).toString()
let baseUrl = this.camSettings.stream_url
if (!baseUrl.endsWith('/')) baseUrl += '/'
baseUrl = new URL('whep', baseUrl).toString()
return this.convertUrl(baseUrl, this.printerUrl)
}
Expand Down

0 comments on commit f928bb1

Please sign in to comment.