diff --git a/lib/flowplayer/README.txt b/lib/flowplayer/README.txt index 742633c27a5..1375e00f505 100644 --- a/lib/flowplayer/README.txt +++ b/lib/flowplayer/README.txt @@ -1,8 +1,34 @@ Version history: +3.2.16 +------ +- #15 fixes for #627, handle the display init on startup. +- #615 dispatch begin if in paused mode too early. +- #629 if start has been dispatched already prevent dispatching many begin events. +- #20 for the free player swap the logo with the stage video mask to display underneath not on top. +- #42 pass in stream clips through and close the stream before returning to the parent clip. +- #52 when replaying flag start has dispatched on the current clip. +- #44 fixes for #627 check if the stagevideo dimensions and positioning has changed to update the stage video mask with. +- unbinding and binding stage video events caused issues with instream playlists therefore has to be kept binded. + unbinded stage video events during seeking to prevent the mask repositioning. +- #53 update url filter to accomodate for pretty urls with semi colons. +- #50 if we have metadata already set it is being updated during seeks and switching, dispatch metadata change events instead. + +3.2.15 +------ +- #614 when the clip ends if the next clip in the provider has a different provider close the provider stream. +- #627 only detach / attach the display on start events which causes issues in buffering events after a seek in stagevideo. +- #627 re-enable stagevideo state change listeners if stagevideo is available or detach the fullscreen events on first call. +- #9 when replaying from stopping, connection does not receive callbacks anymore. + + + + 3.2.13 ------ - Updated to automatically load the latest controls and audio plugins +- #612 add some logging for the stagevideo render state to determine what mode the hardware acceleration is in for various systems. +- #628 opera browsers do not return filesize correctly for latest flash players so require to use load completion instead which may help with gzipped files also. 3.2.12 ------ diff --git a/lib/flowplayer/flowplayer-3.2.11.js b/lib/flowplayer/flowplayer-3.2.11.js deleted file mode 100644 index c6e51cf5061..00000000000 --- a/lib/flowplayer/flowplayer-3.2.11.js +++ /dev/null @@ -1,1004 +0,0 @@ -/* - * flowplayer.js 3.2.11. The Flowplayer API - * - * Copyright 2009-2011 Flowplayer Oy - * - * This file is part of Flowplayer. - * - * Flowplayer is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Flowplayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Flowplayer. If not, see . - * - * Date: 2012-06-16 10:34:45 -0400 (Sat, 16 Jun 2012) - * Revision: 808 - */ -(function () { - function g(o) { - console.log("$f.fireEvent", [].slice.call(o)) - } - - function k(q) { - if (!q || typeof q != "object") { - return q - } - var o = new q.constructor(); - for (var p in q) { - if (q.hasOwnProperty(p)) { - o[p] = k(q[p]) - } - } - return o - } - - function m(t, q) { - if (!t) { - return - } - var o, p = 0, r = t.length; - if (r === undefined) { - for (o in t) { - if (q.call(t[o], o, t[o]) === false) { - break - } - } - } else { - for (var s = t[0]; p < r && q.call(s, p, s) !== false; s = t[++p]) { - } - } - return t - } - - function c(o) { - return document.getElementById(o) - } - - function i(q, p, o) { - if (typeof p != "object") { - return q - } - if (q && p) { - m(p, function (r, s) { - if (!o || typeof s != "function") { - q[r] = s - } - }) - } - return q - } - - function n(s) { - var q = s.indexOf("."); - if (q != -1) { - var p = s.slice(0, q) || "*"; - var o = s.slice(q + 1, s.length); - var r = []; - m(document.getElementsByTagName(p), function () { - if (this.className && this.className.indexOf(o) != -1) { - r.push(this) - } - }); - return r - } - } - - function f(o) { - o = o || window.event; - if (o.preventDefault) { - o.stopPropagation(); - o.preventDefault() - } else { - o.returnValue = false; - o.cancelBubble = true - } - return false - } - - function j(q, o, p) { - q[o] = q[o] || []; - q[o].push(p) - } - - function e() { - return"_" + ("" + Math.random()).slice(2, 10) - } - - var h = function (t, r, s) { - var q = this, p = {}, u = {}; - q.index = r; - if (typeof t == "string") { - t = {url:t} - } - i(this, t, true); - m(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function () { - var v = "on" + this; - if (v.indexOf("*") != -1) { - v = v.slice(0, v.length - 1); - var w = "onBefore" + v.slice(2); - q[w] = function (x) { - j(u, w, x); - return q - } - } - q[v] = function (x) { - j(u, v, x); - return q - }; - if (r == -1) { - if (q[w]) { - s[w] = q[w] - } - if (q[v]) { - s[v] = q[v] - } - } - }); - i(this, {onCuepoint:function (x, w) { - if (arguments.length == 1) { - p.embedded = [null, x]; - return q - } - if (typeof x == "number") { - x = [x] - } - var v = e(); - p[v] = [x, w]; - if (s.isLoaded()) { - s._api().fp_addCuepoints(x, r, v) - } - return q - }, update:function (w) { - i(q, w); - if (s.isLoaded()) { - s._api().fp_updateClip(w, r) - } - var v = s.getConfig(); - var x = (r == -1) ? v.clip : v.playlist[r]; - i(x, w, true) - }, _fireEvent:function (v, y, w, A) { - if (v == "onLoad") { - m(p, function (B, C) { - if (C[0]) { - s._api().fp_addCuepoints(C[0], r, B) - } - }); - return false - } - A = A || q; - if (v == "onCuepoint") { - var z = p[y]; - if (z) { - return z[1].call(s, A, w) - } - } - if (y && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(v) != -1) { - i(A, y); - if (y.metaData) { - if (!A.duration) { - A.duration = y.metaData.duration - } else { - A.fullDuration = y.metaData.duration - } - } - } - var x = true; - m(u[v], function () { - x = this.call(s, A, y, w) - }); - return x - }}); - if (t.onCuepoint) { - var o = t.onCuepoint; - q.onCuepoint.apply(q, typeof o == "function" ? [o] : o); - delete t.onCuepoint - } - m(t, function (v, w) { - if (typeof w == "function") { - j(u, v, w); - delete t[v] - } - }); - if (r == -1) { - s.onCuepoint = this.onCuepoint - } - }; - var l = function (p, r, q, t) { - var o = this, s = {}, u = false; - if (t) { - i(s, t) - } - m(r, function (v, w) { - if (typeof w == "function") { - s[v] = w; - delete r[v] - } - }); - i(this, {animate:function (y, z, x) { - if (!y) { - return o - } - if (typeof z == "function") { - x = z; - z = 500 - } - if (typeof y == "string") { - var w = y; - y = {}; - y[w] = z; - z = 500 - } - if (x) { - var v = e(); - s[v] = x - } - if (z === undefined) { - z = 500 - } - r = q._api().fp_animate(p, y, z, v); - return o - }, css:function (w, x) { - if (x !== undefined) { - var v = {}; - v[w] = x; - w = v - } - r = q._api().fp_css(p, w); - i(o, r); - return o - }, show:function () { - this.display = "block"; - q._api().fp_showPlugin(p); - return o - }, hide:function () { - this.display = "none"; - q._api().fp_hidePlugin(p); - return o - }, toggle:function () { - this.display = q._api().fp_togglePlugin(p); - return o - }, fadeTo:function (y, x, w) { - if (typeof x == "function") { - w = x; - x = 500 - } - if (w) { - var v = e(); - s[v] = w - } - this.display = q._api().fp_fadeTo(p, y, x, v); - this.opacity = y; - return o - }, fadeIn:function (w, v) { - return o.fadeTo(1, w, v) - }, fadeOut:function (w, v) { - return o.fadeTo(0, w, v) - }, getName:function () { - return p - }, getPlayer:function () { - return q - }, _fireEvent:function (w, v, x) { - if (w == "onUpdate") { - var z = q._api().fp_getPlugin(p); - if (!z) { - return - } - i(o, z); - delete o.methods; - if (!u) { - m(z.methods, function () { - var B = "" + this; - o[B] = function () { - var C = [].slice.call(arguments); - var D = q._api().fp_invoke(p, B, C); - return D === "undefined" || D === undefined ? o : D - } - }); - u = true - } - } - var A = s[w]; - if (A) { - var y = A.apply(o, v); - if (w.slice(0, 1) == "_") { - delete s[w] - } - return y - } - return o - }}) - }; - - function b(q, G, t) { - var w = this, v = null, D = false, u, s, F = [], y = {}, x = {}, E, r, p, C, o, A; - i(w, {id:function () { - return E - }, isLoaded:function () { - return(v !== null && v.fp_play !== undefined && !D) - }, getParent:function () { - return q - }, hide:function (H) { - if (H) { - q.style.height = "0px" - } - if (w.isLoaded()) { - v.style.height = "0px" - } - return w - }, show:function () { - q.style.height = A + "px"; - if (w.isLoaded()) { - v.style.height = o + "px" - } - return w - }, isHidden:function () { - return w.isLoaded() && parseInt(v.style.height, 10) === 0 - }, load:function (J) { - if (!w.isLoaded() && w._fireEvent("onBeforeLoad") !== false) { - var H = function () { - if (u && !flashembed.isSupported(G.version)) { - q.innerHTML = "" - } - if (J) { - J.cached = true; - j(x, "onLoad", J) - } - flashembed(q, G, {config:t}) - }; - var I = 0; - m(a, function () { - this.unload(function (K) { - if (++I == a.length) { - H() - } - }) - }) - } - return w - }, unload:function (J) { - if (u.replace(/\s/g, "") !== "") { - if (w._fireEvent("onBeforeUnload") === false) { - if (J) { - J(false) - } - return w - } - D = true; - try { - if (v) { - if (v.fp_isFullscreen()) { - v.fp_toggleFullscreen() - } - v.fp_close(); - w._fireEvent("onUnload") - } - } catch (H) { - } - var I = function () { - v = null; - q.innerHTML = u; - D = false; - if (J) { - J(true) - } - }; - if (/WebKit/i.test(navigator.userAgent) && !/Chrome/i.test(navigator.userAgent)) { - setTimeout(I, 0) - } else { - I() - } - } else { - if (J) { - J(false) - } - } - return w - }, getClip:function (H) { - if (H === undefined) { - H = C - } - return F[H] - }, getCommonClip:function () { - return s - }, getPlaylist:function () { - return F - }, getPlugin:function (H) { - var J = y[H]; - if (!J && w.isLoaded()) { - var I = w._api().fp_getPlugin(H); - if (I) { - J = new l(H, I, w); - y[H] = J - } - } - return J - }, getScreen:function () { - return w.getPlugin("screen") - }, getControls:function () { - return w.getPlugin("controls")._fireEvent("onUpdate") - }, getLogo:function () { - try { - return w.getPlugin("logo")._fireEvent("onUpdate") - } catch (H) { - } - }, getPlay:function () { - return w.getPlugin("play")._fireEvent("onUpdate") - }, getConfig:function (H) { - return H ? k(t) : t - }, getFlashParams:function () { - return G - }, loadPlugin:function (K, J, M, L) { - if (typeof M == "function") { - L = M; - M = {} - } - var I = L ? e() : "_"; - w._api().fp_loadPlugin(K, J, M, I); - var H = {}; - H[I] = L; - var N = new l(K, null, w, H); - y[K] = N; - return N - }, getState:function () { - return w.isLoaded() ? v.fp_getState() : -1 - }, play:function (I, H) { - var J = function () { - if (I !== undefined) { - w._api().fp_play(I, H) - } else { - w._api().fp_play() - } - }; - if (w.isLoaded()) { - J() - } else { - if (D) { - setTimeout(function () { - w.play(I, H) - }, 50) - } else { - w.load(function () { - J() - }) - } - } - return w - }, getVersion:function () { - var I = "flowplayer.js 3.2.11"; - if (w.isLoaded()) { - var H = v.fp_getVersion(); - H.push(I); - return H - } - return I - }, _api:function () { - if (!w.isLoaded()) { - throw"Flowplayer " + w.id() + " not loaded when calling an API method" - } - return v - }, setClip:function (H) { - m(H, function (I, J) { - if (typeof J == "function") { - j(x, I, J); - delete H[I] - } else { - if (I == "onCuepoint") { - $f(q).getCommonClip().onCuepoint(H[I][0], H[I][1]) - } - } - }); - w.setPlaylist([H]); - return w - }, getIndex:function () { - return p - }, bufferAnimate:function (H) { - v.fp_bufferAnimate(H === undefined || H); - return w - }, _swfHeight:function () { - return v.clientHeight - }}); - m(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function () { - var H = "on" + this; - if (H.indexOf("*") != -1) { - H = H.slice(0, H.length - 1); - var I = "onBefore" + H.slice(2); - w[I] = function (J) { - j(x, I, J); - return w - } - } - w[H] = function (J) { - j(x, H, J); - return w - } - }); - m(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","), function () { - var H = this; - w[H] = function (J, I) { - if (!w.isLoaded()) { - return w - } - var K = null; - if (J !== undefined && I !== undefined) { - K = v["fp_" + H](J, I) - } else { - K = (J === undefined) ? v["fp_" + H]() : v["fp_" + H](J) - } - return K === "undefined" || K === undefined ? w : K - } - }); - w._fireEvent = function (Q) { - if (typeof Q == "string") { - Q = [Q] - } - var R = Q[0], O = Q[1], M = Q[2], L = Q[3], K = 0; - if (t.debug) { - g(Q) - } - if (!w.isLoaded() && R == "onLoad" && O == "player") { - v = v || c(r); - o = w._swfHeight(); - m(F, function () { - this._fireEvent("onLoad") - }); - m(y, function (S, T) { - T._fireEvent("onUpdate") - }); - s._fireEvent("onLoad") - } - if (R == "onLoad" && O != "player") { - return - } - if (R == "onError") { - if (typeof O == "string" || (typeof O == "number" && typeof M == "number")) { - O = M; - M = L - } - } - if (R == "onContextMenu") { - m(t.contextMenu[O], function (S, T) { - T.call(w) - }); - return - } - if (R == "onPluginEvent" || R == "onBeforePluginEvent") { - var H = O.name || O; - var I = y[H]; - if (I) { - I._fireEvent("onUpdate", O); - return I._fireEvent(M, Q.slice(3)) - } - return - } - if (R == "onPlaylistReplace") { - F = []; - var N = 0; - m(O, function () { - F.push(new h(this, N++, w)) - }) - } - if (R == "onClipAdd") { - if (O.isInStream) { - return - } - O = new h(O, M, w); - F.splice(M, 0, O); - for (K = M + 1; K < F.length; K++) { - F[K].index++ - } - } - var P = true; - if (typeof O == "number" && O < F.length) { - C = O; - var J = F[O]; - if (J) { - P = J._fireEvent(R, M, L) - } - if (!J || P !== false) { - P = s._fireEvent(R, M, L, J) - } - } - m(x[R], function () { - P = this.call(w, O, M); - if (this.cached) { - x[R].splice(K, 1) - } - if (P === false) { - return false - } - K++ - }); - return P - }; - function B() { - q.innerHTML=''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them - if ($f(q)) { - $f(q).getParent().innerHTML = ""; - p = $f(q).getIndex(); - a[p] = w - } else { - a.push(w); - p = a.length - 1 - } - A = parseInt(q.style.height, 10) || q.clientHeight; - E = q.id || "fp" + e(); - r = G.id || E + "_api"; - G.id = r; - u = q.innerHTML; - if (typeof t == "string") { - t = {clip:{url:t}} - } - t.playerId = E; - t.clip = t.clip || {}; - if (q.getAttribute("href", 2) && !t.clip.url) { - t.clip.url = q.getAttribute("href", 2) - } - s = new h(t.clip, -1, w); - t.playlist = t.playlist || [t.clip]; - var I = 0; - m(t.playlist, function () { - var L = this; - if (typeof L == "object" && L.length) { - L = {url:"" + L} - } - m(t.clip, function (M, N) { - if (N !== undefined && L[M] === undefined && typeof N != "function") { - L[M] = N - } - }); - t.playlist[I] = L; - L = new h(L, I, w); - F.push(L); - I++ - }); - m(t, function (L, M) { - if (typeof M == "function") { - if (s[L]) { - s[L](M) - } else { - j(x, L, M) - } - delete t[L] - } - }); - m(t.plugins, function (L, M) { - if (M) { - y[L] = new l(L, M, w) - } - }); - if (!t.plugins || t.plugins.controls === undefined) { - y.controls = new l("controls", null, w) - } - y.canvas = new l("canvas", null, w); - u = q.innerHTML; - function K(L) { - if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(F[0].url) && !J()) { - return true - } - if (!w.isLoaded() && w._fireEvent("onBeforeClick") !== false) { - w.load() - } - return f(L) - } - - function J() { - return w.hasiPadSupport && w.hasiPadSupport() - } - - function H() { - if (u.replace(/\s/g, "") !== "") { - if (q.addEventListener) { - q.addEventListener("click", K, false) - } else { - if (q.attachEvent) { - q.attachEvent("onclick", K) - } - } - } else { - if (q.addEventListener && !J()) { - q.addEventListener("click", f, false) - } - w.load() - } - } - - setTimeout(H, 0) - } - - if (typeof q == "string") { - var z = c(q); - if (!z) { - throw"Flowplayer cannot access element: " + q - } - q = z; - B() - } else { - B() - } - } - - var a = []; - - function d(o) { - this.length = o.length; - this.each = function (q) { - m(o, q) - }; - this.size = function () { - return o.length - }; - var p = this; - for (name in b.prototype) { - p[name] = function () { - var q = arguments; - p.each(function () { - this[name].apply(this, q) - }) - } - } - } - - window.flowplayer = window.$f = function () { - var p = null; - var o = arguments[0]; - if(!flashembed.isSupported([6, 65])){return null;} // Moodle hack - we do not want the missing flash hints - we need the original links for accessibility and incompatible browsers - if (!arguments.length) { - m(a, function () { - if (this.isLoaded()) { - p = this; - return false - } - }); - return p || a[0] - } - if (arguments.length == 1) { - if (typeof o == "number") { - return a[o] - } else { - if (o == "*") { - return new d(a) - } - m(a, function () { - if (this.id() == o.id || this.id() == o || this.getParent() == o) { - p = this; - return false - } - }); - return p - } - } - if (arguments.length > 1) { - var t = arguments[1], q = (arguments.length == 3) ? arguments[2] : {}; - if (typeof t == "string") { - t = {src:t} - } - t = i({bgcolor:"#000000", version:[10, 1], expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf", cachebusting:false}, t); - if (typeof o == "string") { - if (o.indexOf(".") != -1) { - var s = []; - m(n(o), function () { - s.push(new b(this, k(t), k(q))) - }); - return new d(s) - } else { - var r = c(o); - return new b(r !== null ? r : k(o), k(t), k(q)) - } - } else { - if (o) { - return new b(o, k(t), k(q)) - } - } - } - return null - }; - i(window.$f, {fireEvent:function () { - var o = [].slice.call(arguments); - var q = $f(o[0]); - return q ? q._fireEvent(o.slice(1)) : null - }, addPlugin:function (o, p) { - b.prototype[o] = p; - return $f - }, each:m, extend:i}); - if (typeof jQuery == "function") { - jQuery.fn.flowplayer = function (q, p) { - if (!arguments.length || typeof arguments[0] == "number") { - var o = []; - this.each(function () { - var r = $f(this); - if (r) { - o.push(r) - } - }); - return arguments.length ? o[arguments[0]] : new d(o) - } - return this.each(function () { - $f(this, k(q), p ? k(p) : {}) - }) - } - } -})(); -(function () { - var h = document.all, j = "http://get.adobe.com/flashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = {width:"100%", height:"100%", id:"_" + ("" + Math.random()).slice(9), allowfullscreen:true, allowscriptaccess:"always", quality:"high", version:[3, 0], onFail:null, expressInstall:null, w3c:false, cachebusting:false}; - if (window.attachEvent) { - window.attachEvent("onbeforeunload", function () { - __flash_unloadHandler = function () { - }; - __flash_savedUnloadHandler = function () { - } - }) - } - function i(m, l) { - if (l) { - for (var f in l) { - if (l.hasOwnProperty(f)) { - m[f] = l[f] - } - } - } - return m - } - - function a(f, n) { - var m = []; - for (var l in f) { - if (f.hasOwnProperty(l)) { - m[l] = n(f[l]) - } - } - return m - } - - window.flashembed = function (f, m, l) { - if (typeof f == "string") { - f = document.getElementById(f.replace("#", "")) - } - if (!f) { - return - } - if (typeof m == "string") { - m = {src:m} - } - return new d(f, i(i({}, b), m), l) - }; - var g = i(window.flashembed, {conf:b, getVersion:function () { - var m, f; - try { - f = navigator.plugins["Shockwave Flash"].description.slice(16) - } catch (o) { - try { - m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); - f = m && m.GetVariable("$version") - } catch (n) { - try { - m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); - f = m && m.GetVariable("$version") - } catch (l) { - } - } - } - f = e.exec(f); - return f ? [1 * f[1], 1 * f[(f[1] * 1 > 9 ? 2 : 3)] * 1] : [0, 0] - }, asString:function (l) { - if (l === null || l === undefined) { - return null - } - var f = typeof l; - if (f == "object" && l.push) { - f = "array" - } - switch (f) { - case"string": - l = l.replace(new RegExp('(["\\\\])', "g"), "\\$1"); - l = l.replace(/^\s?(\d+\.?\d*)%/, "$1pct"); - return'"' + l + '"'; - case"array": - return"[" + a(l,function (o) { - return g.asString(o) - }).join(",") + "]"; - case"function": - return'"function()"'; - case"object": - var m = []; - for (var n in l) { - if (l.hasOwnProperty(n)) { - m.push('"' + n + '":' + g.asString(l[n])) - } - } - return"{" + m.join(",") + "}" - } - return String(l).replace(/\s/g, " ").replace(/\'/g, '"') - }, getHTML:function (o, l) { - o = i({}, o); - var n = '' - } - o.width = o.height = o.id = o.w3c = o.src = null; - o.onFail = o.version = o.expressInstall = null; - for (var m in o) { - if (o[m]) { - n += '' - } - } - var p = ""; - if (l) { - for (var f in l) { - if (l[f]) { - var q = l[f]; - p += f + "=" + (/function|object/.test(typeof q) ? g.asString(q) : q) + "&" - } - } - p = p.slice(0, -1); - n += '" - } - n += ""; - return n - }, isSupported:function (f) { - return k[0] > f[0] || k[0] == f[0] && k[1] >= f[1] - }}); - var k = g.getVersion(); - - function d(f, n, m) { - if (g.isSupported(n.version)) { - f.innerHTML = g.getHTML(n, m) - } else { - if (n.expressInstall && g.isSupported([6, 65])) { - f.innerHTML = g.getHTML(i(n, {src:n.expressInstall}), {MMredirectURL:encodeURIComponent(location.href), MMplayerType:"PlugIn", MMdoctitle:document.title}) - } else { - if (!f.innerHTML.replace(/\s/g, "")) { - f.innerHTML = "

