I’m currently lurking trying to find an answer to a question I think is being discussed here.
getElementsByClassName work for JS applied to onSceneLoad?
Heres the deal. I have 20 movies. I have 20 buttons. When I click one of the buttons, it needs to play the corresponding video. When it plays the video I have it go to a scene where the video is loaded and I subsequently have my
At the moment I have 20 JS functions because I have to specify the
ID for video in the scene. Is there a way to target the parent, instead of the child video, by
// Make a convenient Variable for the video
var mediaElement = document.getElementById("mpVid01");
// Optional: Pause the video (if it is playing)
// rewind the video.
mediaElement.currentTime = 0;
document.getElementById("mpVid01"); - How would I make an array, or target a more generic descriptor for the video object in the scene? The scene is home to one element, the video. Nothing more.