Skip to content
Julian Hangstörfer edited this page Sep 13, 2020 · 3 revisions

Supported media types:

  • 'video': Regular videos

Supported url formats:

  • 'long'(default): Regular urls.
  • 'embed': Embedded urls.

Creating urls with different media types:

mediaType/formats long embed
video

Special parameters:

  • 'params.start': The number where the video should begin in seconds.

Parsing Examples:

> urlParser.parse('https://vimeo.com/97276391');
> urlParser.parse('https://vimeo.com/channels/staffpicks/97276391');
> urlParser.parse('https://i.vimeocdn.com/video/97276391');
{
    id: '97276391',
    mediaType: 'video',
    provider: 'vimeo'
}

> urlParser.parse('https://vimeo.com/album/2903155/video/96186586');
{
    id: '96186586',
    mediaType: 'video',
    provider: 'vimeo' 
}

> urlParser.parse('https://vimeo.com/groups/shortfilms/videos/97688625');
{
    id: '97688625',
    mediaType: 'video',
    provider: 'vimeo' 
}

> urlParser.parse('http://vimeopro.com/staff/frame/video/24069938');
{
    id: '24069938',
    mediaType: 'video',
    provider: 'vimeo'
}

> urlParser.parse('https://vimeo.com/97276391#t=1m30s');
{
    id: '97276391',
    mediaType: 'video',
    provider: 'vimeo',
    params: {
        start: 90
    }
}

Creation Examples:

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video'
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391'
'embed': '//player.vimeo.com/video/97276391'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
      params: {
        start: 90
      }
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391#t=90'
'embed': '//player.vimeo.com/video/97276391#t=90'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391'
'embed': '//player.vimeo.com/video/97276391'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391'
'embed': '//player.vimeo.com/video/97276391'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391'
'embed': '//player.vimeo.com/video/97276391'

> urlParser.create({
    videoInfo: {
      provider: 'vimeo',
      id: '97276391',
      mediaType: 'video',
    },
    format: <format>
  })
'long': 'https://vimeo.com/97276391'
'embed': '//player.vimeo.com/video/97276391'
Clone this wiki locally