Show 'Loading...' text when clicking play button on WebRTC player
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s
This commit is contained in:
@@ -191,8 +191,12 @@
|
|||||||
|
|
||||||
// Add click handlers to both overlay and video
|
// Add click handlers to both overlay and video
|
||||||
const startPlayback = () => {
|
const startPlayback = () => {
|
||||||
|
playOverlay.innerHTML = 'Loading...';
|
||||||
video.play().then(() => {
|
video.play().then(() => {
|
||||||
playOverlay.style.display = 'none';
|
playOverlay.style.display = 'none';
|
||||||
|
}).catch(e => {
|
||||||
|
playOverlay.innerHTML = '▶️ Click to Play';
|
||||||
|
console.error('Failed to start playback:', e);
|
||||||
});
|
});
|
||||||
video.onclick = null;
|
video.onclick = null;
|
||||||
playOverlay.onclick = null;
|
playOverlay.onclick = null;
|
||||||
|
Reference in New Issue
Block a user