1

when i use the browser to preview the app the video player works but on the phone it gives the error below i think the problem is that 'file:' that is added is what causing the problem but i cant seem to get rid of it with string.replace('file:','') :

The webpage at file://wwwdailymotion.com/embed/video/{video_id} could not be loaded becuase:

net::ERR_FILE_NOT_FOUND

player.ts:

this.video_link = "//www.dailymotion.com/embed/video/"+this.video_id;

player.html:

<iframe [src]="sanitizer.bypassSecurityTrustResourceUrl(video_link)" allowfullscreen frameborder="0" width="100%" height="200px" ></iframe>

1 Answers1

2

This is because of how Cordova works. It loads your site from the file system on the device, so by not providing a protocol it assumes file://

Change your link to use https and I suspect it will work:

this.video_link = "https://www.dailymotion.com/embed/video/"+this.video_id;
achendrick
  • 190
  • 1
  • 8