Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-67608

Video JS: dynamically load lang strings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Media
    • Labels:
      None
    • Affected Branches:
      MOODLE_39_STABLE

      Description

      Currently the desired language for the VideoJS media player using some inelegant Javascript, see: https://github.com/moodle/moodle/blob/master/media/player/videojs/classes/plugin.php#L397

      It is partly done like this because the lang string is to large to pass in as part of a regular `$PAGE->requires->js_call_amd()` and partly because the lang strings for VideoJS were provided as javascript files (.js).

      Now that videoJS has been upgraded as part of MDL-63453 the language files are now provided as JSON (.json).

      This means we should be able to refactor this code to load the required lang files via ajax in the videoJS loader.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mattp@catalyst-au.net Matt Porritt
              Participants:
              Component watchers:
              Jake Dallimore, Jun Pataleta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: