Ok I have a version ready now that I thinks solves some of the issues discussed. But can I get a consensus on something.
The Controller will now worksout how many videos are on the current scene. It does this for any video that has the class “hype_mp4video”
It will by default be controlling the first video.
(This means if we have two videos on a scene they are referenced in an array. So video 1 would be item 0 in the array, video 2 would be item 1 in the array since array item numbers start from 0 not 1.)
This means you can have multiple videos on the same scene and a single controller for all of them and/or scenes with a single video and controller.
I have added code that dynamically adds an attribute to the video element. called video_index
which will hold i the videos index number. i.e 0,1, 2, depending which video it is on the scene.
I also add a click action to the video which uses this index number to tell the controller which video it is controlling.
This means by simply clicking a video the controller will pause the current video and play the clicked one.
There is also a slide down on the controller to choose a video on the scene to play, which uses all the same functions and code.
My questions is what would people prefer. Both slider and video click or one or the other.
I personally like the video click.