basics / nuxt-booster

nuxt-booster will help you to improve the lighthouse performance score (100/100) of your website. 🚀
https://basics.github.io/nuxt-booster/
MIT License
599 stars 30 forks source link

poster maxresdefault is not found for some of my videos #1044

Open cobraprojects opened 4 days ago

cobraprojects commented 4 days ago

Describe the bug if a video doesn't have maxresdefault poster I can't play the video

To Reproduce Steps to reproduce the behavior:

note: this video doesn't have maxresdefault poster size it has hqdefault and default.

Expected behavior should fallback to hqdefault or be able to change the poster_url from the props

Screenshots image

Desktop (please complete the following information):

ThornWalli commented 3 days ago

Hello @cobraprojects,

have you set the necessary @nuxt/image settings? (domain/provider)

{
    image: {
      // The screen sizes predefined by `@nuxt/image`:
      screens: {
        default: 320,
        xxs: 480,
        xs: 576,
        sm: 768,
        md: 996,
        lg: 1200,
        xl: 1367,
        xxl: 1600,
        '4k': 1921
      },
      domains: [
        'https://picsum.photos',
        'https://img.youtube.com',
        'https://i.vimeocdn.com',
        'https://i.pickadummy.com'
      ],
      alias: {
        picsum: 'https://picsum.photos',
        youtube: 'https://img.youtube.com',
        vimeo: 'https://i.vimeocdn.com',
        pickadummy: 'https://i.pickadummy.com'
      }
    }
}
cobraprojects commented 3 days ago

Hello @cobraprojects,

have you set the necessary @nuxt/image settings? (domain/provider)

Yes I did

And it works fine but not in all videos as I mentioned.

Please try it with the youtube link I have provided

ThornWalli commented 1 day ago

Seems to be the Youtube video...

Video does not work: https://img.youtube.com/vi/hAOgqC3IJ_A/maxresdefault.jpg

Video works correctly: https://img.youtube.com/vi/cLKvbhfVBUU/maxresdefault.jpg

Considering the possibility of setting a fallback poster. Alternatively ignore poster, but then it doesn't look nice.

cobraprojects commented 1 day ago

@ThornWalli thanks for your time I notice that any video doesn't have 1080p will have the same issue