0

Okay, so I recently learned that the ViewRight web player from Verimatrix is a so called NPAPI plugin which can be overlayed with HTML elements using a technique involving a "dummy iframe".

Div on top of ViewRight-player

HTML on top of NPAPI plugin

Now, as far as I've been able to gather, Silverlight appears to be a NPAPI plugin as well (I may be mistaking). So I tried the same approach to display a DIV on top of a Silverlight web player from another website loaded inside an iframe.

Unfortunately it doesn't work... As soon as the Silverlight player loads it sits on top of everything else. I know that setting the windowless param to true in the player would fix it. But since the player isn't hosted by me I can't edit any of the object parameters.

Here's a test scenario based on the "dummy iframe" method: http://jsfiddle.net/c7Hsp/

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
background: black;
cursor: auto;
-webkit-user-select: none;
user-select: none;
overflow: hidden;
}
:::-webkit-scrollbar { 
display: none; 
}
.wrapperDiv {
position: absolute;
bottom: 200px;
left: 200px;
width: 200px;
height: 200px;
margin: 0 auto;
}
.dummyFrame {
position: absolute;
top: 200px;
left: 200px;
width: 200px;
height: 200px;
background-color: red;
}
.contentDiv {
position: absolute;
top: 25px;
left: 25px;
width: 300px;
color: white;
font-family: Arial;
font-size: 18pt;
text-align: center;
background-color: green;
}
#silverFrame {
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
border: 0px;
background: transparent;
}
</style>
</head>
<body>
<iframe id="silverFrame" src="http://clubace.dk/silverlight.htm"></iframe>
<div class="wrapperDiv">
<iframe class="dummyFrame" frameborder="0"></iframe>
<div class="contentDiv">Weee!<br>I'm overlaying this<br>NPAPI plugin :D</div>
</div>
</body>
</html>

I hope somebody can help me make this work :-)

Thx

Community
  • 1
  • 1
Ace
  • 223
  • 4
  • 14

1 Answers1

0

for your deleted question PHP: Get attribute value of a specific tag from HTML [duplicate] you miss an S in the

document.getElementsByClassName('classname')

and you can then

.
.
$attr = $tag->item(15);
$percent = $tag.style.heigth

http://www.w3schools.com/jsref/prop_style_height.asp

Liko28s
  • 141
  • 5
  • I hope my question isn't deleted :-) Thank for the suggestion but as far as I can see you're referring to JavaScript's getElementsByClassName which I don't believe can be used in PHP. The same goes for the style.height thing ;-) – Ace Jun 20 '14 at 01:06