-
Notifications
You must be signed in to change notification settings - Fork 795
Map legacy AVC codecs to their modern equivalents when excluding inco… #940
Map legacy AVC codecs to their modern equivalents when excluding inco… #940
Conversation
…mpatible playlists
@@ -72,6 +73,12 @@ const parseCodecs = function(codecs) { | |||
return result; | |||
}; | |||
|
|||
export const mapLegacyAvcCodecs = (codecString) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really affect anything since this function doesn't use this
, but I think it's safer to not use arrow function syntax for top level functions just because it creates special behavior
@@ -72,6 +73,12 @@ const parseCodecs = function(codecs) { | |||
return result; | |||
}; | |||
|
|||
export const mapLegacyAvcCodecs = (codecString) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsdoc comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why export this if it's only used in this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exported for unit tests
Updated |
* @param codecString {String} the codec string | ||
* @return {String} the codec string with old apple-style codecs replaced | ||
*/ | ||
export const mapLegacyAvcCodecs = function(codecString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an underscore and @Private to this since we don't want this to be a part of the api that we are exposing
@@ -7,6 +7,7 @@ import Ranges from './ranges'; | |||
import videojs from 'video.js'; | |||
import AdCueTags from './ad-cue-tags'; | |||
import SyncController from './sync-controller'; | |||
import { translateLegacyCodecs } from 'videojs-contrib-media-sources/es5/codec-utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should plan to not do a deep import in the future, but it is ok for now
LGTM |
…mpatible playlists
Requirements Checklist