moust / cordova-plugin-videoplayer

A Codova plugin to play video with the native MediaPlayer on Android devices.
MIT License
139 stars 102 forks source link

Property 'SCALING_MODE' does not exist on type 'typeof VideoPlayer'. #41

Closed bhavinwebdesk closed 4 years ago

bhavinwebdesk commented 7 years ago

Hello,

I like your plugin but I stuck while using SCALING_MODE option.

I tried following code:

import { VideoPlayer } from '@ionic-native/video-player'; . . . this.videoPlayer.play("https://www.quirksmode.org/html5/videos/big_buck_bunny.mp4",{ scalingMode: VideoPlayer.SCALING_MODE.SCALE_TO_FIT_WITH_CROPPING }).then(() => { console.log('video completed'); this.videoPlayer.close(); }).catch(err => { console.log(err); });

but I got error:

Property 'SCALING_MODE' does not exist on type 'typeof VideoPlayer'.

I can play video without providing any option though.

Thanks, Bhavin

piii866 commented 6 years ago

options scalingMode,here must be number

Saqib92 commented 4 years ago

its like:

VideoPlayer.play( "file:///android_asset/www/movie.mp4", { volume: 0.5, scalingMode: 1 or 2 // pass integer here }, function () { console.log("video completed"); }, function (err) { console.log(err); } );