diff --git a/lib/channel/mediarefresher.js b/lib/channel/mediarefresher.js index 3cddc24e..a79c4141 100644 --- a/lib/channel/mediarefresher.js +++ b/lib/channel/mediarefresher.js @@ -89,6 +89,7 @@ MediaRefresherModule.prototype.refreshGoogleDocs = function (media, cb) { case "Video not found": case "Private video": case "Google Docs error: Video has exceeded quota": + case "There is currently a bug with Google Drive which prevents playback of videos 1 hour long or longer.": self.channel.logger.log("[mediarefresher] Google Docs refresh failed: " + err); self.channel.activeLock.release(); @@ -137,6 +138,7 @@ MediaRefresherModule.prototype.initGooglePlus = function (media, cb) { case "HTTP 302": case "Video not found": case "Private video": + case "Unable to retreive duration from Google+. This might be because the video is still processing.": self.channel.logger.log("[mediarefresher] Google+ refresh failed: " + err); self.channel.activeLock.release(); diff --git a/www/js/player.js b/www/js/player.js index 61cc673f..1ffc767d 100644 --- a/www/js/player.js +++ b/www/js/player.js @@ -863,6 +863,29 @@ var CustomPlayer = function (data) { removeOld(); var div = $("#ytapiplayer"); div.attr("id", ""); + + /* + * 2014-12-10 + * + * If a user is connected via HTTPS and the custom link is + * HTTP, then the embed fails due to mixed active content + * policy. Display a message indicating this. + */ + if (location.protocol.match(/^https/) && + self.videoId.match(/http:/)) { + + div.html("You are currently connected via HTTPS but " + + "the custom embed link uses non-secure HTTP. " + + "Your browser may therefore block it from loading. " + + "To fix this, either add the custom embed as a secure " + + "URL (https://...) if the source supports it, or " + + "visit this page over plain HTTP (your websocket will still " + + "use secure HTTPS for communication, just the page " + + "will load over plain HTTP)."); + + // Try to salvage the link + self.videoId = self.videoId.replace(/http:/g, "https:"); + } div.append(self.videoId); self.player = div.find("iframe");