diff -r 285f51fd2480 -r b7017da5a7b5 integration/content.html --- a/integration/content.html Wed Dec 19 16:55:00 2012 +0100 +++ b/integration/content.html Mon Dec 17 18:19:36 2012 +0100 @@ -26,10 +26,29 @@ post_annotation : "testdata/post-test.php", tag_page : "tag.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() { IriSP.contentplayer({ project_url: "http://theend-integ.ftinfo.fr/theend/ldt/cljson/id/" + project }); + + $(".sdhdgroup").addClass(res); + + $(".sdhdbtn").click(function() { + var newres = $(this).attr("title"); + if (res !== newres) { + window.localStorage.setItem("resolution", newres); + document.location.reload(); + } + return false; + }); }); @@ -77,7 +96,11 @@
- +
+ +
+ +