I’m experiencing some trouble with video playback when my app is deployed on iOS. The basic setup is that I have a JSON file on a server which is read each time the app starts. This JSON file contains a list of video URLs and associated content which gives more information about features in the app itself. When a user clicks a “Learn More” button, a video is supposed to play. It works perfectly on Android, but not on iOS.
The problem is when starting the app for the first time on iOS, the video playback stalls, and then after restarting the app, the video playback works perfectly. I am at a loss as to why.
I’ve tried to a number of different options to get video playback working, including
- using the streaming media plugin (Even rewrote some of this plugin to use AVPlayer rather than deprecated MPMoviePlayerController)
- using the html5 video tag
- using embedded iframe with sanitized resource urls.
- using different video formats (mp4 and HLS), different bitrates, etc. All to no avail.
Googling shows up very little related to this problem and I’m hoping for help here.
Ionic Info: (I’m aware this is an older version of Ionic)
Cordova CLI: 6.5.0
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Linux 4.8
Node Version: v6.11.1
Xcode version: Not installed