-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.2
-
-
-
MOODLE_35_STABLE
-
MOODLE_36_STABLE
-
Moodle Mobile 3.6.0
The core-external-content directive, and similar features such as the text formatting in labels, do not work properly when modifying the source URL for videos on iOS platform to use the cached version on the device, when the source URL is provided in the 'src' attribute rather than a <source> tag.
Writing special code so that I could see the DOM source revealed that the problem appears to be caused because in working examples of videos, the video tag src attribute is of the form 'file://var/mobile/Containers/Data/Application/...', whereas in non-working examples it is of the form 'cdvfile://localhost/persistent/sites/...'.
Other resources such as image tags work fine with the 'cdvfile' syntax so presumably it is something especially weird with video files.
Note that I actually encountered this problem in a custom plugin by using the core-external-content directive on a video tag generated by the plugin (rather than being user content like in the test script). Since it is easier to reproduce without having to use a custom plugin, I decided to use the label example in the test script above.
NOTE: The problem most likely affects <audio> as well as <video>, I haven't tested; obviously it should ideally be fixed in both if so.