html - Selecting tags from inside an iframe with Jquery -


i need select html5 video element inside embedded ifame (specifically video element generated embedding youtube video). know want use $("video") selector grab element, since in iframe more complex.

i found .contents() method spill out iframe contents (this link) however, request gets blocked because cross-origin request.

here dom error after trying .contents() method:

uncaught domexception: failed read 'contentdocument' property 'htmliframeelement': blocked frame origin "null" accessing cross-origin frame. @ error (native) @ m.each.contents (file:///home/alex/desktop/kiosk/client/jquery.js:2:26679) @ function.m.extend.map (file:///home/alex/desktop/kiosk/client/jquery.js:2:3714) @ m.each.m.fn.(anonymous function) [as contents] (file:///home/alex/desktop/kiosk/client/jquery.js:2:26777) @ <anonymous>:2:9 @ object.injectedscript._evaluateon (<anonymous>:905:140) @ object.injectedscript._evaluateandwrap (<anonymous>:838:34) @ object.injectedscript.evaluate (<anonymous>:694:21)

any ideas fix or work around this?


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -