integration/tag.html
changeset 57 b7017da5a7b5
parent 50 9cc1b66d0880
child 58 00632d0dee47
equal deleted inserted replaced
56:285f51fd2480 57:b7017da5a7b5
    25                 mashup_by_tag : "http://theend-integ.ftinfo.fr/theend/ldt/mashupbytag/",
    25                 mashup_by_tag : "http://theend-integ.ftinfo.fr/theend/ldt/mashupbytag/",
    26                 annotations_by_timecode : "http://theend-integ.ftinfo.fr/theend/api/ldt/1.0/segments/bytimecode/__CONTENT_ID__/__BEGIN__/__END__",
    26                 annotations_by_timecode : "http://theend-integ.ftinfo.fr/theend/api/ldt/1.0/segments/bytimecode/__CONTENT_ID__/__BEGIN__/__END__",
    27                 post_annotation : "testdata/post-test.php",
    27                 post_annotation : "testdata/post-test.php",
    28                 tag_page : "niv2_rv.html?tag=__TAG__"
    28                 tag_page : "niv2_rv.html?tag=__TAG__"
    29             };
    29             };
       
    30             if (typeof window.localStorage !== "undefined" && window.localStorage.getItem !== "undefined") {
       
    31                 var res = window.localStorage.getItem("resolution") || "SD";
       
    32             } else {
       
    33                 var res = "SD";
       
    34             }
       
    35             IriSP.video_url_transform = function(url) {
       
    36                 return url.replace(/([SH]D)\.[a-z0-9]+$/,res);
       
    37             }
    30             $(function() {
    38             $(function() {
    31                 $("h1").text(tag);
    39                 $("h1").text(tag);
       
    40                 
    32 
    41 
    33                 IriSP.tagplayer({
    42                 IriSP.tagplayer({
    34                     tag : tag
    43                     tag : tag
       
    44                 });
       
    45                 
       
    46                 $(".sdhdgroup").addClass(res);
       
    47                 
       
    48                 $(".sdhdbtn").click(function() {
       
    49                     var newres = $(this).attr("title");
       
    50                     if (res !== newres) {
       
    51                         window.localStorage.setItem("resolution", newres);
       
    52                         document.location.reload();
       
    53                     }
       
    54                     return false;
    35                 });
    55                 });
    36             });
    56             });
    37         </script>
    57         </script>
    38 
    58 
    39     </head>
    59     </head>
    78         <footer id="controlContainer">
    98         <footer id="controlContainer">
    79             <section id="controlbar">
    99             <section id="controlbar">
    80                 <div class="container_hcentering">
   100                 <div class="container_hcentering">
    81                     <a id="btnInfo" class="btn" href="#" title="info"></a>
   101                     <a id="btnInfo" class="btn" href="#" title="info"></a>
    82 
   102 
    83                     <a id="btnSDHD" class="btn" href="#" title="SD/HD"></a>
   103                     <div class="sdhdgroup">
       
   104                         <a id="btnSD" class="sdhdbtn" href="#" title="SD"></a>
       
   105                         <div class="sdhdbtn sdhdsep"></div>
       
   106                         <a id="btnHD" class="sdhdbtn" href="#" title="HD"></a>
       
   107                     </div>
    84 
   108 
    85                     <div id="progressContainer" class="floatL">
   109                     <div id="progressContainer" class="floatL">
    86 
   110 
    87                         <div id="progressBar" class="progress_bar"></div>
   111                         <div id="progressBar" class="progress_bar"></div>
    88 
   112