I'm currently utilizing Photo Sphere Viewer to showcase a panoramic image similar to how Facebook does it, but I am encountering some difficulties.
Below is the code snippet:
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3141435e5c5842541c415e5d4857585d5d71091f001f02">[email protected]</a>/dist/polyfill.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="67120211020913275549574957">[email protected]</a>/browser.js"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="70041802151530405e4141455e40">[email protected]</a>/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/photo-sphere-viewer@4/dist/photo-sphere-viewer.css">
<div id="photosphere"></div>
<script>
new PhotoSphereViewer.Viewer({
panorama: 'https://terrafrost.sfo2.digitaloceanspaces.com/20200618_131549.jpg',
container: 'photosphere',
caption: 'Parc national du Mercantour <b>© Damien Sorel</b>',
loadingImg: 'https://terrafrost.sfo2.cdn.digitaloceanspaces.com/photosphere-logo.gif',
defaultLat: 0.3,
touchmoveTwoFingers: true,
mousewheelCtrlKey: true,
});
</script>
Upon executing this code, two errors appear in the JS console:
- PhotoSphereViewer: invalid XMP data (from psv.js:11)
- WebGL: INVALID_VALUE: texImage2D: bad image data (from three.min.js:130)
Any insights on where I might be going wrong or what I should do differently?
Appreciate any assistance!