Starting on line 12 (relative to this code segment) I am setting a global variable to keep count of how many source objects of k8r_modalVideo are ready to be played.
Below line 12 I am attempting to set up an even protocol, "When the source object of k8r_modalVideo are 'ready' then add 1 to the counter".
For beta 3. The videos do eventually show, but the load spinner doesn't play through. you'll notice a pause blank screen and the video controls will be at the bottom of the modal box. This tells me that the video div is covering the load spinner.
Additional Notes:
the #k8r_modalVideo object is generated when a "video bringer" is clicked.
- function loadNewContent(my){
- var ogv,mpx;
- ogv = my.attr("ogv");
- mp4 = my.attr("mpx");
- addModalVideo();
- addModalLoader();
- videoBox = $('#k8r_modalVideo');
- videoBox.prepend('<source src="'+ogv+'" type="video/ogg"/><source src="'+mp4+'" type="video/mp4"/>');
- videoBox.hide();
-
- window.videosLoaded = 0;
-
- $('#k8r_modalVideo').ready(function(){
- //alert();
- window.videosLoaded += 1;
- if (window.videosLoaded == 2){
- $('#k8r_modalLoader').hide();
- $('#k8r_modalVideo').show();
- }
- });
- }
Here is more code context:
--- Keysle