# HG changeset patch # User Raphael Velt # Date 1337619162 -7200 # Node ID 44f90de0016fe3cfdbea8db46b62e1b21cb8129f # Parent 953c68b4da79fa929bdf6fc5602ed277c8c68227 corrections diff -r 953c68b4da79 -r 44f90de0016f web/client.php --- a/web/client.php Mon May 21 18:18:08 2012 +0200 +++ b/web/client.php Mon May 21 18:52:42 2012 +0200 @@ -66,7 +66,7 @@ - + diff -r 953c68b4da79 -r 44f90de0016f web/embedscript.php --- a/web/embedscript.php Mon May 21 18:18:08 2012 +0200 +++ b/web/embedscript.php Mon May 21 18:52:42 2012 +0200 @@ -57,14 +57,14 @@ window.setTimeout(function() { _blocked = false; }, 1000); - _frame.contentWindow.postMessage({type: "hashchange", hash: document.location.hash}, "*"); + _frame.contentWindow.postMessage(document.location.hash, "*"); }; window.onhashchange = _updater; window.addEventListener('message', function(_e) { - if (_e.data.type === "hashchange" && !_blocked) { - document.location.hash = _e.data.hash; + if (/^#/.test(_e.data) && !_blocked) { + document.location.hash = _e.data; } }); diff -r 953c68b4da79 -r 44f90de0016f web/player_embed.php --- a/web/player_embed.php Mon May 21 18:18:08 2012 +0200 +++ b/web/player_embed.php Mon May 21 18:52:42 2012 +0200 @@ -14,53 +14,32 @@ // - limite taille vertical embed // - ajouter la polemic timline en dessous de la video +if (is_array($config['metadata'])) { + if (array_key_exists("metadata",$_GET) && array_key_exists($_GET['metadata'], $config['metadata'])) { + $metadata_url = $config['metadata'][$_GET['metadata']]['url']; + } else { + $keys = array_keys($config['metadata']); + $metadata_url = $config['metadata'][$keys[0]]['url']; + } +} else { + $metadata_url = $config['metadata']; +} ?> Polemic Tweet Embedded Player - - - - - - - - ' rel='stylesheet' type='text/css'/> - ' rel='stylesheet' type='text/css'/> - - + diff -r 953c68b4da79 -r 44f90de0016f web/res/metadataplayer/Mediafragment.js --- a/web/res/metadataplayer/Mediafragment.js Mon May 21 18:18:08 2012 +0200 +++ b/web/res/metadataplayer/Mediafragment.js Mon May 21 18:52:42 2012 +0200 @@ -5,8 +5,8 @@ window.onhashchange = this.functionWrapper("goToHash"); if (typeof window.addEventListener !== "undefined") { window.addEventListener('message', function(_msg) { - if (_msg.data.type === "hashchange") { - document.location.hash = _msg.data.hash; + if (/^#/.test(_msg.data)) { + document.location.hash = _msg.data; } }) }; @@ -73,10 +73,7 @@ var _hash = this.getLastHash(); document.location.hash = _hash; if (window.parent !== window) { - window.parent.postMessage({ - type: "hashchange", - hash: _hash - },"*") + window.parent.postMessage(_hash,"*") } this.block(); }