--- a/integration/tag.html Wed Dec 19 16:55:00 2012 +0100
+++ b/integration/tag.html Mon Dec 17 18:19:36 2012 +0100
@@ -27,12 +27,32 @@
post_annotation : "testdata/post-test.php",
tag_page : "niv2_rv.html?tag=__TAG__"
};
+ if (typeof window.localStorage !== "undefined" && window.localStorage.getItem !== "undefined") {
+ var res = window.localStorage.getItem("resolution") || "SD";
+ } else {
+ var res = "SD";
+ }
+ IriSP.video_url_transform = function(url) {
+ return url.replace(/([SH]D)\.[a-z0-9]+$/,res);
+ }
$(function() {
$("h1").text(tag);
+
IriSP.tagplayer({
tag : tag
});
+
+ $(".sdhdgroup").addClass(res);
+
+ $(".sdhdbtn").click(function() {
+ var newres = $(this).attr("title");
+ if (res !== newres) {
+ window.localStorage.setItem("resolution", newres);
+ document.location.reload();
+ }
+ return false;
+ });
});
</script>
@@ -80,7 +100,11 @@
<div class="container_hcentering">
<a id="btnInfo" class="btn" href="#" title="info"></a>
- <a id="btnSDHD" class="btn" href="#" title="SD/HD"></a>
+ <div class="sdhdgroup">
+ <a id="btnSD" class="sdhdbtn" href="#" title="SD"></a>
+ <div class="sdhdbtn sdhdsep"></div>
+ <a id="btnHD" class="sdhdbtn" href="#" title="HD"></a>
+ </div>
<div id="progressContainer" class="floatL">