views:

15

answers:

3

Hi.

Does anyone know how to display DirectShow video in HTML container (e.h. DIV) instead of separate pop-up-like window.

Already I did all the things needed to run custom Rendering Behavior, it includes all interfaces and events handling, but cannot find anything related with my problem neither in the Internet nor in books I have.

Anyone can give me a hint what I need to do?

P.S. MSDN articles mention only DirectDraw and Direct3D when setting IFlags on IHTMLPainter - but maybe it's a wrong place I'm looking for :-)

Regards.

A: 

In general, this is sort of a messy topic. As far as I know, your options are a custom activex control (yuck...in general, this approach is a logistical nightmare) or leveraging an existing player like Silverlight or Flash.

Silverlight doesn't give you control on a DirectShow level, but it does have additional support through the MediaStreamSource that may meet your needs. And once your audio/video is in Silverlight, you have all sorts of options for advanced overlays and interface elements.

kidjan
A: 

I won't comment on Silverlight, as I have no experience of it, but I wouldn't agree with kidjan's summary of using an ActiveX control.

A custom ActiveX control has served our company well for many uses - including native apps, managed apps, web pages ...

The beauty of using an ActiveX control is that you have total control over the code in your player, stream authentication mechanisms, rendering capabilities etc.

I wrote an entire player in less than a month (network code included), then wrapped it in a COM control in less than a week.

Be under no illusion though, DirectShow and COM programming isn't easy. It's all about trade off - a Flash or Silverlight solution will probably get you going quickly. An ActiveX ctrl will give you total control.

I also read that HTML5 standard will include support for embedding video content(!) Might be worth looking into, although I don't know how many browsers support the (emerging) standard.

freefallr
A: 

BTW, in C# WPF web application, there is some hack for it.

http://videorendererelement.codeplex.com/

plan9assembler