Video Player

Contents

A Cordova plugin that simply allows you to immediately play a video in fullscreen mode.

Requires Cordova plugin: com.moust.cordova.videoplayer. For more info, please see the VideoPlayer plugin docs.

https://github.com/moust/cordova-plugin-videoplayer

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic 视频播放 Video Player插件的安装(Installation)

ionic cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git npm install @ionic-native/video-player
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/video-player

Ionic 视频播放 Video Player插件支持的平台(Supported Platforms)

  • Android

Ionic 视频播放 Video Player插件的用法(Usage)

import { VideoPlayer } from '@ionic-native/video-player/ngx';

constructor(private videoPlayer: VideoPlayer) { }

...

// Playing a video.
this.videoPlayer.play('file:///android_asset/www/movie.mp4').then(() => {
 console.log('video completed');
}).catch(err => {
 console.log(err);
});