It works correctly if I publish only one scene (no meter which one), but it doesn't work at all if I publish entire project. Even in this case script executes. I cheeked it by adding debugging code
Without seeing any project, this can be scope related. Storyline triggers only work in a specific scope. Being on that slide with the particular action you use. If you need global triggerable Javascript actions you need to define them differently so you can call them anywhere.
On the selector part... With only 1 video your code is fine.. When you have multiple videos over different slides... you need to use another selector...
var videos =document.querySelectorAll('video'); for (var i=0;i<videos.length;i++) { videos[i].playbackRate = 5; }
Keep in mind though that DS-bootstrap on which Storyline is based has some limits on the amount of speeding up media-elements. I noticed using up to 15x works, and when trying to speed up to 25x you get a error-message from DS-bootstrap that your speed is too high ;-)
I have 3 scripts running on three separate slides... it appears that if one of them has as an error then none of them will work! I had left a rogue bracket!
4 Replies
Hi Tatiana,
Did you manage to figure this one out?
I am having the same problem, my code works fine if i publish just the one scene but when i publish the entire project none of my JS code works...
Anyone else have any ideas?
Thanks!
Without seeing any project, this can be scope related. Storyline triggers only work in a specific scope. Being on that slide with the particular action you use. If you need global triggerable Javascript actions you need to define them differently so you can call them anywhere.
On the selector part...
With only 1 video your code is fine..
When you have multiple videos over different slides... you need to use another selector...
var videos =document.querySelectorAll('video');
for (var i=0;i<videos.length;i++)
{
videos[i].playbackRate = 5;
}
Keep in mind though that DS-bootstrap on which Storyline is based has some limits on the amount of speeding up media-elements. I noticed using up to 15x works, and when trying to speed up to 25x you get a error-message from DS-bootstrap that your speed is too high ;-)All sorted,
I have 3 scripts running on three separate slides... it appears that if one of them has as an error then none of them will work! I had left a rogue bracket!
You have been warned :-)