When using the html5 video tag with a video sotored in the assets, seek is not possible.
Possible cause/fix:
Server does not support "partial content":
WebViewLocalServer:createWebResourceResponse uses WebViewLocalServer:PathHandler which always answers with 200 OK instead 206 PartialContent for videos. doing so would allow html5 video player to seek video and load in memory only the desired parts
I am also facing this issue, and it's stopping me from implementing trimming in an Ionic 4 application.
Update Ionic Info
Ionic:
ionic (Ionic CLI) : 4.5.0 (C:\Users\Toshik\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.15
@angular-devkit/build-angular : 0.11.0
@angular-devkit/schematics : 7.1.0
@angular/cli : 7.1.0
@ionic/angular-toolkit : 1.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : android 6.4.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 2.3.0, (and 9 other plugins)
System:
NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10
Update 2 For anyone who stumbles over this an would like to seek the video, I solved it by loading the file as a blob.
let localFileSrc = this.webview.convertFileSrc(localFilePath);
fetch(localFileSrc)
.then(res => res.blob())
.then(res => {
let seekableSrc = URL.createObjectURL(res);
})
Me too
Can you try with this changes? https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/295
:tada: This issue has been resolved in version 3.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
@jcesarmobile support is broken, full stream is returned instead of correct range. please fix this.