Make WordPress Core

Opened 11 months ago

Last modified 4 weeks ago

#64105 new defect (bug)

TinyMCE in classic editor does not support modern video formats

Reported by: blackstar1991 Owned by:
Priority: normal Milestone: Awaiting Review
Component: General Version: 6.8.3
Severity: normal Keywords: needs-patch has-test-info
Cc: Focuses: ui, javascript

Description

https://i.ibb.co/Sw1793Xr/1m.jpg
https://i.ibb.co/35vKpfjh/2m.jpg
WP does not support webp, avi formats for the classic editor. Can someone help and make them uwaliable like in Block Templates ?

Attachments (2)

block-editor.mov (2.8 MB ) - added by lakshyajeet 5 months ago.
Issue reproduction in Block Editor.
classic-editor.mov (4.9 MB ) - added by lakshyajeet 5 months ago.
Issue reproduction in Classic Editor.

Change History (9)

#1 @nabilaminhridoy
11 months ago

  • Focuses javascript added
  • Keywords needs-patch added
  • Version6.8.3

Hi there 👋

I’ve reproduced this issue on WordPress 6.8.3 with the Classic Editor plugin (v1.6.3).

When inserting .webm or .avi video files through the Classic Editor (TinyMCE), they are not recognized or previewed properly. In contrast, the Block Editor supports these formats without any issue.

This indicates that the core media handler supports modern formats, but TinyMCE’s configuration or the allowed MIME types for the Classic Editor are limited to older formats (mp4, m4v, ogv, mov, wmv).

Possible fix direction:
Add support for additional MIME types in TinyMCE initialization or extend wp_get_mime_types() for Classic Editor to include:

  • video/webm.webm
  • video/x-msvideo.avi

I tested this on WP 6.8.3 and can confirm the issue still exists.
Happy to help test a patch if someone is working on this.

@nabilaminhridoy

Last edited 11 months ago by nabilaminhridoy (previous) (diff)

This ticket was mentioned in Slack in #core by amykamala. View the logs.


11 months ago

#3 @joedolson
11 months ago

  • Focuses accessibility removed

#4 @lakshyajeet
5 months ago

Reproduction Report

Description

This report validates whether the issue can be reproduced. The testing confirms that while .webm files now appear to function in the Classic Editor, .avi files remain unsupported for playback. However, the .avi failure is likely a browser-level limitation rather than a WordPress bug, as .avi is not a standard format for the HTML5 <video> tag across modern browsers.

Environment

  • WordPress: 7.1-alpha-62161-src
  • PHP: 8.3.30
  • Server: nginx/1.29.7
  • Database: mysqli (Server: 8.4.8 / Client: mysqlnd 8.3.30)
  • Browser: Chrome 146.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.4
  • MU Plugins: None activated
  • Plugins:
    • Classic Editor 1.6.7

Actual Results

  1. ✅ Partial Reproduction: While .webm files successfully upload and play back in both editors, .avi files fail to render a preview or play back in both the Block Editor and Classic Editor.
  2. ❌ Observation: The .avi playback issue appears to be a browser compatibility constraint. Most modern browsers do not support the AVI container within the native <video> element, leading to the reported "unsupported" behavior regardless of the editor used.

Additional Notes

  • WebM: During testing, .webm files worked as expected in the Classic Editor, suggesting that recent updates may have already addressed the MIME type registration for this specific format.
  • AVI: Since the Block Editor also fails to play .avi files, this is not a TinyMCE-specific issue but a general limitation of web-standard video playback. WordPress successfully handles the file upload, but the browser cannot render the stream.

@lakshyajeet
5 months ago

Issue reproduction in Block Editor.

@lakshyajeet
5 months ago

Issue reproduction in Classic Editor.

#5 @blackstar1991
5 months ago

It would probably be worth prohibiting the uploading of .avi files into the body of documents if they cannot be played.

https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs
https://caniuse.com/?search=video+format

#6 @sukhendu2002
4 weeks ago

  • Keywords has-test-info added

Reproduction Report

Environment

  • WordPress: 7.2-alpha-63166-src
  • Subdirectory: No
  • PHP: 8.3.33
  • Server: nginx/1.31.3
  • Database: mysqli (Server: 8.4.11 / Client: mysqlnd 8.3.33)
  • Browser: Chrome 151.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.5
  • MU Plugins: None activated
  • Plugins:
    • Classic Editor 1.7.0
    • Test Reports 1.3.1

Steps taken

  1. Activated Classic Editor and opened a new post.
  2. Uploaded and inserted a WebM video using Add Media.
  3. Confirmed that its player appeared and the video played.
  4. Uploaded and inserted an AVI video.
  5. Confirmed that AVI was inserted as a link rather than a video player.
  6. In the Block Editor, WebM played but AVI was unsupported by Chrome.

❌ Bug is not occurring

Expected behavior

  • The ticket reports that WebM does not preview or play in Classic Editor. It worked correctly during testing.
  • AVI is not supported by Chrome, so Classic Editor correctly inserts it as a link.

Additional Notes

  • The description says .webp, but comments refer to .webm; this test used WebM.
  • Preventing AVI selection in the Block Editor would be a separate enhancement.

Screenshots/Screencast with results

WebM playing in Classic Editor.
https://utfs.io/f/o9kzPXfbC7I8zmAYINxD3Ro4fxhkTuWJYwXjMy5EAIrn2lc7

AVI inserted as a link.
https://utfs.io/f/o9kzPXfbC7I8SXUEpGshAsIRyXap8KCMYuStQ7z4JZg3mLPi

AVI has no embed option
https://utfs.io/f/o9kzPXfbC7I8ZhDJ1gKqF3iUJVI2SCQvKbnDE79AeZfsm6RX

#7 @blackstar1991
4 weeks ago

@sukhendu2002

AVI inserted as a link.

Why is this file type even available as an option in this element? *The output isn't what I expected.

Note: See TracTickets for help on using tickets.