mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
30 lines
707 B
TypeScript
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 { }
|
|
}
|