Skip to content

A util to extract raw video-URLs and format information from a YouTube-video page

Notifications You must be signed in to change notification settings

manijak/nativescript-youtube-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOT MAINTAINED - SHOULD NOT BE USED IN PRODUCTION This is a html-parser, use with caution. Your app could be suspended from appstores.

npm npm

NativeScript YouTube Parser

A util to extract raw video-URLs and format information from a YouTube-video page. This way you can play YouTube videos in the native video player. The plugin is based on npm package youtube-parser and adapted to the NativeScript framework (removed cli & excess dependencies). Works on iOS and Android.

Installation

Run npm i nativescript-youtube-parser in the ROOT directory of your project.

Usage

getURL(url, format)

  • url - 'watch video' page on YouTube.
  • format - Object { quality: 'small | medium | high', container: 'mp4 | flv | 3pg | webm' }
  • return value - A promise object to resolve with an array of URL/format info objects that match the requested format.
var youtubeParser = require('nativescript-youtube-parser');

youtubeParser.getURL('https://youtu.be/C_vqnySNhQ0', { quality: 'medium', container: 'mp4' })
    .then(function (urlList) {
        console.log("YouTube mp4 video url: ", urlList[0].url);
    }
);

Changelog

2.0.1

  • Fixed issue with common.js include

2.0.0

  • Code refactor, api-changes

1.1.0

  • Fixed an https issue on Android that would cause the plugin not to work

1.0.0

  • Initial release

Author

Original Author/Plugin

About

A util to extract raw video-URLs and format information from a YouTube-video page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published