views:

41

answers:

1

Hello everyone,

I am using the following html scripts to embed images, text and video into one page. For video, I am using sl2videoplayer to render it (an open source silverlight media player). Here is the project's URL => http://sl2videoplayer.codeplex.com/.

The current issue is, only the top part of video could be displayed. I think the reason may be the actual video size (1024 * 768) is larger than the designed size (500 * 240). My purpose is to display all part of video is a small area (to have an effect of zoom out, just like Youtube videos, if we do not double click to view in full screen, we can see all part of video but in a smaller zoom out effect, not display only a part of the video) -- currently only top part of video is displayed.

Any ideas how to solve this issue?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;

<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
</head>

<body>

<table style="width: 107%">
    <tr>
     <td style="width: 96px">&nbsp;</td>
     <td style="width: 470px"><img height="113" src="top.gif" width="561" /></td>
     <td>&nbsp;</td>
    </tr>
    <tr>
     <td style="width: 96px"><img height="257" src="news.jpg" width="312" /></td>
     <td style="width: 470px">
    <div id="silverlightControlHost">
     <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="500" height="240">
      <param name="source" value="ClientBin/VideoPlayer.xap"/>
      <param name="onerror" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="initParams" value="cc=true,markers=true,markerpath=markers_movie21.xml,m=http://mywebsite/videos/test1.wmv" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">
          <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
      </a>
     </object>
     <iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
    </div>   
     </td>
     <td>&nbsp;</td>
    </tr>
    </table>
<p>
Here is a test content. 
<br />
</p>

</body>

</html>

thanks in advance, George

A: 

I think Silverlight has the ability to scale, but the problem is that your object's aspect ratio is different from your video's aspect ratio, so it gets scaled some but then cut off. If it must fit within 500x240, try making the object 320x240 and putting a 90x240 black bar on either side.

Kev