Open ShwetaKhera opened 6 years ago
Video player returns a promise, so you need to catch it.
async playVideo(){ try{ await this.videoPlayer.play(url); console.log("Video is complete"); } catch(e){ console.error(e); } }
This gets rid of the Unhandled promise rejections for me, hope this helps if you haven't solved it already.
I ran the command " cordova plugin add cordova-plugin-video-player " and gives me the following error:
(node:4008) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: cmd: Command failed with exit code ENOENT (node:4008) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
command " ionic info " shows :
cli packages: (C:\Users\shweta\AppData\Roaming\npm\node_modules)
global packages:
local packages:
System:
Environment Variables:
Misc:
Please help me out.