-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
loading spinner should be removed from DOM and not just set to display:none #518
Comments
Long term I'm thinking the right way to make the spinner work is to have it react to player css classes. e.g. when the player is waiting it should add the vjs-waiting class. Same with vjs-seeking. And then the spinner (including transforms) would be limited to only the times when the player has those classes. |
@heff agree adding and removing CSS classes is the ways to go. |
+1 - Just an internal reminder here :) |
Thanks for your help on this Tim. #1351 addresses this if you're interested in reviewing it. It will go out with the next release. |
Thanks @heff looks great! I agree className switching is the answer. |
CSS transform has a tendency to max out the CPU even when the
.vjs-loading-spinner
is reset todisplay:none
.A better solution for loading spinner is to remove it from the DOM
parent.removeChild(child)
and then add it backparent.appendChild(child)
. I guess this could mean adding the following methods to video-js.js:this.add()
andthis.remove()
to replace the cases where the loading spinner makes use ofthis.show()
andthis.hide()
.Note: in the video-js.css file,
.vjs-loading-spinner
would be changed todisplay:inline-block
.The text was updated successfully, but these errors were encountered: