Skip to content

Commit

Permalink
KJSL: Reviving DeviceOrientationControls for iPhone
Browse files Browse the repository at this point in the history
  • Loading branch information
kevleyski committed Jul 30, 2024
1 parent 811c967 commit a3f9fa3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion examples/360.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<link href="../dist/videojs-vr.css" rel="stylesheet">
</head>
<body>
<kevdebug id="kevdebug">iPhone</kevdebug>
<video width="640" height="300" id="videojs-vr-player" class="video-js vjs-default-skin" controls playsinline>
<source src="../samples/eagle-360.mp4" type="video/mp4">
</video>
Expand Down
10 changes: 6 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions vendor/three/DeviceOrientationControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ class DeviceOrientationControls extends EventDispatcher {
this.alphaOffset = 0; // radians

const onDeviceOrientationChangeEvent = function (event) {
const kevdebug = document.getElementById('kevdebug');
if (kevdebug) {
kevdebug.innerHTML = `KEVS pitch=${parseInt(event.alpha, 10)} roll=${parseInt(event.beta, 10)} yaw=${parseInt(event.gamma, 10)}`;
}

scope.deviceOrientation = event;

};

const onScreenOrientationChangeEvent = function () {
Expand Down

0 comments on commit a3f9fa3

Please sign in to comment.