From e40db5f27edd52d8bdf96405b8e3807618353040 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Mon, 6 Jul 2015 11:21:52 -0700 Subject: [PATCH] Fix mediaquery for contentType --- player/videojs.coffee | 10 +--------- www/js/player.js | 12 ++---------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/player/videojs.coffee b/player/videojs.coffee index bd932af0..e2748433 100644 --- a/player/videojs.coffee +++ b/player/videojs.coffee @@ -1,11 +1,3 @@ -fixContentType = (contentType) -> - # TODO: In mediaquery, fix Google Drive/Google+ to return video/mp4, - # video/webm so this is unnecessary - if /^(video|audio)\//.test(contentType) - return contentType - else - return "video/#{contentType}" - sortSources = (sources) -> if not sources console.error('sortSources() called with null source list') @@ -25,7 +17,7 @@ sortSources = (sources) -> flv = [] nonflv = [] sources[quality].forEach((source) -> - source.contentType = fixContentType(source.contentType) + source.contentType = source.contentType source.quality = quality if source.contentType == 'video/flv' flv.push(source) diff --git a/www/js/player.js b/www/js/player.js index 3175ffb0..0308c9fe 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -1,5 +1,5 @@ (function() { - var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, HITBOX_ERROR, HitboxPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, fixContentType, genParam, sortSources, + var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, HITBOX_ERROR, HitboxPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, genParam, sortSources, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; @@ -444,14 +444,6 @@ })(Player); - fixContentType = function(contentType) { - if (/^(video|audio)\//.test(contentType)) { - return contentType; - } else { - return "video/" + contentType; - } - }; - sortSources = function(sources) { var flv, flvOrder, i, idx, len, nonflv, pref, qualities, quality, qualityOrder, sourceOrder; if (!sources) { @@ -473,7 +465,7 @@ flv = []; nonflv = []; sources[quality].forEach(function(source) { - source.contentType = fixContentType(source.contentType); + source.contentType = source.contentType; source.quality = quality; if (source.contentType === 'video/flv') { return flv.push(source);