Silverlight 媒体播放器的问题

发布于 2024-08-21 00:49:46 字数 1027 浏览 6 评论 0原文

我有什么?

我有一个动态加载 Silverlight 对象的 Web 部件。 Web 部件加载媒体播放器并运行视频。我指的是Silverlight 2.0。

我正在使用以下代码:

Silverlight silverlightControl = new Silverlight();
silverlightControl.ID = "VideoXaml";
silverlightControl.Source = "~/_layouts/1033/MyVideoPlayer.xap";
silverlightControl.Width = Unit.Percentage(100);
silverlightControl.Height = new Unit(400);
silverlightControl.InitParameters = paramBuilder.ToString();
silverlightControl.AutoUpgrade = true;

this.Controls.Add(silverlightControl);

我想做什么?

现在,我想在 Silverlight 3.0 中运行相同的代码。因此,我将 DLL System.Web.Silverlight.dll 与 Web 部件一起打包,当 GAC 中存在此 DLL 时,Web 部件至少在我的仅具有 Silverlight 3.0 的计算机中工作正常。

我遇到了什么问题?

在我的一台装有 Silverlight 3.0 的客户计算机上,该 Web 部件无法正常工作,而其他 Silverlight Web 部件却可以正常工作。

我们厌倦了通过使用 JavaScript(Silverlight 3 方式)加载 Silverlight 对象来更改代码。但是,当其他 Web 部件在同一页面上实现回调时,我们在加载 Silverligh 控件时遇到了问题。视频 Web 部件永远显示加载动画。

有没有人遇到过这样的问题并找到解决方案?

提前致谢!

What I have?

I have a web part which loads Silverlight object dynamically. The web part loads Media player and runs a video. I am referring to Silverlight 2.0.

Following code I am using:

Silverlight silverlightControl = new Silverlight();
silverlightControl.ID = "VideoXaml";
silverlightControl.Source = "~/_layouts/1033/MyVideoPlayer.xap";
silverlightControl.Width = Unit.Percentage(100);
silverlightControl.Height = new Unit(400);
silverlightControl.InitParameters = paramBuilder.ToString();
silverlightControl.AutoUpgrade = true;

this.Controls.Add(silverlightControl);

What I want to do?

Now, I want to run the same code in Silverlight 3.0. So, I am packaging the the DLL, System.Web.Silverlight.dll with the web part and when this DLL is present in GAC, the web part works fine al least in my machine which has only Silverlight 3.0.

What problem am I facing?

On one of my client's machine with Silverlight 3.0, the web part does not works where as other Silverlight web part works fine.

We tired changing the code by loading the Silverlight object using JavaScript (Silverlight 3 way). But, then we faced problem in loading the Silverligh control when other web parts implementing call back on the same page. The Video web part shows the loading animation forever.

Has anyone faced problems like this and found any solutions?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

轮廓§ 2024-08-28 00:49:46

请阅读有关 System.Web.Silverlight 的 Microsoft 白皮书,网址为 http://go.microsoft.com/ fwlink/?LinkId=153377

Read the Microsoft Whitepaper about System.Web.Silverlight at http://go.microsoft.com/fwlink/?LinkId=153377

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文