I currently modified the Simple Video Player package - which simply plays flash videos via inserting a macro. However, I'm getting a really odd bug - when you visit the site the video will not play - but it will then play if you refresh the page. The actual occurence of the bug is quite unpredictable - you can see the videos playing on each page then all of a sudden they won't load. I have checked permissions and everything seems ok - I have a feeling it might be the Javascript not executing properly in the XSLT file. Here is the site:
If the video does load first time, then click around a few pages and you'll notice them stop loading all of a sudden. Are there any known bugs surrounding JavaScript in XSLT or video playback?
Thanks for the reply - I have the following in my JS which seems to be defining the function
function callFlashPlayPauseVideo(number)
However, I notice I'm adding in an unecessary parameter - but even when I remove this parameter - the problem still exists.
As for the jquery - I'm not really any good with jquery I just have it added for my gallery etc so I was sticking to what I know using the body onload.
What I think _might_ be happening is that the function is being called too quick, although I haven't been able to spend a great deal of time investigating.
If this is the case, you could quickly check by removing the body onload and putting the video calls into the document ready e.g.
Nope, won't even load the functions using the jquery method, I'm afraid. Thanks anyway. The code works fine when the JS in inside its own .js file and not the XSLT - it's just when the page initially loads - it states that the main variable doesn't exist. I'm wondering what the different is between a page loading an a refresh. Maybe something to do with the variable being in scope?
Weird behaviour for playing Flash Videos
Hi everyone,
I currently modified the Simple Video Player package - which simply plays flash videos via inserting a macro. However, I'm getting a really odd bug - when you visit the site the video will not play - but it will then play if you refresh the page. The actual occurence of the bug is quite unpredictable - you can see the videos playing on each page then all of a sudden they won't load. I have checked permissions and everything seems ok - I have a feeling it might be the Javascript not executing properly in the XSLT file. Here is the site:
http://demo.sdesign1dev.co.uk
If the video does load first time, then click around a few pages and you'll notice them stop loading all of a sudden. Are there any known bugs surrounding JavaScript in XSLT or video playback?
Thanks, Garry.
Seems to be throwing a js error that
Is not defined. I notice you're using jquery, why not throw this call into document.ready instead of body onload?
Dan
Hi Dan,
Thanks for the reply - I have the following in my JS which seems to be defining the function
function callFlashPlayPauseVideo(number)
However, I notice I'm adding in an unecessary parameter - but even when I remove this parameter - the problem still exists.
As for the jquery - I'm not really any good with jquery I just have it added for my gallery etc so I was sticking to what I know using the body onload.
Cheers, Garry.
What I think _might_ be happening is that the function is being called too quick, although I haven't been able to spend a great deal of time investigating.
If this is the case, you could quickly check by removing the body onload and putting the video calls into the document ready e.g.
becomes
Might be worth a shot!
Dan
2nd example should just have
Dan
Nope, won't even load the functions using the jquery method, I'm afraid. Thanks anyway. The code works fine when the JS in inside its own .js file and not the XSLT - it's just when the page initially loads - it states that the main variable doesn't exist. I'm wondering what the different is between a page loading an a refresh. Maybe something to do with the variable being in scope?
is working on a reply...