Skip to content

Commit

Permalink
fix: changed endpoint for vtt dummy and slice endpoint
Browse files Browse the repository at this point in the history
no need to use a channel specific endpoint url for these functions
  • Loading branch information
birme committed May 11, 2023
1 parent 170e2e8 commit a0f4d9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engine/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const sessionsLive = {}; // Should be a persistent store...
const sessionSwitchers = {}; // Should be a persistent store...
const switcherStatus = {}; // Should be a persistent store...
const eventStreams = {};
const DefaultDummySubtitleEndpointPath = "dummyUrl"
const DefaultSubtitleSpliceEndpointPath = "sliceUrl"
const DefaultDummySubtitleEndpointPath = "/vtt/dummyUrl"
const DefaultSubtitleSpliceEndpointPath = "/vtt/sliceUrl"

export interface ChannelEngineOpts {
defaultSlateUri?: string;
Expand Down Expand Up @@ -335,8 +335,8 @@ export class ChannelEngine {
this.server.get('/health', this._handleAggregatedSessionHealth.bind(this));
this.server.get('/health/:sessionId', this._handleSessionHealth.bind(this));
this.server.get('/reset', this._handleSessionReset.bind(this));
this.server.get('/channels/:channelId/' + this.dummySubtitleEndpoint, this._handleDummySubtitleEndpoint.bind(this));
this.server.get('/channels/:channelId/' + this.subtitleSliceEndpoint, this._handleSubtitleSliceEndpoint.bind(this));
this.server.get(this.dummySubtitleEndpoint, this._handleDummySubtitleEndpoint.bind(this));
this.server.get(this.subtitleSliceEndpoint, this._handleSubtitleSliceEndpoint.bind(this));

this.server.on('NotFound', (req, res, err, next) => {
res.header("X-Instance-Id", this.instanceId + `<${version}>`);
Expand Down

0 comments on commit a0f4d9f

Please # to comment.