Package Exports
- ionic-youtube-search
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ionic-youtube-search) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ionic-youtube-search: Node.js
Search videos on YouTube without API key in ionic apps
Table of contents:
Quickstart
Installing the library
ionic cordova plugin add cordova-plugin-advanced-http
npm install ionic-youtube-search --save
Using the library
import * as yt from 'ionic-youtube-search';
/**
* Given a search query, searching on youtube
* @param {string} search value (videoId).
*/
const videos = await yt.search('Hello World');
const videos = await yt.search('y5kIrbG2gRc');
console.log('Videos:');
console.log(videos);
[
{
"id":{
"videoId":"y5kIrbG2gRc"
},
"snippet":{
"url":"https://www.youtube.com/watch?v=y5kIrbG2gRc",
"publishedAt":"3 months ago",
"thumbnails":{
"default":{
"url":"https://i.ytimg.com/vi/y5kIrbG2gRc/default.jpg",
"width":120,
"height":90
},
"high":{
"url":"https://i.ytimg.com/vi/y5kIrbG2gRc/hq720.jpg?sqp=-oaymwEhCK4FEIIDSFryq4qpAxMIARUAAAAAGAElAADIQj0AgKJD&rs=AOn4CLC9c-4JI285aXTlg99bne9V224hVw",
"width":686,
"height":386
}
},
"duration":{
"runs":[
{
"text":"2:01"
}
],
"accessibility":{
"accessibilityData":{
"label":"2 minutes, 1 second"
}
}
},
"title":"How to Download Free Music On Your iPhone (OFFLINE) 2020",
"views":{
"runs":[
{
"text":"51 views"
}
]
}
}
}
]
const yt = require('ionic-youtube-search');
/**
* Given a search query, searching on youtube
* @param {string} search value.
*/
const video = await yt.info('My Search Query');
console.log('Videos:');
console.log(videos);
Supported Node.js Versions
Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.
License
Apache Version 2.0
See LICENSE