Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2677

Moodle Mobile iOS - can't load local files via AJAX because XHR.status returns always 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 3.5.2
    • Ionic, iOS
    • Hide
      1. Using mobile master site
      2. Navigate to dev testing course > Scorms > MOBILE-2677 activity.
      3. Enter the Scorm and navigate to "TEST HERE" section.
      4. Scroll down to the video and play it.
      5. Check video playback stops and subtitles are shown.
      Show
      Using mobile master site Navigate to dev testing course > Scorms > MOBILE-2677 activity. Enter the Scorm and navigate to "TEST HERE" section. Scroll down to the video and play it. Check video playback stops and subtitles are shown.
    • MOODLE_35_STABLE

      The situation
      In the Moodle mobile app on iOS video captions are not shown. In the browser and in the Moodle desktop app (macOS) the captions are shown.

      Some background
      In a client's WBT videos are handled with MediaElement.js http://www.mediaelementjs.com/. In the videos captions are used. The caption files are loaded via AJAX by the MediaElement library.

      The reason
      Cordova for iOS uses WKWebView to display the content. The Moodle app downloads the content to the device and serves the files locally. Due to iOS CORS restrictions the XHR.status result for local files which are requested via AJAX is always 0 - even if the XHR.responseText holds the correct caption text.

      Ionic WKWebView page
      https://ionicframework.com/docs/wkwebview/

      Support serving local content with WKURLSchemeHandler
      Discussion on https://github.com/apache/cordova-ios/issues/415

            Unassigned Unassigned
            urshunkler Urs Hunkler
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.