Media capture plugin get error when play captured video file

I want to add a video capture and play feature in my ionic 3 app. I use media capture plugin, the code is give as below. The app is build and run on Android platform, my phone is HUAWEI Mate 9. It seems the video is successfully recorded, but when I play it, I get err: Uncaught (in promise) DOMException: Failed to load because no supported source was found.
console log shows path and url are:

path:  file:///data/user/0/
url:  /data/user/0/

I don’t know what is the problem, could you please help?
.ts file

    let options: CaptureVideoOptions = {
      limit: 1,
      duration: 10
    this.mediaCapture.captureVideo(options).then((res: MediaFile[]) =>{
      let capturedFile = res[0]
      console.log('my file: ', capturedFile);

      let fileName =;
      let dir = capturedFile['localURL'].split('/');
      let fromDirectory = dir.join('/');
      let toDirectory = this.file.dataDirectory;

      this.file.copyFile(fromDirectory, fileName, toDirectory, fileName).then(res=>{
        this.storeMediaFiles({name: fileName, size: capturedFile.size});

    console.log('play:', myFile);
    if('.amr')>-1 ||'.wav')>-1){
      const audioFile: MediaObject =;;
    } else {
      let path = this.file.dataDirectory +;
      console.log("path: ", path)
      let url = path.replace(/^file:\/\//,'')
      console.log("url: ", url)
      let video = this.myVideo.nativeElement;
      video.src = url;

    console.log("store: ", files) =>{
        let arr = JSON.parse(res);
        arr = arr.concat(files), JSON.stringify(arr))
      } else{, JSON.stringify(files))
      this.mediaFiles = this.mediaFiles.concat(files)


  <button ion-button full (click)="captureVideo()">Capture Video</button>

    <ion-item *ngFor="let file of mediaFiles" tappable (click)="play(file)" text-wrap>
      <p>{{file.size / 1000 / 1000 | number}} MB</p>
  <video controls autoplay #myvideo style="width: 100%; height: 30%;"></video>