[wp-trac] [WordPress Trac] #28905: Audio/Video MCE views should use iframe sandboxes
WordPress Trac
noreply at wordpress.org
Wed Jul 16 23:13:57 UTC 2014
#28905: Audio/Video MCE views should use iframe sandboxes
----------------------------+-------------------------
Reporter: wonderboymusic | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.0
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: javascript
----------------------------+-------------------------
Comment (by azaozz):
This bit: `var p, win = $( 'iframe', content ).get(0).contentWindow;` in
both `pausePlayers()` and `unsetPlayers()` breaks all external embeds that
use iframe (most of them?). If the iframe is not "same origin" we can't
access `contentWindow`.
On top of that Chrome throws `Uncaught SecurityError: Blocked a frame with
origin...` making it impossible to use even `try{} catch(e){}` there.
Thinking a better solution would be to fire an editor event for
pausing/removing the ME.js players. Then listen for it from inside the
(local) iframes we've added. That would make it asynchronous, i.e. you
don't need to select any players, don't even need to know if there are
any.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28905#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list