Flash version " + n.version + " or greater is required

" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "

" + (f.tagName == "A" ? "

Click here to download latest version

" : "

Download latest version from here

"); - if (f.tagName == "A" || f.tagName == "DIV") { - f.onclick = function () { - location.href = j - } - } - } - if (n.onFail) { - var l = n.onFail.call(this); - if (typeof l == "string") { - f.innerHTML = l - } - } - } - } - if (h) { - window[n.id] = document.getElementById(n.id) - } - i(this, {getRoot:function () { - return f - }, getOptions:function () { - return n - }, getConf:function () { - return m - }, getApi:function () { - return f.firstChild - }}) - } - - if (c) { - jQuery.tools = jQuery.tools || {version:"3.2.11"}; - jQuery.tools.flashembed = {conf:b}; - jQuery.fn.flashembed = function (l, f) { - return this.each(function () { - $(this).data("flashembed", flashembed(this, l, f)) - }) - } - } -})(); \ No newline at end of file diff --git a/lib/flowplayer/flowplayer-3.2.11.min.js b/lib/flowplayer/flowplayer-3.2.11.min.js deleted file mode 100644 index c03505f4b02..00000000000 --- a/lib/flowplayer/flowplayer-3.2.11.min.js +++ /dev/null @@ -1,24 +0,0 @@ -/* - * flowplayer.js 3.2.11. The Flowplayer API - * - * Copyright 2009-2011 Flowplayer Oy - * - * This file is part of Flowplayer. - * - * Flowplayer is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Flowplayer is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Flowplayer. If not, see . - * - * Date: 2012-06-16 10:34:45 -0400 (Sat, 16 Jun 2012) - * Revision: 808 - */ -(function(){function g(o){console.log("$f.fireEvent",[].slice.call(o))}function k(q){if(!q||typeof q!="object"){return q}var o=new q.constructor();for(var p in q){if(q.hasOwnProperty(p)){o[p]=k(q[p])}}return o}function m(t,q){if(!t){return}var o,p=0,r=t.length;if(r===undefined){for(o in t){if(q.call(t[o],o,t[o])===false){break}}}else{for(var s=t[0];p1){var t=arguments[1],q=(arguments.length==3)?arguments[2]:{};if(typeof t=="string"){t={src:t}}t=i({bgcolor:"#000000",version:[10,1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:false},t);if(typeof o=="string"){if(o.indexOf(".")!=-1){var s=[];m(n(o),function(){s.push(new b(this,k(t),k(q)))});return new d(s)}else{var r=c(o);return new b(r!==null?r:k(o),k(t),k(q))}}else{if(o){return new b(o,k(t),k(q))}}}return null};i(window.$f,{fireEvent:function(){var o=[].slice.call(arguments);var q=$f(o[0]);return q?q._fireEvent(o.slice(1)):null},addPlugin:function(o,p){b.prototype[o]=p;return $f},each:m,extend:i});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(q,p){if(!arguments.length||typeof arguments[0]=="number"){var o=[];this.each(function(){var r=$f(this);if(r){o.push(r)}});return arguments.length?o[arguments[0]]:new d(o)}return this.each(function(){$f(this,k(q),p?k(p):{})})}}})();(function(){var h=document.all,j="http://get.adobe.com/flashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[1*f[1],1*f[(f[1]*1>9?2:3)]*1]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d*)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n=''}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+=''}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='"}n+="";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="

