My task involves managing a video timeline that includes multiple videos, and my goal is to add popups for each video.
I am working on ensuring that the popups will display when the corresponding video plays. If there are multiple objects in the array, I want to cycle through them before continuing with the video.
Although I have attempted to access the objects entries and iterate over them, I am encountering the issue of receiving both entries instead of just one.
let popups = {
0: [{
type: 'alert',
text: 'Alert text',
},
{
type: 'warning',
text: 'Warning text',
},
],
1: [{
type: 'caution',
text: 'Caution text',
}, ],
};