silvermine / videojs-quality-selector

MIT License
183 stars 54 forks source link

quality selector button not showing #15

Closed SolmazKh closed 4 years ago

SolmazKh commented 6 years ago

Hello My code:

var vjs_input = { "controls": true, "autoplay": auto_play, "muted": false, "plugins": vjs_plugins,"qualitySelector": true }; videojs("video_elem", vjs_input).ready(function () { ... }

Why the button is not added?

billpendrydotcom commented 6 years ago

I was having the same issue. There is CSS that must be included, which is not mentioned in the instructions. The CSS is in SCSS format, which I'm not clever enough to be using, lol.

  1. Grab this file: videojs-quality-selector/src/sass/quality-selector.scss
  2. Then convert it to normal CSS. I found an online converter via Google.
  3. Finally, just include the converted CSS, and you should be good to go!
jthomerson commented 6 years ago

Oh, wow, we missed this issue back in December. Sorry @SolmazKh! If your issue really is just the missing CSS, you can do as @billpendrydotcom says, or you can simply link to the CDN-hosted one, similar to how the JS example on the project homepage mentions. For example, you can link to https://unpkg.com/silvermine-videojs-quality-selector@1.1.2/dist/css/quality-selector.css

If someone wants to open a pull request to update the README to include CSS, you're welcome to do so.

pilishen commented 6 years ago

in my case, it was require('!style-loader!css-loader!silvermine-videojs-quality-selector/dist/css/quality-selector.css')

using in a vue component of course, u can also include within style tag

jthomerson commented 4 years ago

I believe #35 closed this.