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

Undefined method window.console.warning() called in RecordRTC

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78770-401
    • MDL-78770-master
    • Hide

      Notes

      1. Your site needs to be on HTTPS. (you can use ngrok for this with "$CFG->sslproxy = true;" set in your config.php)
      2. It will probably be simpler to turn on developer mode (e.g. if using MDK, "mdk run mindev")
      3. We'll just test the fix for this using the audio recorder functionality of both atto_recordrtc and tiny_recordrtc given the following reasons:
        • It's easier to reproduce the warning and confirm the fix when using the audio recorder, especially on Chromium-based browsers.
        • The video and audio recorder in atto_recordrtc use the same function where the fix was applied.
        • The same fix as the audio recorder was essentially applied for the video recorder of tiny_recordrtc but for some reason, I cannot reproduce the warning message on the video recorder functionality even after leaving only the call to window.console.warn() in getFileExtension().

      TinyMCE

      1. Make sure that TinyMCE is set as your editor in your editor preferences.
      2. Edit your profile
      3. On your profile description editor, click on "Record audio"
      4. Open your browser's console.
      5. Record an audio for a few seconds. Then press "Attach recording"
      6. Check your browser's console.
      7. Confirm that you get a "Unknown file type for MediaRecorder API" warning and not the error message "TypeError: window.console.warning is not a function".
        Notes:
        • If you don't see any warning:
          1. Go to the Sources tab of your browser, and navigate to lib/editor/tiny/plugins/recordrtc/amd/src/audio_recorder.js
          2. Check out the "getFileExtension" function and delete the if-else-if block of code, save (Ctrl+S), and try recording again.

      Atto editor

      1. Go to your editor preferences and set Atto HTML editor as your default text editor.
      2. Edit your profile and try to record an audio.
      3. Upon attaching the recorded audio, confirm that you get a "Unknown file type for MediaRecorder API" warning and not the error message "TypeError: window.console.warning is not a function" on your browser's console.
      Show
      Notes Your site needs to be on HTTPS. (you can use ngrok for this with " $CFG->sslproxy = true; " set in your config.php) It will probably be simpler to turn on developer mode (e.g. if using MDK, " mdk run mindev ") We'll just test the fix for this using the audio recorder functionality of both atto_recordrtc and tiny_recordrtc given the following reasons: It's easier to reproduce the warning and confirm the fix when using the audio recorder, especially on Chromium-based browsers. The video and audio recorder in atto_recordrtc use the same function where the fix was applied. The same fix as the audio recorder was essentially applied for the video recorder of tiny_recordrtc but for some reason, I cannot reproduce the warning message on the video recorder functionality even after leaving only the call to window.console.warn() in getFileExtension(). TinyMCE Make sure that TinyMCE is set as your editor in your editor preferences. Edit your profile On your profile description editor, click on "Record audio" Open your browser's console. Record an audio for a few seconds. Then press "Attach recording" Check your browser's console. Confirm that you get a " Unknown file type for MediaRecorder API " warning and not the error message " TypeError: window.console.warning is not a function ". Notes: If you don't see any warning: Go to the Sources tab of your browser, and navigate to lib/editor/tiny/plugins/recordrtc/amd/src/audio_recorder.js Check out the " getFileExtension " function and delete the if-else-if block of code, save (Ctrl+S), and try recording again. Atto editor Go to your editor preferences and set Atto HTML editor as your default text editor. Edit your profile and try to record an audio. Upon attaching the recorded audio, confirm that you get a " Unknown file type for MediaRecorder API " warning and not the error message " TypeError: window.console.warning is not a function " on your browser's console.

      Undefined method "window.console.warning()" is being called in RecordRTC plugins (atto_recordrtc and TinyMCE audio and video recorders).

      They should be calling "window.console.warn()" instead.

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Huong Nguyen Huong Nguyen
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 54 minutes
                2h 54m

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