Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

Map legacy AVC codecs to their modern equivalents when excluding inco… #940

Merged
merged 4 commits into from
Dec 22, 2016

Conversation

gesinger
Copy link
Contributor

…mpatible playlists

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@@ -72,6 +73,12 @@ const parseCodecs = function(codecs) {
return result;
};

export const mapLegacyAvcCodecs = (codecString) => {
Copy link
Contributor

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) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsdoc comment?

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exported for unit tests

@gesinger
Copy link
Contributor Author

Updated

* @param codecString {String} the codec string
* @return {String} the codec string with old apple-style codecs replaced
*/
export const mapLegacyAvcCodecs = function(codecString) {
Copy link
Contributor

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';
Copy link
Contributor

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

@mjneil
Copy link
Contributor

mjneil commented Dec 22, 2016

LGTM

@gesinger gesinger merged commit cb9c954 into videojs:master Dec 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants