Opened 11 years ago
Closed 11 years ago
#27582 closed defect (bug) (fixed)
MCE View: CPU spike when using [video] embed for an MP4 in Chrome
Reported by: | jeremyfelt | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 3.9 | Priority: | normal |
Severity: | normal | Version: | 3.9 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | javascript | Cc: |
Description
Chrome 33.0.1750.152, OSX 10.9.2
As of the bump from MediaElement 2.13.2 to 2.14.0 in [27811], the display of an embedded MP4 with [video]
in MCE spikes processor usage to 100% and crashes the tab in Chrome.
If I revert back to 27810, the view works as expected. If I use MediaElement 2.13.2 with current trunk, the view also works as expected.
If I use the [playlist]
shortcode, everything works beautifully in trunk with 2.14.0. This new media stuff is fantastic. :)
Safari 7.0.2 freezes as well, though I haven't tested it extensively.
Neither Opera or Firefox freeze, though both show only text - https://cloudup.com/c2A2VMbeDkG
Attachments (1)
Change History (15)
#2
@
11 years ago
It seems like the initial page load results in two MediaElement view requests.
In the first request, a negative rail width (-1896) is set and the position of the fullscreen button is detected relative to the top of the document. This results in a top position of something like 719.12345. This results in an endless loop as the position never changes.
If I detect this first request (based on its negative rail width?) and skip it by returning without completing setControlsSize
, a second request is made. In this second request, the rail width is normal (312), the position of the fullscreen button is detected with a top position of 0, and everything works properly.
This same successful request is made when switching between Text and Visual.
#3
@
11 years ago
- Milestone changed from Awaiting Review to 3.9
- Severity changed from normal to blocker
#5
@
11 years ago
- Owner set to wonderboymusic
- Resolution set to fixed
- Status changed from new to closed
In 27861:
#6
@
11 years ago
Thanks guys. This fix has been labeled as MediaElement.js 2.14.1 so that it matches up in Wordpress and other non-Wordpress sites.
#7
@
11 years ago
- Resolution fixed deleted
- Severity changed from blocker to normal
- Status changed from closed to reopened
There is another maintenance release related to this issue: 2.14.2
. Patch attached. I studied the changes, all looks good.
I think I've traced this to commit a7f67b718 in MediaElement.
This scenario puts
while (lastControlPosition.top > 0)
into an infinite loop.