|
| 1 | +# 360° Image & Video Viewer |
| 2 | + |
| 3 | +A lightweight, browser-based viewer for 360-degree images and videos. No additional setup required, just open the HTML file in any modern browser. |
| 4 | + |
| 5 | + |
| 6 | +<div align="left"> |
| 7 | + <img src="examples/example_image.png" width="710px"> |
| 8 | +</div> |
| 9 | + |
| 10 | +Try it out here: https://progamergov.github.io/html-360-viewer |
| 11 | + |
| 12 | +Supports: |
| 13 | + |
| 14 | +* 360° panoramic **images**, most formats supported by browsers, like [JPEG](https://en.wikipedia.org/wiki/JPEG) (includes '.jpg'), [PNG](https://en.wikipedia.org/wiki/PNG), [WebP](https://en.wikipedia.org/wiki/WebP), etc. |
| 15 | +* 360° **videos** in [.mp4](https://en.wikipedia.org/wiki/MP4_file_format) and [.webm](https://en.wikipedia.org/wiki/WebM) format. Works as a 360 video player. |
| 16 | +* Monoscopic 360 images and stereo images in **top-bottom** and **left-right** layouts |
| 17 | + |
| 18 | + |
| 19 | +## 🧪 Compatibility |
| 20 | + |
| 21 | +Work on all major web browsers that [A-Frame](https://aframe.io/docs/1.7.0/introduction/faq.html) supports. |
| 22 | + |
| 23 | +* [Firefox](https://en.wikipedia.org/wiki/Firefox) |
| 24 | +* [Chrome](https://en.wikipedia.org/wiki/Google_Chrome) (including Chromium based browsers like [Brave](https://en.wikipedia.org/wiki/Brave_(web_browser)) & [Opera](https://en.wikipedia.org/wiki/Opera_(web_browser))) |
| 25 | +* [Microsoft Edge](https://en.wikipedia.org/wiki/Microsoft_Edge) |
| 26 | +* [Safari](https://www.apple.com/ca/safari/) |
| 27 | + |
| 28 | + |
| 29 | +## 🚀 Features |
| 30 | + |
| 31 | +* **Drag & Drop** support for instant media viewing |
| 32 | +* **Stereo toggle** switch between monoscopic and stereo images (mono/top-bottom/side-by-side) |
| 33 | +* **Zooming** via mouse wheel or pinch gesture |
| 34 | +* **Interactive panning** with mouse or touch |
| 35 | +* **Fullscreen** mode via the bottom right button. |
| 36 | +* **Screenshot** functionality (UI hidden in capture) |
| 37 | +* **Video controls**: play/pause, timeline slider |
| 38 | + |
| 39 | + |
| 40 | +## 📦 Getting Started |
| 41 | + |
| 42 | +**Option 1 – Local Use** |
| 43 | + |
| 44 | +1. Download or clone this repository. |
| 45 | +2. Open `viewer360.html` in your browser. |
| 46 | +3. Drag and drop a supported 360° image or video file, or click "Select Media" to browse. |
| 47 | + |
| 48 | +**Option 2 – Web Demo** |
| 49 | + |
| 50 | +1. Visit the [live demo](http://progamergov.github.io/html-360-viewer) in your browser. |
| 51 | +2. Upload a 360° image or video to start viewing. |
| 52 | + |
| 53 | +**Option 3 – Local Copy** |
| 54 | + |
| 55 | +1. Copy the full contents of `viewer360.html` into a new text file. |
| 56 | +2. Rename the file to something like `viewer360.html` (make sure it ends in `.html`). |
| 57 | +3. Open it in your browser. |
| 58 | + |
| 59 | + |
| 60 | +## 🕹️ Controls |
| 61 | + |
| 62 | +| Action | How to Use | |
| 63 | +| ------------------ | ------------------------------------ | |
| 64 | +| Pan View | Left-click + drag or touch + drag | |
| 65 | +| Zoom | Mouse wheel or pinch gesture | |
| 66 | +| Fullscreen | Use the browser's fullscreen control | |
| 67 | +| Stereo Toggle | Bottom-left “Stereo” button | |
| 68 | +| Screenshot | Camera icon at bottom center | |
| 69 | +| Upload/Reset Media | “Upload” button below controls | |
| 70 | +| Play/Pause Video | Play/pause button on video controls | |
| 71 | +| Seek in Video | Use the timeline slider | |
| 72 | + |
| 73 | + |
| 74 | +## 🤝 Contributing |
| 75 | + |
| 76 | +Contributions are welcome! Please feel free to submit a Pull Request. |
| 77 | + |
| 78 | + |
| 79 | +## 🔬 Citation |
| 80 | + |
| 81 | +If you use this library in your research or project, please refer to the included [CITATION.cff](CITATION.cff) file or cite it as follows: |
| 82 | + |
| 83 | +### BibTeX |
| 84 | +```bibtex |
| 85 | +@misc{egan2025browser360html, |
| 86 | + title={Browser-Based Viewer for 360 Images and Videos}, |
| 87 | + author={Egan, Ben}, |
| 88 | + year={2025}, |
| 89 | + publisher={GitHub}, |
| 90 | + howpublished={\url{https://github.com/ProGamerGov/html-360-viewer}} |
| 91 | +} |
| 92 | +``` |
| 93 | + |
| 94 | +### APA Style |
| 95 | +``` |
| 96 | +Egan, B. (2025). Browser-Based Viewer for 360 Images and Videos [Computer software]. GitHub. https://github.com/ProGamerGov/html-360-viewer |
| 97 | +``` |
0 commit comments