@obaqueiro1 wrote:
I have tried everything I can think of, and followed a lot of the proposed solutions without success. This is the problem: When trying to capture a video using MediaCapture and then try to play it in a tag, the video just does not load. The code snippet is:
this.mediaCapture.captureVideo({limit: 1, duration: 30}).then ( (data: MediaFile[]) => { console.log(data); this.videoPath = data[0].fullPath; this.validRecording = true; this.spinnerVisible = false; this.validRecording = true; let fileName = this.webView.convertFileSrc(this.videoPath); document.getElementById('videoSource'+this.videoId).setAttribute('src', fileName ); this.video.load(); this.video.play(); } ).catch(err => { console.log(err); }
I am using webview 4, which contains convertFileSrc.
As a result of convertFileSrc i get a 'http://localhost/_app_file/storage/emulated/DCIM/camera/20190324_1123.mp4" url
On the step when the video is tried to be played in the tag, I am getting a 404 (OK) error (not found??). But when looking at the phone, the video is recorded correctly.Other dependencies I’ve got installed:
“dependencies”: {
“@angular/animations”: “5.2.11”,
“@angular/common”: “5.2.11”,
“@angular/compiler”: “5.2.11”,
“@angular/compiler-cli”: “5.2.11”,
“@angular/core”: “5.2.11”,
“@angular/forms”: “5.2.11”,
“@angular/http”: “5.2.11”,
“@angular/platform-browser”: “5.2.11”,
“@angular/platform-browser-dynamic”: “5.2.11”,
“@ionic-native/camera”: “~5.2.0”,
“@ionic-native/core”: “~5.2.0”,
“@ionic-native/file”: “~5.2.0”,
“@ionic-native/ionic-webview”: “^5.2.0”,
“@ionic-native/media-capture”: “~5.2.0”,
“@ionic-native/splash-screen”: “~5.2.0”,
“@ionic-native/status-bar”: “~5.2.0”,
“@ionic-native/video-player”: “^5.2.0”,
“@ionic/storage”: “2.1.3”,
“@types/node”: “^11.11.3”,
“cordova”: “^8.0.0”,
“cordova-android”: “7.1.4”,
“cordova-browser”: “5.0.4”,
“cordova-plugin-camera”: “^4.0.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “4.0.0”,
“cordova-plugin-media-capture”: “^3.0.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “2.4.2”,Please help!
Posts: 2
Participants: 1