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

Bug #3406 - use mediatypes.js to get media info if saved JSON has an inv... #1599

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

cadecairos
Copy link
Contributor

@@ -589,6 +641,13 @@
if ( importData.duration >= 0 ) {
_duration = importData.duration;
_this.url = "#t=," + _duration;
doImportTracks();
} else {
MediaTypes.getMetaData( importData.url[ 0 ], function success( data ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is importData.url isn't an array at this point? We have code at that checks if it is or not. We might need to move this down here to happen before.

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 Matt is right here.

I think we can do better to move this check lower down.

var firstSource;

// If sources is a single array and of type null player, don't bother making a sequence.
if ( url.length > 1 || !( /#t=\d*,?\d+?/ ).test( url[ 0 ] ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this use mediaTypes.checkUrl

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