forked from EXT/VR180-Web-Player
Implement dynamic UI creation for VR180 player
- Remove static HTML elements (play button and control panel) from index.html - Add createPlayButton() and create2DControlPanel() functions to dynamically generate UI - Update DOMContentLoaded handler to create and insert UI elements on page load - Maintain all existing functionality while making player more modular and self-contained - UI elements are now created entirely by JavaScript, making the player easier to integrate - Tested and verified: play button appears correctly, 2D mode works, controls function properly
This commit is contained in:
25
index.html
25
index.html
@@ -30,30 +30,7 @@
|
||||
<video id="vr180" poster="poster.jpg" title="Demo Video" crossOrigin="anonymous" playsinline>
|
||||
<source src="sbs-video.mp4" type="video/mp4">
|
||||
</video>
|
||||
<button id="playBtn" aria-label="Play video">
|
||||
<img src="vr180player/images/play.png" alt="Play">
|
||||
</button>
|
||||
<div id="panel">
|
||||
<div id="status">
|
||||
<p id="video-title">Title</p>
|
||||
<div id="progress">
|
||||
<p id="current-time">00:00:00</p>
|
||||
<div id="bar">
|
||||
<div id="played"></div>
|
||||
</div>
|
||||
<p id="total-time">00:00:00</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="controls">
|
||||
<button id="fullscreen"></button>
|
||||
<div id="nav">
|
||||
<button id="back"></button>
|
||||
<button id="play2"></button>
|
||||
<button id="forward"></button>
|
||||
</div>
|
||||
<button id="mute"></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- UI elements will be dynamically inserted here by JavaScript -->
|
||||
</div>
|
||||
</main>
|
||||
<script type="module" src="vr180player/vr180-player.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user