Flash version "+n.version+" or greater is required

"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"

"+(f.tagName=="A"?"

Click here to download latest version

":"

Download latest version from here

");if(f.tagName=="A"||f.tagName=="DIV"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.11"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}})(); \ No newline at end of file diff --git a/lib/flowplayer/flowplayer-3.2.12.js b/lib/flowplayer/flowplayer-3.2.12.js new file mode 100644 index 00000000000..0da9dbbe7e9 --- /dev/null +++ b/lib/flowplayer/flowplayer-3.2.12.js @@ -0,0 +1,1014 @@ +/* + * flowplayer.js 3.2.12. The Flowplayer API + * + * Copyright 2009-2011 Flowplayer Oy + * + * This file is part of Flowplayer. + * + * Flowplayer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Flowplayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Flowplayer. If not, see . + * + * Date: ${date} + * Revision: ${revision} + */ +!function () { + function h(p) { + console.log("$f.fireEvent", [].slice.call(p)) + } + + function l(r) { + if (!r || typeof r != "object") { + return r + } + var p = new r.constructor(); + for (var q in r) { + if (r.hasOwnProperty(q)) { + p[q] = l(r[q]) + } + } + return p + } + + function n(u, r) { + if (!u) { + return + } + var p, q = 0, s = u.length; + if (s === undefined) { + for (p in u) { + if (r.call(u[p], p, u[p]) === false) { + break + } + } + } else { + for (var t = u[0]; q < s && r.call(t, q, t) !== false; t = u[++q]) { + } + } + return u + } + + function c(p) { + return document.getElementById(p) + } + + function j(r, q, p) { + if (typeof q != "object") { + return r + } + if (r && q) { + n(q, function (s, t) { + if (!p || typeof t != "function") { + r[s] = t + } + }) + } + return r + } + + function o(t) { + var r = t.indexOf("."); + if (r != -1) { + var q = t.slice(0, r) || "*"; + var p = t.slice(r + 1, t.length); + var s = []; + n(document.getElementsByTagName(q), function () { + if (this.className && this.className.indexOf(p) != -1) { + s.push(this) + } + }); + return s + } + } + + function g(p) { + p = p || window.event; + if (p.preventDefault) { + p.stopPropagation(); + p.preventDefault() + } else { + p.returnValue = false; + p.cancelBubble = true + } + return false + } + + function k(r, p, q) { + r[p] = r[p] || []; + r[p].push(q) + } + + function e(p) { + return p.replace(/&/g, "%26").replace(/&/g, "%26").replace(/=/g, "%3D") + } + + function f() { + return"_" + ("" + Math.random()).slice(2, 10) + } + + var i = function (u, s, t) { + var r = this, q = {}, v = {}; + r.index = s; + if (typeof u == "string") { + u = {url: u} + } + j(this, u, true); + n(("Begin*,Start,Pause*,Resume*,Seek*,Stop*,Finish*,LastSecond,Update,BufferFull,BufferEmpty,BufferStop").split(","), function () { + var w = "on" + this; + if (w.indexOf("*") != -1) { + w = w.slice(0, w.length - 1); + var x = "onBefore" + w.slice(2); + r[x] = function (y) { + k(v, x, y); + return r + } + } + r[w] = function (y) { + k(v, w, y); + return r + }; + if (s == -1) { + if (r[x]) { + t[x] = r[x] + } + if (r[w]) { + t[w] = r[w] + } + } + }); + j(this, {onCuepoint: function (y, x) { + if (arguments.length == 1) { + q.embedded = [null, y]; + return r + } + if (typeof y == "number") { + y = [y] + } + var w = f(); + q[w] = [y, x]; + if (t.isLoaded()) { + t._api().fp_addCuepoints(y, s, w) + } + return r + }, update: function (x) { + j(r, x); + if (t.isLoaded()) { + t._api().fp_updateClip(x, s) + } + var w = t.getConfig(); + var y = (s == -1) ? w.clip : w.playlist[s]; + j(y, x, true) + }, _fireEvent: function (w, z, x, B) { + if (w == "onLoad") { + n(q, function (C, D) { + if (D[0]) { + t._api().fp_addCuepoints(D[0], s, C) + } + }); + return false + } + B = B || r; + if (w == "onCuepoint") { + var A = q[z]; + if (A) { + return A[1].call(t, B, x) + } + } + if (z && "onBeforeBegin,onMetaData,onStart,onUpdate,onResume".indexOf(w) != -1) { + j(B, z); + if (z.metaData) { + if (!B.duration) { + B.duration = z.metaData.duration + } else { + B.fullDuration = z.metaData.duration + } + } + } + var y = true; + n(v[w], function () { + y = this.call(t, B, z, x) + }); + return y + }}); + if (u.onCuepoint) { + var p = u.onCuepoint; + r.onCuepoint.apply(r, typeof p == "function" ? [p] : p); + delete u.onCuepoint + } + n(u, function (w, x) { + if (typeof x == "function") { + k(v, w, x); + delete u[w] + } + }); + if (s == -1) { + t.onCuepoint = this.onCuepoint + } + }; + var m = function (q, s, r, u) { + var p = this, t = {}, v = false; + if (u) { + j(t, u) + } + n(s, function (w, x) { + if (typeof x == "function") { + t[w] = x; + delete s[w] + } + }); + j(this, {animate: function (z, A, y) { + if (!z) { + return p + } + if (typeof A == "function") { + y = A; + A = 500 + } + if (typeof z == "string") { + var x = z; + z = {}; + z[x] = A; + A = 500 + } + if (y) { + var w = f(); + t[w] = y + } + if (A === undefined) { + A = 500 + } + s = r._api().fp_animate(q, z, A, w); + return p + }, css: function (x, y) { + if (y !== undefined) { + var w = {}; + w[x] = y; + x = w + } + s = r._api().fp_css(q, x); + j(p, s); + return p + }, show: function () { + this.display = "block"; + r._api().fp_showPlugin(q); + return p + }, hide: function () { + this.display = "none"; + r._api().fp_hidePlugin(q); + return p + }, toggle: function () { + this.display = r._api().fp_togglePlugin(q); + return p + }, fadeTo: function (z, y, x) { + if (typeof y == "function") { + x = y; + y = 500 + } + if (x) { + var w = f(); + t[w] = x + } + this.display = r._api().fp_fadeTo(q, z, y, w); + this.opacity = z; + return p + }, fadeIn: function (x, w) { + return p.fadeTo(1, x, w) + }, fadeOut: function (x, w) { + return p.fadeTo(0, x, w) + }, getName: function () { + return q + }, getPlayer: function () { + return r + }, _fireEvent: function (x, w, y) { + if (x == "onUpdate") { + var A = r._api().fp_getPlugin(q); + if (!A) { + return + } + j(p, A); + delete p.methods; + if (!v) { + n(A.methods, function () { + var C = "" + this; + p[C] = function () { + var D = [].slice.call(arguments); + var E = r._api().fp_invoke(q, C, D); + return E === "undefined" || E === undefined ? p : E + } + }); + v = true + } + } + var B = t[x]; + if (B) { + var z = B.apply(p, w); + if (x.slice(0, 1) == "_") { + delete t[x] + } + return z + } + return p + }}) + }; + + function b(r, H, u) { + var x = this, w = null, E = false, v, t, G = [], z = {}, y = {}, F, s, q, D, p, B; + j(x, {id: function () { + return F + }, isLoaded: function () { + return(w !== null && w.fp_play !== undefined && !E) + }, getParent: function () { + return r + }, hide: function (I) { + if (I) { + r.style.height = "0px" + } + if (x.isLoaded()) { + w.style.height = "0px" + } + return x + }, show: function () { + r.style.height = B + "px"; + if (x.isLoaded()) { + w.style.height = p + "px" + } + return x + }, isHidden: function () { + return x.isLoaded() && parseInt(w.style.height, 10) === 0 + }, load: function (K) { + if (!x.isLoaded() && x._fireEvent("onBeforeLoad") !== false) { + var I = function () { + if (v && !flashembed.isSupported(H.version)) { + r.innerHTML = "" + } + if (K) { + K.cached = true; + k(y, "onLoad", K) + } + flashembed(r, H, {config: u}) + }; + var J = 0; + n(a, function () { + this.unload(function (L) { + if (++J == a.length) { + I() + } + }) + }) + } + return x + }, unload: function (K) { + if (v.replace(/\s/g, "") !== "") { + if (x._fireEvent("onBeforeUnload") === false) { + if (K) { + K(false) + } + return x + } + E = true; + try { + if (w) { + if (w.fp_isFullscreen()) { + w.fp_toggleFullscreen() + } + w.fp_close(); + x._fireEvent("onUnload") + } + } catch (I) { + } + var J = function () { + w = null; + r.innerHTML = v; + E = false; + if (K) { + K(true) + } + }; + if (/WebKit/i.test(navigator.userAgent) && !/Chrome/i.test(navigator.userAgent)) { + setTimeout(J, 0) + } else { + J() + } + } else { + if (K) { + K(false) + } + } + return x + }, getClip: function (I) { + if (I === undefined) { + I = D + } + return G[I] + }, getCommonClip: function () { + return t + }, getPlaylist: function () { + return G + }, getPlugin: function (I) { + var K = z[I]; + if (!K && x.isLoaded()) { + var J = x._api().fp_getPlugin(I); + if (J) { + K = new m(I, J, x); + z[I] = K + } + } + return K + }, getScreen: function () { + return x.getPlugin("screen") + }, getControls: function () { + return x.getPlugin("controls")._fireEvent("onUpdate") + }, getLogo: function () { + try { + return x.getPlugin("logo")._fireEvent("onUpdate") + } catch (I) { + } + }, getPlay: function () { + return x.getPlugin("play")._fireEvent("onUpdate") + }, getConfig: function (I) { + return I ? l(u) : u + }, getFlashParams: function () { + return H + }, loadPlugin: function (L, K, N, M) { + if (typeof N == "function") { + M = N; + N = {} + } + var J = M ? f() : "_"; + x._api().fp_loadPlugin(L, K, N, J); + var I = {}; + I[J] = M; + var O = new m(L, null, x, I); + z[L] = O; + return O + }, getState: function () { + return x.isLoaded() ? w.fp_getState() : -1 + }, play: function (J, I) { + var K = function () { + if (J !== undefined) { + x._api().fp_play(J, I) + } else { + x._api().fp_play() + } + }; + if (x.isLoaded()) { + K() + } else { + if (E) { + setTimeout(function () { + x.play(J, I) + }, 50) + } else { + x.load(function () { + K() + }) + } + } + return x + }, getVersion: function () { + var J = "flowplayer.js 3.2.12"; + if (x.isLoaded()) { + var I = w.fp_getVersion(); + I.push(J); + return I + } + return J + }, _api: function () { + if (!x.isLoaded()) { + throw"Flowplayer " + x.id() + " not loaded when calling an API method" + } + return w + }, setClip: function (I) { + n(I, function (J, K) { + if (typeof K == "function") { + k(y, J, K); + delete I[J] + } else { + if (J == "onCuepoint") { + $f(r).getCommonClip().onCuepoint(I[J][0], I[J][1]) + } + } + }); + x.setPlaylist([I]); + return x + }, getIndex: function () { + return q + }, bufferAnimate: function (I) { + w.fp_bufferAnimate(I === undefined || I); + return x + }, _swfHeight: function () { + return w.clientHeight + }}); + n(("Click*,Load*,Unload*,Keypress*,Volume*,Mute*,Unmute*,PlaylistReplace,ClipAdd,Fullscreen*,FullscreenExit,Error,MouseOver,MouseOut").split(","), function () { + var I = "on" + this; + if (I.indexOf("*") != -1) { + I = I.slice(0, I.length - 1); + var J = "onBefore" + I.slice(2); + x[J] = function (K) { + k(y, J, K); + return x + } + } + x[I] = function (K) { + k(y, I, K); + return x + } + }); + n(("pause,resume,mute,unmute,stop,toggle,seek,getStatus,getVolume,setVolume,getTime,isPaused,isPlaying,startBuffering,stopBuffering,isFullscreen,toggleFullscreen,reset,close,setPlaylist,addClip,playFeed,setKeyboardShortcutsEnabled,isKeyboardShortcutsEnabled").split(","), function () { + var I = this; + x[I] = function (K, J) { + if (!x.isLoaded()) { + return x + } + var L = null; + if (K !== undefined && J !== undefined) { + L = w["fp_" + I](K, J) + } else { + L = (K === undefined) ? w["fp_" + I]() : w["fp_" + I](K) + } + return L === "undefined" || L === undefined ? x : L + } + }); + x._fireEvent = function (R) { + if (typeof R == "string") { + R = [R] + } + var S = R[0], P = R[1], N = R[2], M = R[3], L = 0; + if (u.debug) { + h(R) + } + if (!x.isLoaded() && S == "onLoad" && P == "player") { + w = w || c(s); + p = x._swfHeight(); + n(G, function () { + this._fireEvent("onLoad") + }); + n(z, function (T, U) { + U._fireEvent("onUpdate") + }); + t._fireEvent("onLoad") + } + if (S == "onLoad" && P != "player") { + return + } + if (S == "onError") { + if (typeof P == "string" || (typeof P == "number" && typeof N == "number")) { + P = N; + N = M + } + } + if (S == "onContextMenu") { + n(u.contextMenu[P], function (T, U) { + U.call(x) + }); + return + } + if (S == "onPluginEvent" || S == "onBeforePluginEvent") { + var I = P.name || P; + var J = z[I]; + if (J) { + J._fireEvent("onUpdate", P); + return J._fireEvent(N, R.slice(3)) + } + return + } + if (S == "onPlaylistReplace") { + G = []; + var O = 0; + n(P, function () { + G.push(new i(this, O++, x)) + }) + } + if (S == "onClipAdd") { + if (P.isInStream) { + return + } + P = new i(P, N, x); + G.splice(N, 0, P); + for (L = N + 1; L < G.length; L++) { + G[L].index++ + } + } + var Q = true; + if (typeof P == "number" && P < G.length) { + D = P; + var K = G[P]; + if (K) { + Q = K._fireEvent(S, N, M) + } + if (!K || Q !== false) { + Q = t._fireEvent(S, N, M, K) + } + } + n(y[S], function () { + Q = this.call(x, P, N); + if (this.cached) { + y[S].splice(L, 1) + } + if (Q === false) { + return false + } + L++ + }); + return Q + }; + function C() { + r.innerHTML=''; // Moodle hack - we do not want splashscreens, unfortunately there is not switch to disable them + if ($f(r)) { + $f(r).getParent().innerHTML = ""; + q = $f(r).getIndex(); + a[q] = x + } else { + a.push(x); + q = a.length - 1 + } + B = parseInt(r.style.height, 10) || r.clientHeight; + F = r.id || "fp" + f(); + s = H.id || F + "_api"; + H.id = s; + v = r.innerHTML; + if (typeof u == "string") { + u = {clip: {url: u}} + } + u.playerId = F; + u.clip = u.clip || {}; + if (r.getAttribute("href", 2) && !u.clip.url) { + u.clip.url = r.getAttribute("href", 2) + } + if (u.clip.url) { + u.clip.url = e(u.clip.url) + } + t = new i(u.clip, -1, x); + u.playlist = u.playlist || [u.clip]; + var J = 0; + n(u.playlist, function () { + var M = this; + if (typeof M == "object" && M.length) { + M = {url: "" + M} + } + if (M.url) { + M.url = e(M.url) + } + n(u.clip, function (N, O) { + if (O !== undefined && M[N] === undefined && typeof O != "function") { + M[N] = O + } + }); + u.playlist[J] = M; + M = new i(M, J, x); + G.push(M); + J++ + }); + n(u, function (M, N) { + if (typeof N == "function") { + if (t[M]) { + t[M](N) + } else { + k(y, M, N) + } + delete u[M] + } + }); + n(u.plugins, function (M, N) { + if (N) { + z[M] = new m(M, N, x) + } + }); + if (!u.plugins || u.plugins.controls === undefined) { + z.controls = new m("controls", null, x) + } + z.canvas = new m("canvas", null, x); + v = r.innerHTML; + function L(M) { + if (/iPad|iPhone|iPod/i.test(navigator.userAgent) && !/.flv$/i.test(G[0].url) && !K()) { + return true + } + if (!x.isLoaded() && x._fireEvent("onBeforeClick") !== false) { + x.load() + } + return g(M) + } + + function K() { + return x.hasiPadSupport && x.hasiPadSupport() + } + + function I() { + if (v.replace(/\s/g, "") !== "") { + if (r.addEventListener) { + r.addEventListener("click", L, false) + } else { + if (r.attachEvent) { + r.attachEvent("onclick", L) + } + } + } else { + if (r.addEventListener && !K()) { + r.addEventListener("click", g, false) + } + x.load() + } + } + + setTimeout(I, 0) + } + + if (typeof r == "string") { + var A = c(r); + if (!A) { + throw"Flowplayer cannot access element: " + r + } + r = A; + C() + } else { + C() + } + } + + var a = []; + + function d(p) { + this.length = p.length; + this.each = function (r) { + n(p, r) + }; + this.size = function () { + return p.length + }; + var q = this; + for (name in b.prototype) { + q[name] = function () { + var r = arguments; + q.each(function () { + this[name].apply(this, r) + }) + } + } + } + + window.flowplayer = window.$f = function () { + var q = null; + var p = arguments[0]; + if(!flashembed.isSupported([6, 65])){return null;} // Moodle hack - we do not want the missing flash hints - we need the original links for accessibility and incompatible browsers + if (!arguments.length) { + n(a, function () { + if (this.isLoaded()) { + q = this; + return false + } + }); + return q || a[0] + } + if (arguments.length == 1) { + if (typeof p == "number") { + return a[p] + } else { + if (p == "*") { + return new d(a) + } + n(a, function () { + if (this.id() == p.id || this.id() == p || this.getParent() == p) { + q = this; + return false + } + }); + return q + } + } + if (arguments.length > 1) { + var u = arguments[1], r = (arguments.length == 3) ? arguments[2] : {}; + if (typeof u == "string") { + u = {src: u} + } + u = j({bgcolor: "#000000", version: [10, 1], expressInstall: "http://releases.flowplayer.org/swf/expressinstall.swf", cachebusting: false}, u); + if (typeof p == "string") { + if (p.indexOf(".") != -1) { + var t = []; + n(o(p), function () { + t.push(new b(this, l(u), l(r))) + }); + return new d(t) + } else { + var s = c(p); + return new b(s !== null ? s : l(p), l(u), l(r)) + } + } else { + if (p) { + return new b(p, l(u), l(r)) + } + } + } + return null + }; + j(window.$f, {fireEvent: function () { + var q = [].slice.call(arguments); + var r = $f(q[0]); + return r ? r._fireEvent(q.slice(1)) : null + }, addPlugin: function (p, q) { + b.prototype[p] = q; + return $f + }, each: n, extend: j}); + if (typeof jQuery == "function") { + jQuery.fn.flowplayer = function (r, q) { + if (!arguments.length || typeof arguments[0] == "number") { + var p = []; + this.each(function () { + var s = $f(this); + if (s) { + p.push(s) + } + }); + return arguments.length ? p[arguments[0]] : new d(p) + } + return this.each(function () { + $f(this, l(r), q ? l(q) : {}) + }) + } + } +}(); +!function () { + var h = document.all, j = "http://get.adobe.com/flashplayer", c = typeof jQuery == "function", e = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, b = {width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: true, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: false, cachebusting: false}; + if (window.attachEvent) { + window.attachEvent("onbeforeunload", function () { + __flash_unloadHandler = function () { + }; + __flash_savedUnloadHandler = function () { + } + }) + } + function i(m, l) { + if (l) { + for (var f in l) { + if (l.hasOwnProperty(f)) { + m[f] = l[f] + } + } + } + return m + } + + function a(f, n) { + var m = []; + for (var l in f) { + if (f.hasOwnProperty(l)) { + m[l] = n(f[l]) + } + } + return m + } + + window.flashembed = function (f, m, l) { + if (typeof f == "string") { + f = document.getElementById(f.replace("#", "")) + } + if (!f) { + return + } + if (typeof m == "string") { + m = {src: m} + } + return new d(f, i(i({}, b), m), l) + }; + var g = i(window.flashembed, {conf: b, getVersion: function () { + var m, f; + try { + f = navigator.plugins["Shockwave Flash"].description.slice(16) + } catch (o) { + try { + m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); + f = m && m.GetVariable("$version") + } catch (n) { + try { + m = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); + f = m && m.GetVariable("$version") + } catch (l) { + } + } + } + f = e.exec(f); + return f ? [1 * f[1], 1 * f[(f[1] * 1 > 9 ? 2 : 3)] * 1] : [0, 0] + }, asString: function (l) { + if (l === null || l === undefined) { + return null + } + var f = typeof l; + if (f == "object" && l.push) { + f = "array" + } + switch (f) { + case"string": + l = l.replace(new RegExp('(["\\\\])', "g"), "\\$1"); + l = l.replace(/^\s?(\d+\.?\d*)%/, "$1pct"); + return'"' + l + '"'; + case"array": + return"[" + a(l,function (o) { + return g.asString(o) + }).join(",") + "]"; + case"function": + return'"function()"'; + case"object": + var m = []; + for (var n in l) { + if (l.hasOwnProperty(n)) { + m.push('"' + n + '":' + g.asString(l[n])) + } + } + return"{" + m.join(",") + "}" + } + return String(l).replace(/\s/g, " ").replace(/\'/g, '"') + }, getHTML: function (o, l) { + o = i({}, o); + var n = '' + } + o.width = o.height = o.id = o.w3c = o.src = null; + o.onFail = o.version = o.expressInstall = null; + for (var m in o) { + if (o[m]) { + n += '' + } + } + var p = ""; + if (l) { + for (var f in l) { + if (l[f]) { + var q = l[f]; + p += f + "=" + (/function|object/.test(typeof q) ? g.asString(q) : q) + "&" + } + } + p = p.slice(0, -1); + n += '" + } + n += ""; + return n + }, isSupported: function (f) { + return k[0] > f[0] || k[0] == f[0] && k[1] >= f[1] + }}); + var k = g.getVersion(); + + function d(f, n, m) { + if (g.isSupported(n.version)) { + f.innerHTML = g.getHTML(n, m) + } else { + if (n.expressInstall && g.isSupported([6, 65])) { + f.innerHTML = g.getHTML(i(n, {src: n.expressInstall}), {MMredirectURL: encodeURIComponent(location.href), MMplayerType: "PlugIn", MMdoctitle: document.title}) + } else { + if (!f.innerHTML.replace(/\s/g, "")) { + f.innerHTML = "

Flash version " + n.version + " or greater is required

" + (k[0] > 0 ? "Your version is " + k : "You have no flash plugin installed") + "

" + (f.tagName == "A" ? "

Click here to download latest version

" : "

Download latest version from here

"); + if (f.tagName == "A" || f.tagName == "DIV") { + f.onclick = function () { + location.href = j + } + } + } + if (n.onFail) { + var l = n.onFail.call(this); + if (typeof l == "string") { + f.innerHTML = l + } + } + } + } + if (h) { + window[n.id] = document.getElementById(n.id) + } + i(this, {getRoot: function () { + return f + }, getOptions: function () { + return n + }, getConf: function () { + return m + }, getApi: function () { + return f.firstChild + }}) + } + + if (c) { + jQuery.tools = jQuery.tools || {version: "3.2.12"}; + jQuery.tools.flashembed = {conf: b}; + jQuery.fn.flashembed = function (l, f) { + return this.each(function () { + $(this).data("flashembed", flashembed(this, l, f)) + }) + } + } +}(); \ No newline at end of file diff --git a/lib/flowplayer/flowplayer-3.2.12.min.js b/lib/flowplayer/flowplayer-3.2.12.min.js new file mode 100644 index 00000000000..53d2fbd80bd --- /dev/null +++ b/lib/flowplayer/flowplayer-3.2.12.min.js @@ -0,0 +1,24 @@ +/* + * flowplayer.js 3.2.12. The Flowplayer API + * + * Copyright 2009-2011 Flowplayer Oy + * + * This file is part of Flowplayer. + * + * Flowplayer is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Flowplayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Flowplayer. If not, see . + * + * Date: ${date} + * Revision: ${revision} + */ +!function(){function h(p){console.log("$f.fireEvent",[].slice.call(p))}function l(r){if(!r||typeof r!="object"){return r}var p=new r.constructor();for(var q in r){if(r.hasOwnProperty(q)){p[q]=l(r[q])}}return p}function n(u,r){if(!u){return}var p,q=0,s=u.length;if(s===undefined){for(p in u){if(r.call(u[p],p,u[p])===false){break}}}else{for(var t=u[0];q1){var u=arguments[1],r=(arguments.length==3)?arguments[2]:{};if(typeof u=="string"){u={src:u}}u=j({bgcolor:"#000000",version:[10,1],expressInstall:"http://releases.flowplayer.org/swf/expressinstall.swf",cachebusting:false},u);if(typeof p=="string"){if(p.indexOf(".")!=-1){var t=[];n(o(p),function(){t.push(new b(this,l(u),l(r)))});return new d(t)}else{var s=c(p);return new b(s!==null?s:l(p),l(u),l(r))}}else{if(p){return new b(p,l(u),l(r))}}}return null};j(window.$f,{fireEvent:function(){var q=[].slice.call(arguments);var r=$f(q[0]);return r?r._fireEvent(q.slice(1)):null},addPlugin:function(p,q){b.prototype[p]=q;return $f},each:n,extend:j});if(typeof jQuery=="function"){jQuery.fn.flowplayer=function(r,q){if(!arguments.length||typeof arguments[0]=="number"){var p=[];this.each(function(){var s=$f(this);if(s){p.push(s)}});return arguments.length?p[arguments[0]]:new d(p)}return this.each(function(){$f(this,l(r),q?l(q):{})})}}}();!function(){var h=document.all,j="http://get.adobe.com/flashplayer",c=typeof jQuery=="function",e=/(\d+)[^\d]+(\d+)[^\d]*(\d*)/,b={width:"100%",height:"100%",id:"_"+(""+Math.random()).slice(9),allowfullscreen:true,allowscriptaccess:"always",quality:"high",version:[3,0],onFail:null,expressInstall:null,w3c:false,cachebusting:false};if(window.attachEvent){window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}})}function i(m,l){if(l){for(var f in l){if(l.hasOwnProperty(f)){m[f]=l[f]}}}return m}function a(f,n){var m=[];for(var l in f){if(f.hasOwnProperty(l)){m[l]=n(f[l])}}return m}window.flashembed=function(f,m,l){if(typeof f=="string"){f=document.getElementById(f.replace("#",""))}if(!f){return}if(typeof m=="string"){m={src:m}}return new d(f,i(i({},b),m),l)};var g=i(window.flashembed,{conf:b,getVersion:function(){var m,f;try{f=navigator.plugins["Shockwave Flash"].description.slice(16)}catch(o){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=m&&m.GetVariable("$version")}catch(n){try{m=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f=m&&m.GetVariable("$version")}catch(l){}}}f=e.exec(f);return f?[1*f[1],1*f[(f[1]*1>9?2:3)]*1]:[0,0]},asString:function(l){if(l===null||l===undefined){return null}var f=typeof l;if(f=="object"&&l.push){f="array"}switch(f){case"string":l=l.replace(new RegExp('(["\\\\])',"g"),"\\$1");l=l.replace(/^\s?(\d+\.?\d*)%/,"$1pct");return'"'+l+'"';case"array":return"["+a(l,function(o){return g.asString(o)}).join(",")+"]";case"function":return'"function()"';case"object":var m=[];for(var n in l){if(l.hasOwnProperty(n)){m.push('"'+n+'":'+g.asString(l[n]))}}return"{"+m.join(",")+"}"}return String(l).replace(/\s/g," ").replace(/\'/g,'"')},getHTML:function(o,l){o=i({},o);var n=''}o.width=o.height=o.id=o.w3c=o.src=null;o.onFail=o.version=o.expressInstall=null;for(var m in o){if(o[m]){n+=''}}var p="";if(l){for(var f in l){if(l[f]){var q=l[f];p+=f+"="+(/function|object/.test(typeof q)?g.asString(q):q)+"&"}}p=p.slice(0,-1);n+='"}n+="";return n},isSupported:function(f){return k[0]>f[0]||k[0]==f[0]&&k[1]>=f[1]}});var k=g.getVersion();function d(f,n,m){if(g.isSupported(n.version)){f.innerHTML=g.getHTML(n,m)}else{if(n.expressInstall&&g.isSupported([6,65])){f.innerHTML=g.getHTML(i(n,{src:n.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title})}else{if(!f.innerHTML.replace(/\s/g,"")){f.innerHTML="

Flash version "+n.version+" or greater is required

"+(k[0]>0?"Your version is "+k:"You have no flash plugin installed")+"

"+(f.tagName=="A"?"

Click here to download latest version

":"

Download latest version from here

");if(f.tagName=="A"||f.tagName=="DIV"){f.onclick=function(){location.href=j}}}if(n.onFail){var l=n.onFail.call(this);if(typeof l=="string"){f.innerHTML=l}}}}if(h){window[n.id]=document.getElementById(n.id)}i(this,{getRoot:function(){return f},getOptions:function(){return n},getConf:function(){return m},getApi:function(){return f.firstChild}})}if(c){jQuery.tools=jQuery.tools||{version:"3.2.12"};jQuery.tools.flashembed={conf:b};jQuery.fn.flashembed=function(l,f){return this.each(function(){$(this).data("flashembed",flashembed(this,l,f))})}}}(); \ No newline at end of file diff --git a/lib/flowplayer/flowplayer-3.2.14.swf b/lib/flowplayer/flowplayer-3.2.14.swf deleted file mode 100644 index bee3b6030bb..00000000000 Binary files a/lib/flowplayer/flowplayer-3.2.14.swf and /dev/null differ diff --git a/lib/flowplayer/flowplayer-3.2.16.swf b/lib/flowplayer/flowplayer-3.2.16.swf new file mode 100644 index 00000000000..a7f1e5cf4d9 Binary files /dev/null and b/lib/flowplayer/flowplayer-3.2.16.swf differ diff --git a/lib/flowplayer/flowplayer.controls-3.2.13.swf b/lib/flowplayer/flowplayer.controls-3.2.13.swf deleted file mode 100644 index 61e95d478a4..00000000000 Binary files a/lib/flowplayer/flowplayer.controls-3.2.13.swf and /dev/null differ diff --git a/lib/flowplayer/flowplayer.controls-3.2.15.swf b/lib/flowplayer/flowplayer.controls-3.2.15.swf new file mode 100644 index 00000000000..8809004d45e Binary files /dev/null and b/lib/flowplayer/flowplayer.controls-3.2.15.swf differ diff --git a/lib/javascript-static.js b/lib/javascript-static.js index c225d96a52a..3d98c8b349d 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1839,9 +1839,9 @@ M.util.load_flowplayer = function() { for(var i=0; i 0 && video.height > 0) { - var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', width: video.width, height: video.height}; + var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf', width: video.width, height: video.height}; } else { - var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf'; + var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf'; } flowplayer(video.id, src, { plugins: {controls: controls}, @@ -1941,7 +1941,7 @@ M.util.load_flowplayer = function() { controls.height = 25; controls.time = true; } - flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', { + flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf', { plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.10.swf'}}, clip: {url: audio.fileurl, provider: "audio", autoPlay: false} }); @@ -1949,9 +1949,9 @@ M.util.load_flowplayer = function() { } if (M.cfg.jsrev == -1) { - var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.11.js'; + var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.12.js'; } else { - var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.11.min.js&rev=' + M.cfg.jsrev; + var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.12.min.js&rev=' + M.cfg.jsrev; } var fileref = document.createElement('script'); fileref.setAttribute('type','text/javascript'); diff --git a/lib/thirdpartylibs.xml b/lib/thirdpartylibs.xml index c3b77933b23..9a1d6a21bb3 100644 --- a/lib/thirdpartylibs.xml +++ b/lib/thirdpartylibs.xml @@ -95,7 +95,7 @@ flowplayer Flowplayer GPL - 3.2.14 + 3.2.16 3