You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.
When clicking the fullscreen button for videos on YouTube, the video will stretch to fill the entire screen disregarding the original aspect ratio of the video.
A possible workaround can be found inside this extension:
This is how the author of FullScreenYouTube deals with it:
function goToFullScreen(){
var video = document.getElementsByClassName("video-stream")[0];
// Set the width of the video /element/ to the width of the actual video to
// prevent stretching a 4:3 video onto a 16:9 screen
// Note: this currently breaks the 'change size' function because the size sticks and
// we can't detect exiting full-screen to reset it.
var w = (video.clientHeight * video.videoWidth) / video.videoHeight;
video.style.width = Math.ceil(w) + "px";
video.style.height = video.clientHeight + "px";
video.webkitEnterFullScreen();
}
Pretty neat and it does the job well.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When clicking the fullscreen button for videos on YouTube, the video will stretch to fill the entire screen disregarding the original aspect ratio of the video.
A possible workaround can be found inside this extension:
http://www.cyberhq.nl/2010/06/08/restore-full-screen-playback-in-youtubes-html5-player.html
The text was updated successfully, but these errors were encountered: