davatron5000/FitVids.js — pull request #141 by mdale (2013-10-14 16:50:09+00:00)
Title: FitVid modified for Kaltura dyamic embeds

Change Summary:
* no $(target).wrap() calls if not needed ( breaks instance reference of extended DOM objects )
* apply fill CSS directly to target ( not a CSS rule that breaks with rules against injected same domain iframe )
* use data attribute for fitvid applied flag, not parent selector
* select wrap against "parents" in cases embed target has DOM manipulations.

I understand this may change the fundamentals too much, but a client requested compatibility so wanted to give you visibility on these changes.

Kaltura dynamic embed works by embedding a 'a same domain iframe' this give us a lot more more control, ( synchronous api, parent page modification for pseudo fullscreen on iPads, IE, host page analytics etc. ) but fitvids's auto iframe selectors and .wrap calls break things a bit.

Isolated test file here:
http://player.kaltura.com/modules/KalturaSupport/tests/FitVids.html

If using kaltura's cross domain iframe based player things work in the normal way without modification.