Skip to content

Commit

Permalink
[K8sBroadcaster] Pass baseUrl to the whepClient
Browse files Browse the repository at this point in the history
  • Loading branch information
mickel8 committed Jan 22, 2025
1 parent 9ffafd8 commit e46f1ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions k8s_broadcaster/assets/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function connectSignaling(view) {
async function connectInput(view) {
let whepEndpoint;
if (view.url) {
whepEndpoint = view.url + "api/whep";
whepEndpoint = view.url;
} else {
whepEndpoint = view.whepEndpointBase;
}
Expand Down Expand Up @@ -836,7 +836,7 @@ export const Home = {
view.recorder = {};

// declare custom fields
view.whepEndpointBase = `${window.location.origin}/api/whep`;
view.whepEndpointBase = `${window.location.origin}`;
view.defaultLayer = "h";
view.url = undefined;
view.inputId = undefined;
Expand Down
2 changes: 1 addition & 1 deletion k8s_broadcaster/assets/js/whep_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class WHEPClient {
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);

const response = await fetch(this.url, {
const response = await fetch(this.url + "/api/whep", {
method: 'POST',
cache: 'no-cache',
headers: {
Expand Down

0 comments on commit e46f1ba

Please sign in to comment.