Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Commit

Permalink
Don't try to be too smart when constructing the playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Närhinen committed Feb 26, 2013
1 parent 2205a9e commit a1ad78b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/ext/playlist.js
Expand Up @@ -24,6 +24,9 @@ flowplayer(function(player, root) {
var indexForVideo = function(src,sources) {
var i, j;
for (i = 0; i < player.conf.playlist.length; i++) {
if (typeof player.conf.playlist[i] === 'string' && player.conf.playlist[i] === src) {
return i;
}
for (j = 0; j < player.conf.playlist[i].length; j++) {
var source = player.conf.playlist[i][j];
for (var type in source) {
Expand All @@ -47,10 +50,6 @@ flowplayer(function(player, root) {
return indexForVideo(player.video.src);
};

var getType = function(src) {
return 'video/' + src.split(TYPE_RE)[1];
};

player.next = function(e) {
e && e.preventDefault();
var current = currentClipIndex();
Expand Down Expand Up @@ -96,10 +95,7 @@ flowplayer(function(player, root) {
if (els().length) {
els().each(function() {
var src = $(this).attr('href');
var type = getType(src);
var one = {};
one[type] = src;
player.conf.playlist.push([one]);
player.conf.playlist.push(src);
});

/* click -> play */
Expand Down

0 comments on commit a1ad78b

Please sign in to comment.