Skip to content

Commit

Permalink
chore(Demo): Propagate asset.mimeType correctly (#7798)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Dec 24, 2024
1 parent 2cea8d3 commit e07beac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions demo/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ shakaDemo.Main = class {
this.dispatchEventWithName_('shaka-main-offline-progress');
const start = Date.now();
const stored = await storage.store(asset.manifestUri, metadata,
/* mimeType= */ null, asset.extraThumbnail,
asset.mimeType || null, asset.extraThumbnail,
asset.extraText).promise;
const end = Date.now();
console.log('Download time:', end - start);
Expand Down Expand Up @@ -1389,10 +1389,15 @@ shakaDemo.Main = class {
await this.player_.load(preloadManager);
} else {
const manifestUri = await this.getManifestUri_(asset);
let mimeType = undefined;
if (asset.mimeType &&
manifestUri && !manifestUri.startsWith('offline:')) {
mimeType = asset.mimeType;
}
await this.player_.load(
manifestUri,
/* startTime= */ null,
asset.mimeType || undefined);
mimeType);
}

if (this.player_.isAudioOnly() &&
Expand Down

0 comments on commit e07beac

Please sign in to comment.