Skip to content

Commit

Permalink
fix(FEC-7186): support external/universal live entries (#29)
Browse files Browse the repository at this point in the history
add support for extracting mimetype for sources without flavor ids
  • Loading branch information
OrenMe committed Sep 25, 2017
1 parent 8ce83c7 commit b4f143e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/k-provider/ovp/provider-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,15 @@ export default class ProviderParser {
if (kalturaSource) {
let playUrl: string = "";
let mediaFormat = SUPPORTED_FORMATS.get(kalturaSource.format);
let extension: string = "";
if (mediaFormat) {
extension = mediaFormat.pathExt;
mediaSource.mimetype = mediaFormat.mimeType;
}
// in case playbackSource doesn't have flavors we don't need to build the url and we'll use the provided one.
if (kalturaSource.hasFlavorIds()) {
let extension: string = "";
if (!mediaFormat) {
if (flavorAssets && flavorAssets.length > 0) {
extension = flavorAssets[0].fileExt;
}
}
else {
extension = mediaFormat.pathExt;
mediaSource.mimetype = mediaFormat.mimeType;
if (!extension && flavorAssets && flavorAssets.length > 0) {
extension = flavorAssets[0].fileExt;
}

playUrl = PlaySourceUrlBuilder.build({
Expand Down

0 comments on commit b4f143e

Please sign in to comment.