Forum Discussion
Disable dragging a video seekbar in Storyline 360
- 2 years ago
Hi Everyone! I did some JavaScript to make this work by simply adding an Execute JavaScript when the timeline starts Trigger.
These are the JS codes:
// One liner function:
const addCSS = css => document.head.appendChild(document.createElement("style")).innerHTML=css;
// Usage:
addCSS(".video-seekbar {display: none;} .modern-video-controls .video-controlbar {height: 50px !important;}")
Thank you so much, everyone!
Hi Everyone, I just simply created an Execute JavaScript trigger when the timeline starts, copy and paste the code below to your trigger.
These are the JS codes:
// One liner function:
const addCSS = css => document.head.appendChild(document.createElement("style")).innerHTML=css;
// Usage:
addCSS(".video-seekbar {display: none;} .modern-video-controls .video-controlbar {height: 50px !important;}")
@darryl, i know it's been a while but i wanted to say this solution worked for me. the alternative solution posted elsewhere of adding a transparent box didn't work for me because (1) the box doesn't stay put when you resize the screen, and (2) people using the keyboard can still activate it.
My follow-up question for you is: what would be the javascript to enable the bar again once the video is complete?
Thanks!
brenda
- DarrylPalaub4925 months agoCommunity Member
Hi Brenda, you can reverse it using these codes:
// One liner function:
const addCSS = css => document.head.appendChild(document.createElement("style")).innerHTML=css;
// Usage:
addCSS(".video-seekbar {display: block;} .modern-video-controls .video-controlbar {height: 37px !important;}")