[Offline mode] Unable to Play content in offline Mode
Introduction:
This wiki page explains the design changes to integrate content-player in mobile(with ionic 4 changes)
Issue ID:- https://project-sunbird.atlassian.net/browse/SB-14688
Background:
Mobile code is updating the code to Ionic 4. With this update, file system can't accessible directly while playing the content in content-player. This is causing image broken for images, audio, PDF & video.
Problem Statement:
How to access assets or files in content-player without using file system path?
Impacted ares:
Question-set
EMLC content assests Images, Audios & Video.
PDF
Video(Mp4 or webm)
HTML
Solution 1:
Removing Cordova checks & remove pre-fixing "file://" to the asses/file path while playing in mobile.
Solution 2:
Use window.parent.Ionic.WebView.convertFileSrc(url);
main.js
window.getLocalPath(path) {
window.Ionic.WebView.convertFileSrc(path);
} Replace all the place where-ever we are referring "file://" by calling above function.