Skip to content

Commit

Permalink
docs: fix videojs demo not working on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
WoodNeck authored Jan 4, 2022
1 parent f968184 commit b2bcb47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
12 changes: 5 additions & 7 deletions demo/examples/panoviewer/etc/videojs.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<title>eg.view360 examples Video.js with view360</title>
<link rel="stylesheet" type="text/css" href="../../../common/css/demo.css">
<link href="https://vjs.zencdn.net/5.4.6/video-js.css" rel="stylesheet" type="text/css">
<link href="https://vjs.zencdn.net/7.17.0/video-js.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="../../../common/css/PanoControls.css">

<script src="../../../common/js/jquery-2.2.4.js"></script>
<script src="../../../common/js/codepen.js"></script>
<script src="../../../common/js/qrcode.js"></script>
<script src="../../../common/js/PieView.js"></script>
<script src="../../../common/js/screenfull.min.js"></script>
<script src="https://vjs.zencdn.net/5.4.6/video.js"></script>
<script src="https://vjs.zencdn.net/7.17.0/video.js"></script>
<script src="../../../release/latest/dist/view360.pkgd.js"></script>
<script src="../../../common/js/PanoControls.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js"></script>
Expand Down Expand Up @@ -168,15 +168,13 @@ <h2>You can use video.js with view360.</h2>
</div>
</body>
<script>
var video = document.querySelector(".viewer video");

videojs("video").ready(function () {
videojs("video").ready(function () {
var video = document.querySelector(".viewer video");
var videoContainer = document.querySelector("#video");
var view360Container = document.createElement('div');

view360Container.className = "container";
videoContainer.insertBefore(view360Container, videoContainer.firstChild);
// video.style.display = "none";

var panoViewer = new eg.view360.PanoViewer(view360Container,
{
Expand All @@ -185,7 +183,7 @@ <h2>You can use video.js with view360.</h2>
useZoom: false,
}
);
window.panoViewer

window.addEventListener("resize", function() {
panoViewer.updateViewportDimensions();
});
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egjs/view360",
"version": "3.6.2",
"version": "3.6.2-snapshot",
"description": "360 integrated viewing solution from inside-out view to outside-in view. It provides user-friendly service by rotating 360 degrees through various user interaction such as motion sensor and touch.",
"main": "dist/view360.js",
"module": "dist/view360.esm.js",
Expand Down

0 comments on commit b2bcb47

Please sign in to comment.