Skip to content

Dailymotion

Julian Hangstörfer edited this page Jul 13, 2019 · 1 revision

Supported media types:

  • 'video': Regular videos.

Supported url formats:

  • 'short': Shortened urls.
  • 'long'(default): Regular urls.
  • 'embed': Embedded urls.
  • 'image': Thumbnail image urls.

Creating urls with different media types:

mediaType/formats short long embed image
video

Special parameters:

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

Parsing Examples:

> urlParser.parse('http://www.dailymotion.com/video/x1e2b95_bruce-lee-nin-kayip-kedisi_animals');
> urlParser.parse('http://www.dailymotion.com/video/x1e2b95');
> urlParser.parse('http://dai.ly/x1e2b95');
> urlParser.parse('https://www.dailymotion.com/embed/video/x1e2b95');
> urlParser.parse('https://www.dailymotion.com/thumbnail/video/x1e2b95');
{ 
    mediaType: 'video',
    id: 'x1e2b95',
    provider: 'dailymotion' 
}

> urlParser.parse('http://www.dailymotion.com/video/x1e2b95_bruce-lee-nin-kayip-kedisi_animals?start=10');
> urlParser.parse('http://www.dailymotion.com/embed/video/x1e2b95?start=10');
> urlParser.parse('http://www.dailymotion.com/video/x1e2b95?start=10');
{ 
    mediaType: 'video',
    id: 'x1e2b95',
    provider: 'dailymotion',
    params: {
        start: 10
    }
}

Creation Examples:

> urlParser.create({
    videoInfo: {
      provider: 'dailymotion',
      id: 'x1e2b95',
      mediaType: 'video'
    },
    format: <format>
  })
'long': 'https://www.dailymotion.com/video/x1e2b95'
'short': 'https://dai.ly/x1e2b95'
'embed': 'https://www.dailymotion.com/embed/video/x1e2b95'
'image': 'https://www.dailymotion.com/thumbnail/video/x1e2b95'

> urlParser.create({
    videoInfo: {
      provider: 'dailymotion',
      id: 'x1e2b95',
      mediaType: 'video',
      params: {
        start: 10
      }
    },
    format: <format>
  })
'long': 'https://www.dailymotion.com/video/x1e2b95?start=10'
'short': 'https://dai.ly/x1e2b95?start=10'
'embed': 'https://www.dailymotion.com/embed/video/x1e2b95?start=10'
'image': 'https://www.dailymotion.com/thumbnail/video/x1e2b95'
Clone this wiki locally