Code Monkey home page Code Monkey logo

Comments (5)

Zod- avatar Zod- commented on July 22, 2024

Added in a96d994
Because of the dynamic nature of width/height in the urls I added them as special parameters.

> urlParser.parse('https://i.vimeocdn.com/video/97276391_500x123.webp');
{
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
      imageWidth: 500,
      imageHeight: 123,
      imageExtension: '.webp',
}

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video'
    },
    format: 'image'
  })
'https://i.vimeocdn.com/video/97276391.webp'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
      imageWidth: 500
    },
    format: 'image'
  })
'https://i.vimeocdn.com/video/97276391_500.webp'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
      imageWidth: 500,
      imageHeight: 123,
    },
    format: 'image'
  })
'https://i.vimeocdn.com/video/97276391_500x123.webp'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
      imageExtension: '.png'
    },
    format: 'image'
  })
'https://i.vimeocdn.com/video/97276391.png'

More about the parmeters in the readme

from jsvideourlparser.

Zod- avatar Zod- commented on July 22, 2024

Released in 0.3.2

from jsvideourlparser.

mixalistzikas avatar mixalistzikas commented on July 22, 2024

https://vimeo.com/265334448
https://i.vimeocdn.com/video/265334448_640.jpg

This jpg is not from this video...
Am I losing something?

This is wrong (https://i.vimeocdn.com/video/{video_id} _640.jpg)

from jsvideourlparser.

Zod- avatar Zod- commented on July 22, 2024

I can't believe I didn't actually check both the video and the thumbnail while making it 🤦‍♂. Well looks like this feature won't work for Vimeo then.

from jsvideourlparser.

Zod- avatar Zod- commented on July 22, 2024

Removed the feature in 0.4.2 since it's not possible to link the image to the video as far as I can till.

from jsvideourlparser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.