Skip to content

Commit

Permalink
fix(FEC-8555): phoenix provider live detection (#64)
Browse files Browse the repository at this point in the history
From Phoenix 5.1
the API will result in new Object Type that expose live Media involved and should named "KalturaLiveAsset" instead of "KalturaLinearMediaAsset" that is not relevant any more.

As well as checking that externalIds not containing the string "0".
  • Loading branch information
Dan Ziv authored Oct 14, 2018
1 parent ef448fa commit c857176
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/k-provider/ott/provider-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ import {SupportedStreamFormat} from '../../entities/media-format';
import KalturaDrmPlaybackPluginData from '../common/response-types/kaltura-drm-playback-plugin-data';
import BaseProviderParser from '../common/base-provider-parser';

const LIVE_ASST_OBJECT_TYPE: string = 'KalturaLinearMediaAsset';
const LIVE_ASST_OBJECT_TYPE: string = 'KalturaLiveAsset';

const MediaTypeCombinations: {[mediaType: string]: Object} = {
[KalturaAsset.Type.MEDIA]: {
[KalturaPlaybackContext.Type.TRAILER]: () => ({type: MediaEntry.Type.VOD}),
[KalturaPlaybackContext.Type.PLAYBACK]: mediaAssetData => {
if (mediaAssetData.externalIds || mediaAssetData.objectType === LIVE_ASST_OBJECT_TYPE) {
if (parseInt(mediaAssetData.externalIds) > 0 || mediaAssetData.objectType === LIVE_ASST_OBJECT_TYPE) {
return {type: MediaEntry.Type.LIVE, dvrStatus: 0};
}
return {type: MediaEntry.Type.VOD};
Expand Down

0 comments on commit c857176

Please sign in to comment.