[wp-trac] [WordPress Trac] #28190: Support for mediaelement.js YouTube sources in the video shortcode does not work in TinyMce

WordPress Trac noreply at wordpress.org
Mon May 12 02:23:45 UTC 2014


#28190: Support for mediaelement.js YouTube sources in the video shortcode does not
work in TinyMce
--------------------------+-----------------------------------------
 Reporter:  Fab1en        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.0
Component:  Media         |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  javascript, administration
--------------------------+-----------------------------------------

Comment (by lukecarbis):

 So the problem here is that `youtube` isn't assigned to the `compat` var
 as a compatible video type for any of the browsers. The diff I uploaded
 fixes that.

 I was initially concerned about specifying youtube and not any other video
 services, but I noticed that the same thing is done on the front end. See
 line `1803` in `wp-includes/media.php`. YouTube is specified separately to
 other video mime types, as it is all over `wp-includes/media-
 template.php`.

 At this point the problem was resolved, but I did notice a display error
 in the way the media element was being rendered inside tinymce. I managed
 to track this down to a bug in `wp-includes/media-template.php`. Line 63
 was using the variable `h` before it had been assigned. This is also
 included in the diff.

 That fixed a display issue, but YouTube embeds still looked wrong (they
 displayed the YouTube video controls, instead of the mediaelement video
 controls). I believe that this is related to a Javascript error that now
 occurs:
 `ReferenceError: Can't find variable: mejs`

 Unfortunately this error is not linked to a javascript file (maybe it's
 being done via `eval`?), and I've searched for hours but have been unable
 to fix it.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28190#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list