Skip to content

Commit

Permalink
Add protocol in stream's manifestInfo in order to enable protocol det…
Browse files Browse the repository at this point in the history
…ection once stream is loaded (to distinguish DASH from MSS streams) (#3266)
  • Loading branch information
Bertrand Berthelot committed May 28, 2020
1 parent 5f0d9b5 commit 294406b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.d.ts
Expand Up @@ -800,14 +800,15 @@ declare namespace dashjs {
loadedTime: Date;
maxFragmentDuration: number;
minBufferTime: number;
protocol?: string;
}

export class StreamInfo {
id: string;
index: number;
start: number;
duration: number;
manifestInfo: object;
manifestInfo: IManifestInfo;
isLast: boolean;
}

Expand Down
1 change: 1 addition & 0 deletions src/dash/DashAdapter.js
Expand Up @@ -586,6 +586,7 @@ function DashAdapter() {
manifestInfo.duration = dashManifestModel.getDuration(mpd.manifest);
manifestInfo.isDynamic = dashManifestModel.getIsDynamic(mpd.manifest);
manifestInfo.serviceDescriptions = dashManifestModel.getServiceDescriptions(mpd.manifest);
manifestInfo.protocol = mpd.manifest.protocol;

return manifestInfo;
}
Expand Down
2 changes: 2 additions & 0 deletions src/dash/parser/DashParser.js
Expand Up @@ -99,6 +99,8 @@ function DashParser() {
const ironedTime = window.performance.now();
logger.info('Parsing complete: ( xml2json: ' + (jsonTime - startTime).toPrecision(3) + 'ms, objectiron: ' + (ironedTime - jsonTime).toPrecision(3) + 'ms, total: ' + ((ironedTime - startTime) / 1000).toPrecision(3) + 's)');

manifest.protocol = 'DASH';

return manifest;
}

Expand Down

0 comments on commit 294406b

Please sign in to comment.