web/static/res/js/incplayer.js
changeset 88 eeb0a6f3c07d
parent 80 46b897524cc4
child 93 7c37aaa2a8ae
equal deleted inserted replaced
87:b3188fe3729a 88:eeb0a6f3c07d
    46 	this.init = function(nextPage, videoDivId, playButtonId, hdSdButtonId, progressCurrentId, progressDurationId, progressCursorId, progressBarId, jsonFile)
    46 	this.init = function(nextPage, videoDivId, playButtonId, hdSdButtonId, progressCurrentId, progressDurationId, progressCursorId, progressBarId, jsonFile)
    47 	{
    47 	{
    48 		this.nextPage = nextPage;
    48 		this.nextPage = nextPage;
    49 		this.videoDivId = videoDivId;
    49 		this.videoDivId = videoDivId;
    50 
    50 
    51 		this.readUrlVideosIndex();
       
    52 
       
    53 		// Control
    51 		// Control
    54 		this.playButton = $("#" + playButtonId).get(0);
    52 		this.playButton = $("#" + playButtonId).get(0);
    55 		this.hdSdButton = $("#" + hdSdButtonId).get(0);
    53 		this.hdSdButton = $("#" + hdSdButtonId).get(0);
    56 		this.progressCurrent = $("#" + progressCurrentId);
    54 		this.progressCurrent = $("#" + progressCurrentId);
    57 		this.progressDuration = $("#" + progressDurationId);
    55 		this.progressDuration = $("#" + progressDurationId);
   185 			if(!this.hd) {
   183 			if(!this.hd) {
   186 				v.src = v.src.replace("HD", "SD"); 
   184 				v.src = v.src.replace("HD", "SD"); 
   187 			}
   185 			}
   188 
   186 
   189 			// Extention
   187 			// Extention
   190 			v.src += "." + this.videoExt;
   188 			v.src += "." + /*this.videoExt*/ "mp4"; // TODO
   191 
   189 
   192 			// Set the final file
   190 			// Set the final file
   193 			this.sequences[i] = v;
   191 			this.sequences[i] = v;
   194 		}
   192 		}
   195 
   193 
   824 		    	return "mp4";
   822 		    	return "mp4";
   825 		    }
   823 		    }
   826 		}
   824 		}
   827 		return "";
   825 		return "";
   828 	};
   826 	};
   829 
       
   830 	this.createUrlVideosIndex = function(index1, index2, index3)
       
   831 	{
       
   832 		return ((index1 << 16) | (index2 << 8) | index3) << 4;
       
   833 	}
       
   834 
       
   835 	this.readUrlVideosIndex = function()
       
   836 	{
       
   837 		var query = window.location.search.substring(1);
       
   838 		if (query.length < 0) {
       
   839 			return;
       
   840 		}
       
   841 
       
   842 		var number = parseInt(query);
       
   843 		number = this.createUrlVideosIndex(20, 30, 44);
       
   844 
       
   845 		console.log("query: " + number);
       
   846 		console.log(n);
       
   847 	};
       
   848 }
   827 }
   849 
   828 
   850 var incPlayer = new IncPlayer();
   829 var incPlayer = new IncPlayer();