Skip to content

Commit

Permalink
refactor: add option to support E-Tag and ETag to support MediaMTX v1…
Browse files Browse the repository at this point in the history
….1.0 and v1.1.1 and newer

Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Oct 7, 2023
1 parent 5f75d47 commit c208dd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/webcams/WebrtcMediaMTX.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ export default class WebrtcMediaMTX extends Mixins(BaseMixin, WebcamMixin) {
.then((res) => {
if (res.status !== 201) throw new Error('bad status code')
this.eTag = res.headers.get('ETag')
// fallback for MediaMTX v1.1.0 with broken ETag header
if (res.headers.has('E-Tag')) this.eTag = res.headers.get('E-Tag')
return res.text()
})
.then((sdp) => {
Expand Down

0 comments on commit c208dd9

Please sign in to comment.