Forum Discussion
Show / Hide Audio Control for Selected Slides
Hi Crystal,
The first thing I did was check the Slide Properties window.
I was hoping there was a setting somewhere that I missed.
Thank you,
John
- SamWilliamson-e7 years agoCommunity Member
Hey John,
I believe the only way to hide the volume control per slide is using JavaScript, but it should be fairly simple. It's a bit annoying to test as you won't be able to check the results when Previewing in Storyline itself – you'll have to publish to see any 'Script in action – but this particular function shouldn't require too much iteration.
Note: I believe this method will only work for HTML5 output, not Flash. Also, I can't vouch for it working in the new Modern player as I don't have Storyline 360.
Essentially you're creating a custom Trigger Action to show/hide the volume control. So, add a Trigger to one of your video slides:
Action: Execute JavaScript
When: Timeline starts
Object: [Your slide]
Now click the ellipsis button next to Script and simply paste in the following:
$('.btn.cs-button.volume').show()
When your video slide starts it should now show the volume control! However, the control will stay visible until we turn it off again. I'd say the most thorough way to do this – not knowing how your course is structured or restricted – is to place a similar trigger on all of your non-video slides which ensure the volume slider isn't visible, using the following JavaScript:
$('.btn.cs-button.volume').hide()
As I said this code won't execute during Preview, but as long as you place the appropriate Trigger on every slide there should be little to no fiddling involved.
Hope that helps.
- MarkAnthonyChes4 years agoCommunity Member
Hello Sam!
Great idea! How could I use the same approach but referencing a custom menu button in the player?
Any ideas?
Thanks in advance!!!