awesome-cordova-plugins/src/plugins/youtube-video-player.ts
2016-10-17 20:38:25 -05:00

30 lines
707 B
TypeScript

import { Plugin, Cordova } from './plugin';
/**
* @name YoutubeVideoPlayer
* @description
* Plays YouTube videos in Native YouTube App
*
* @usage
* ```
* import {YoutubeVideoPlayer} from 'ionic-native';
*
* YouTubeVideoPlayer.openVideo('myvideoid');
*
* ```
*/
@Plugin({
name: 'YoutubeVideoPlayer',
plugin: 'https://github.com/Glitchbone/CordovaYoutubeVideoPlayer.git',
pluginRef: 'YoutubeVideoPlayer',
repo: 'https://github.com/Glitchbone/CordovaYoutubeVideoPlayer',
platforms: ['Android', 'iOS']
})
export class YoutubeVideoPlayer {
/**
* Plays a YouTube video
* @param videoId {string} Video ID
*/
@Cordova({sync: true})
static openVideo(videoId: string): void { }
}