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