Fixed the zooming issue on netflix.

This commit is contained in:
Tamius Han 2017-01-14 11:03:53 +01:00
parent 43a3da6c56
commit 101a772df3

View File

@ -1095,7 +1095,7 @@ function changeCSS_nofs(what_do, video, player){
var left; var left;
var evideo = $("video")[0]; var evideo = $("video")[0];
var video = {width: evideo.videoWidth, height: evideo.videoHeight}; var video = {width: evideo.videoWidth, height: evideo.videoHeight, scrollw: evideo.scrollWidth, scrollh: evideo.scrollWidth};
var ar = video.width / video.height; var ar = video.width / video.height;
@ -1140,8 +1140,8 @@ function changeCSS_nofs(what_do, video, player){
// Video povečujemo na tak način, da sta zoom in unzoom povečata oz. zmanjšata video za enak korak // Video povečujemo na tak način, da sta zoom in unzoom povečata oz. zmanjšata video za enak korak
// We do this so zoom and unzoom steps change video sizes for the same amount // We do this so zoom and unzoom steps change video sizes for the same amount
h = video.height + (player.height * zoomStep); h = video.scrollw + (player.height * zoomStep);
w = video.width + (player.height * zoomStep * ar); w = video.scrollh + (player.height * zoomStep * ar);
/* Zakaj računamo širino na tak način? /* Zakaj računamo širino na tak način?
// //
// Predstavljajte si, da imamo 2100:900 video v 1600:900 škatli, zoomStep = 0.1. Če bi širino računali po formuli: // Predstavljajte si, da imamo 2100:900 video v 1600:900 škatli, zoomStep = 0.1. Če bi širino računali po formuli:
@ -1190,8 +1190,8 @@ function changeCSS_nofs(what_do, video, player){
if(what_do == "unzoom"){ if(what_do == "unzoom"){
// Video povečujemo na tak način, da sta zoom in unzoom povečata oz. zmanjšata video za enak korak // Video povečujemo na tak način, da sta zoom in unzoom povečata oz. zmanjšata video za enak korak
// We do this so zoom and unzoom steps change video sizes for the same amount // We do this so zoom and unzoom steps change video sizes for the same amount
h = video.height - (player.height * zoomStep); h = video.scrollh - (player.height * zoomStep);
w = video.width - (player.height * zoomStep * ar); w = video.scrollw - (player.height * zoomStep * ar);
top = (player.height - h)/2 top = (player.height - h)/2
left = (player.width - w) / 2; left = (player.width - w) / 2;