Neat Paraskavedekatriaphobia's Meaning

npm

Need private packages and team management tools?Check out npm Orgs. »

nativescript-youtube-parser

1.1.0 • Public • Published

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

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

install

npm i nativescript-youtube-parser

Downloadsweekly downloads

9

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability