vime icon indicating copy to clipboard operation
vime copied to clipboard

bug: styling of DefaultControls gone in static build nuxt.js

Open dataexcess opened this issue 4 years ago • 10 comments
trafficstars

Bug Report

Vime version: 5.0.27

Provider:

[] Audio [x] Video [] HLS [] DASH [] YouTube [] Vimeo [] Dailymotion

Current behavior: incorrect styling after 'npm run generate' and 'surge dist/'

Expected behavior: to have the same stylings/css of the Player regardless of local dev server or static deployed website

Steps to reproduce: using nuxt.js use the Player to play a video, and use the DefaultControls as UI... test locally by a dynamic server 'npm run dev' ... => all good. now build the project for static upload by running 'npm run generate' now upload with surge to a url of choice using 'surge dist/'

Related code: I tried making a plugin and use Vue.component() etc. instead of locally importing the components and the css files, but doesn't change anything..

Other information: here's the website, click on a gif on the map, and then click to play the video... the stylings is all black and incorrect. => http://agexpo.surge.sh/ <=

dataexcess avatar Feb 17 '21 16:02 dataexcess

same here

shakhzodkudratov avatar Mar 09 '21 11:03 shakhzodkudratov

So happy someone else has the same bug! Please fix this, I need this for a project in production soon.

dataexcess avatar Mar 09 '21 11:03 dataexcess

@dataexcess for now, I'm replacing with vue-plyr, but will return back, because vime has better support for hls

shakhzodkudratov avatar Mar 09 '21 11:03 shakhzodkudratov

@dataexcess I found the workaround. Just import default.css and it'll work perfectly. in my scss: @import '@vime/core/themes/default.css';

you can import it directly in nuxt.config.js

shakhzodkudratov avatar Mar 10 '21 07:03 shakhzodkudratov

I don't use scss... I tried changing my nuxtconfig like so:

    css: [
        '@vime/core/themes/default.css'
    ],

But it simply does not work :(

dataexcess avatar Mar 11 '21 15:03 dataexcess

@dataexcess did you tried to add tilda(~) at start?

css: [ '~@vime/core/themes/default.css' ],

shakhzodkudratov avatar Mar 11 '21 15:03 shakhzodkudratov

That doesn't work, gives me: Cannot resolve "~@vime/core/themes/default.css"

Maybe I should try to work with scss haha maybe that will solve it somehow

dataexcess avatar Mar 11 '21 15:03 dataexcess

@dataexcess check your node_modules folder. Do you have @vime folder? Follow by this path (<your project root>/node_modules/@vime/core/themes) and ensure that you have default.css

I've tried css: [ '~@vime/core/themes/default.css' ], and I haven't any error.

shakhzodkudratov avatar Mar 11 '21 15:03 shakhzodkudratov

Yes I have the file there in my node_modules, but it doesn't work. Weirdly enough I made a global scss file and imported it there like you did @import '@vime/core/themes/default.css'; and referenced this global scss file in my nuxt-config and now it works!!

dataexcess avatar Mar 11 '21 16:03 dataexcess

When do they plan to fix the bug?

1shaked avatar May 09 '21 14:05 1shaked