no way to modify it's source

I have a panasonic webcam which contains an internal web server. It displays a page the shows the webcam video stream as well as a bunch of controls like pan and tilt. I am framing the page presented by the webcam in an iframe so I can surround it with additional content. Unfortunately the webcam's html also uses frames and every time a control is pressed (like a pan button) the page executes javascript that looks something like:

top.location.href = "CgiStart?page=Single&Resolution=320x240 ...

This breaks out of the iframe I was using to enclose the webcam page and thus I lose the additional content I had surrounding it.

I cannot modify the code on the webcam. I can stop the webcam from "busting out" of my container frame, but that's not what I want. I need it to execute the cgi script and reload the page, but I want it to happen inside the iframe. In essence I want "top" to refer to the top of the iframe, not the iframe's container. I've tried a couple of things with no luck. I'm hoping there is an obvious solution and that I'm just not seeing it.


Could you write a proxy to the webcam in php or so and let it modify the page/rewrite it?

Or you could give the framing website a subdomain of the webcam, allowing you to extract parts with ajax:

https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript

链接地址: http://www.djcxy.com/p/59032.html

上一篇: 通过访问页面源防止帧破坏

下一篇: 没有办法修改它的源代码