1

I need to embed a video file codified in Windows Media Video format (WMV). The video files are send in streaming using Windows Media Services(in on Demand Mode) over HTTP protocol, and the client need to reproduce them. I need to dinamically create a page with a video file embedded (each time the file and its path can change).

If I simply put in browser client the path of the file to reproduce, like:

http://myMediaServer:8000/stremVideo/pinball.wmv

automatically Windows Media Player opens, and I can control the reproduction of the video (seek forward, seek backward, pause or resume), without any problem, while if the video file is embedded in an HTML page, using the following code I can't seek the reproduction but I can only pause and resume the video.

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/">
   <param name="Filename" value="http://remoteServer:8000/stremVideo/pinball.wmv">
   <param name="AutoStart" value="true">
   <param name="ShowControls" value="true">
   <param name="BufferingTime" value="2">
   <param name="ShowStatusBar" value="true">
   <param name="AutoSize" value="true">
   <param name="InvokeURLs" value="false">
   <embed src="http://remoteServer:8000/stremVideo/pinball.wmv" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>
</object>

So, the questions are the following:

How can I obtain all the control for the embedded video file?

Someone suggest to use Silverlight plugin. How can I embed video in a HTML page using Silverlight plugin? I need to create a Silverlight application? If yes, I need to have one application for each video file I want reproduce?

GVillani82
  • 17,196
  • 30
  • 105
  • 172

2 Answers2

0

You need to create one Silverlight player app and use it as more times as you want. And you can control it via JS. Silverlight is best solution for high-quality WMV on pages. Params, which you defined, are params of Silverlight app and you must specify in app which params you must have and how they will be used.

Arman Hayots
  • 2,459
  • 6
  • 29
  • 53
  • Thank you, @Arman Can you suggest me a guide for this? Using js I can define the .wmv file I want reproduce? – GVillani82 Jul 05 '13 at 10:17
  • You can define file via html and control via JS. If you want, I can write a simple player app, but currently I'm on work and I'll be home six hours later. – Arman Hayots Jul 05 '13 at 10:19
  • So, are you using static pages? How about using ASP.NET MVC Razor? You can easy write dynamic pages using html and c#. – Arman Hayots Jul 05 '13 at 10:21
  • I'm not so practice with ASP .NET. Did you know any good guide that can help me for build a simple player app? I would not steal your time ;) However I know something of C# language – GVillani82 Jul 05 '13 at 10:28
  • 1) You don't stealing my time 2) No, I don't know. At the years of the practice I read a lot of books and guides and don't remember them. – Arman Hayots Jul 05 '13 at 10:32
  • Ok, thank you. I'm thinking that another possibility, is to use windows media player plugin, but in this case I need an automatically redirect to plugin downolad page if the plugin is not yet install, and I don't know how perform this task – GVillani82 Jul 05 '13 at 10:46
  • So, I'm went home. Are you need playback controls? – Arman Hayots Jul 05 '13 at 18:00
0

There is an open source player frame work which may help: Have you looked at this? http://playerframework.codeplex.com/

John
  • 1,714
  • 21
  • 41
  • Thank you @John. Can you give me an example of how to use it? Each clinet need to download the framework? – GVillani82 Jul 05 '13 at 13:32
  • I have tried the examples from the site, but it does not work in chrome (only audio is reproduced), while in firefox and explorer it works. It seems that .wmv can't be reproduced using that framework – GVillani82 Jul 05 '13 at 13:37
  • no, I don't have any examples. However if you post on the discussion forum on the codplex site, Tim will answer your queries fairly quickly. – John Jul 08 '13 at 15:15