mirror of
https://github.com/bluenviron/mediamtx
synced 2025-01-10 08:59:57 +00:00
parent
4f098cbdf3
commit
815fa0586a
@ -190,7 +190,7 @@ class Transmitter {
|
|||||||
start() {
|
start() {
|
||||||
console.log("requesting ICE servers");
|
console.log("requesting ICE servers");
|
||||||
|
|
||||||
fetch('whip', {
|
fetch(new URL('whip', window.location.href), {
|
||||||
method: 'OPTIONS',
|
method: 'OPTIONS',
|
||||||
})
|
})
|
||||||
.then((res) => this.onIceServers(res))
|
.then((res) => this.onIceServers(res))
|
||||||
@ -227,7 +227,7 @@ class Transmitter {
|
|||||||
'&audio_codec=' + audioCodec +
|
'&audio_codec=' + audioCodec +
|
||||||
'&video_bitrate=' + videoBitrate;
|
'&video_bitrate=' + videoBitrate;
|
||||||
|
|
||||||
fetch('whip' + params, {
|
fetch(new URL('whip', window.location.href) + params, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/sdp',
|
'Content-Type': 'application/sdp',
|
||||||
@ -293,7 +293,7 @@ class Transmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendLocalCandidates(candidates) {
|
sendLocalCandidates(candidates) {
|
||||||
fetch('whip', {
|
fetch(new URL('whip', window.location.href), {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/trickle-ice-sdpfrag',
|
'Content-Type': 'application/trickle-ice-sdpfrag',
|
||||||
|
@ -104,7 +104,7 @@ class WHEPClient {
|
|||||||
start() {
|
start() {
|
||||||
console.log("requesting ICE servers");
|
console.log("requesting ICE servers");
|
||||||
|
|
||||||
fetch('whep', {
|
fetch(new URL('whep', window.location.href), {
|
||||||
method: 'OPTIONS',
|
method: 'OPTIONS',
|
||||||
})
|
})
|
||||||
.then((res) => this.onIceServers(res))
|
.then((res) => this.onIceServers(res))
|
||||||
@ -138,7 +138,7 @@ class WHEPClient {
|
|||||||
|
|
||||||
console.log("sending offer");
|
console.log("sending offer");
|
||||||
|
|
||||||
fetch('whep', {
|
fetch(new URL('whep', window.location.href), {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/sdp',
|
'Content-Type': 'application/sdp',
|
||||||
@ -204,7 +204,7 @@ class WHEPClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendLocalCandidates(candidates) {
|
sendLocalCandidates(candidates) {
|
||||||
fetch('whep', {
|
fetch(new URL('whep', window.location.href), {
|
||||||
method: 'PATCH',
|
method: 'PATCH',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/trickle-ice-sdpfrag',
|
'Content-Type': 'application/trickle-ice-sdpfrag',
|
||||||
|
Loading…
Reference in New Issue
Block a user