Saturday, November 16, 2024
HomeiOS DevelopmentIonic Native Document video and open it in iOS

Ionic Native Document video and open it in iOS

[ad_1]

I am having this difficulty attempting to document a video with Ionic Capacitor in iOS…

the code may be very easy..

this.mediaCapture.captureVideo({period: 10, high quality: 0}).then(
    (information: MediaFile[]) =>{
      if (information.size > 0) {
        let videopath = Capacitor.convertFileSrc(information[0].fullPath);
        let video = (doc.getElementById('myvideo') as HTMLVideoElement).src = videopath;
        
        const contents = Filesystem.readFile({
          path: videopath
        })
        .then(consequence =>{
          let alert = this.alerts.create({
            buttons: ['ok'],
            message: "file exists" + JSON.stringify(consequence)
          });
          alert.then(set => set.current());
        })
        .catch(err =>{
          let alert = this.alerts.create({
            buttons: ['ok'],
            message: "error file: " + JSON.stringify(err)
          });
          alert.then(set => set.current());
        })
      }
    }  

the error is:
error from device 1

2022-03-13 16:47:53.446758-0500 App[3048:612360] NSURLConnection completed with error - code -1002
ERROR MESSAGE:  {"errorMessage":"The file “66890086390_513929C5-10D6-4FA4-BCFE-3ED763DD08F9.MOV” couldn’t be opened.","message":"The file “66890086390_513929C5-10D6-4FA4-BCFE-3ED763DD08F9.MOV” couldn’t be opened."}

does anybody have or had this difficulty?? any assist may be very appreciated!

particulars:
machine examined: iPad Air 12.5.5
data.plist (from Xcode)

info.plist

variations:

  • Node v14.15.0
  • Ionic 6.18.1

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments