-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiframePlayer.js
More file actions
28 lines (24 loc) · 835 Bytes
/
iframePlayer.js
File metadata and controls
28 lines (24 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
document.addEventListener('DOMContentLoaded', function() {
const videoUrls = [
'https://www.signbsl.com/sign/science', // Add the URLs for each sign
// ... other URLs
];
let currentVideoIndex = 0;
const iframe = document.getElementById('bslFrame');
function loadVideo(url) {
iframe.src = url;
}
function playNextVideo() {
if (currentVideoIndex < videoUrls.length) {
loadVideo(videoUrls[currentVideoIndex]);
currentVideoIndex++;
} else {
console.log('All videos played.');
}
}
playNextVideo(); // Play the first video
iframe.addEventListener('load', function() {
// Optionally, move to the next video after a set timeout
setTimeout(playNextVideo, 10000); // Adjust time as needed
});
});