cordova - Ionic 2: link to video file -


i'm trying out ionic 2 first time. i'm having 1 issue, though. can't figure out put video file need link to.

i'm using plugin (cordova-vr-player) use vr view.

at point, on home.ts, put googlevrplayer.playvideo('shark.mp4'); opens player, error (on android):

error loading video: com.google.android.exoplayer.upstream.filedatasource$filedatasourceexception: java.io.filenotfoundexception: shark.mp4: open failed: enoent (no such file or directory).

i've put shark.mp4 in same folder home.ts.

anyone can me this?

edit: looks wrong! correct answer here


when compiled app read root of www folder.

what recommend setting folder structure , moving video - www/assets/video/shark.mp4

then in code can reference video so:

googlevrplayer.playvideo('assets/video/shark.mp4')


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -