mirror of
https://github.com/LaQuay/TDTChannels.git
synced 2025-05-20 20:58:24 +02:00
Add information to video
This commit is contained in:
parent
08694e67c9
commit
9c55d849e6
2 changed files with 69 additions and 29 deletions
script/public
33
script/public/index.js
Normal file
33
script/public/index.js
Normal file
|
@ -0,0 +1,33 @@
|
|||
function getResolution(from) {
|
||||
$.get(from, function(data) {
|
||||
$response = data.split("\n");
|
||||
|
||||
$resolutions=[];
|
||||
$.each($response, function( index, value ) {
|
||||
$line_separated_value = value.split(",");
|
||||
for (i = 0; i < $line_separated_value.length; i++) {
|
||||
if ($line_separated_value[i].indexOf("RESOLUTION=") != -1) {
|
||||
$resolutions.push($line_separated_value[i].split('=')[1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: This should be a Callback
|
||||
updateResolution($resolutions);
|
||||
});
|
||||
}
|
||||
|
||||
function getUrlParameter(sParam) {
|
||||
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
|
||||
if (sParameterName[0] === sParam) {
|
||||
return sParameterName[1] === undefined ? true : sParameterName[1];
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue