Video Player

Contents

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

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

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

ionic cordova plugin add https://github.com/moust/cordova-plugin-videoplayer.git npm install @ionic-native/video-player

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

  • Android

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

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

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);
});