如何通过URL在Silverlight 3(或4)中播放MP4(H.264视频)? [英] How to play MP4 (H.264 video) in Silverlight 3 (or 4) from a URL?

查看:91
本文介绍了如何通过URL在Silverlight 3(或4)中播放MP4(H.264视频)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个 MP4 文件的URL.我想开发一个简单的Silverlight应用程序来播放它.

So I have some URL of an MP4 file. I want to develop a simple Silverlight application to play it.

该怎么做? (最好带有示例代码.)

How to do it? (Preferably with example code.)

推荐答案

Ole Jak,

以下是建议的分步操作:

Here is a suggested step-by-step:

步骤1:使用Visual Studio创建一个示例Silverlight应用程序(文件/新建项目/Silverlight应用程序

Step 1: Create a sample Silverlight application with Visual Studio (File / New Project / Silverlight Application

第2步:在新创建的项目中,编辑MainPage.xaml,然后将以下代码放入UserControl的网格中

Step 2: In your newly create project, edit the MainPage.xaml, and place the following code inside the UserControl's Grid

<MediaElement Stretch="Uniform" Grid.Row="0" Width="400" Height="300"
     AutoPlay="true"
     Name="x_Media"
     Source="http://silverlightatlanta.net/Firestarter/Videos/TimHeuer_2.mp4" />

第3步:构建并运行!

吉姆

这篇关于如何通过URL在Silverlight 3(或4)中播放MP4(H.264视频)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