This tutorial covers how you can detect the orientation of mobile devices as well as how you can listen for changes in the orientation of the device. Specifically, this deals with the portrait and landscape orientation of the screen, not the rotation of the device around the x, y, and z axis.
Code GIST: https://gist.github.com/prof3ssorSt3v...
On this page of the site you can watch the video online HTML5 Screen Orientation API with a duration of hours minute second in good quality, which was uploaded by the user Steve Griffith - Prof3ssorSt3v3 23 August 2018, share the link with friends and acquaintances, this video has already been watched 10,488 times on youtube and it was liked by 121 viewers. Enjoy your viewing!