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

Supported media types:

  • 'video': Regular videos.

Supported url formats:

  • 'long'(default): Regular urls.
  • 'static': Video player that fills out the whole website.
  • 'embed': Embedded urls.
  • 'flash': Flash embedded urls.

Creating urls with different media types:

mediaType/formats long static embed flash
video

Parsing Examples:

> urlParser.parse('http://player.youku.com/embed/XMTQ3OTM4MzMxMg');
> urlParser.parse('http://player.youku.com/player.php/sid/XMTQ3OTM4MzMxMg/v.swf');
> urlParser.parse('http://v.youku.com/v_show/id_XMTQ3OTM4MzMxMg');
> urlParser.parse('http://static.youku.com/v1.0.0638/v/swf/loader.swf?VideoIDS=XMTQ3OTM4MzMxMg');
{ 
    mediaType: 'video',
    id: 'XMTQ3OTM4MzMxMg',
    provider: 'youku' 
  }

Creation Examples:

> urlParser.create({
    videoInfo: {
      provider: 'youku',
      id: 'XMTQ3OTM4MzMxMg',
      mediaType: 'video'
    },
    format: <format>
  })
'embed': 'http://player.youku.com/embed/XMTQ3OTM4MzMxMg',
'long': 'http://v.youku.com/v_show/id_XMTQ3OTM4MzMxMg',
'flash': 'http://player.youku.com/player.php/sid/XMTQ3OTM4MzMxMg/v.swf',
'static': 'http://static.youku.com/v1.0.0638/v/swf/loader.swf?VideoIDS=XMTQ3OTM4MzMxMg'
Clone this wiki locally