mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
feat(youtube): add Youtube video player plugin support (#496)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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({
|
||||
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 { }
|
||||
}
|
||||
Reference in New Issue
Block a user