libVLC in asp.net application

This forum is about all development around libVLC.
gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

libVLC in asp.net application

Postby gosalyn » 05 May 2009 11:21

hi everyone,

i want to use libVLC dll in an asp.net 3.5 web application in order to show video over a web browser. is this possible somehow? and can you guys point me to the main steps to do this?

thanks in advance..

gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

Re: libVLC in asp.net application

Postby gosalyn » 05 May 2009 13:41

i need your ideas on this because if using libvlc in asp.net is not likely then i need to think of something else. i don't want to use the activex control for certain reasons and i dont want to use the javascript api because writing this in c# will help me in reusability.

thanks again...

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libVLC in asp.net application

Postby Jean-Baptiste Kempf » 05 May 2009 15:45

YOu can see around 4 bindings to C# on this very forum...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

Re: libVLC in asp.net application

Postby gosalyn » 05 May 2009 15:51

sorry but i couldn't get what you mean.

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: libVLC in asp.net application

Postby tamiro44 » 07 May 2009 08:42

Here 3 out of the 4 bindings:

Marx libvlc Wrapper for 0.9.0 version 0.0.2 (Alpha Release)
viewtopic.php?f=32&t=47385
http://www.2shared.com/file/3586524/6c4 ... apper.html

VideoLan.Interop a .Net libvlc 0.9.x wrapper
viewtopic.php?f=32&t=52021
http://meedios.svn.sourceforge.net/view ... n%200.9.0/

libvlcnet - .NET library based on libvlc
viewtopic.php?f=32&t=58438

Good luck.

gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

Re: libVLC in asp.net application

Postby gosalyn » 07 May 2009 08:59

hi tamiro,

I had used the .net wrapper in my c# desktop application and everything works fine. but my requirement is to display a live stream on the web browser. and i tried somethings like using the "vlcusercontrol" inside from a web user control in asp.net. but although i can get the sound, nothing is displayed on the browser. And i'm sure it's not a codec problem since in my desktop application I can get both the sound and the display.

so i was wondering if anyone has somehow used these .net wrappers in an asp.net web page. If i can't get to render the display on the web browser then i'm gonna have to use the activex plugin with javascript in asp.net. And I'm not willing to do so because this will make my application dependent on IE.

thanks again..

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: libVLC in asp.net application

Postby tamiro44 » 07 May 2009 09:23

Write here:
1. The string that you give VLC in order to play the stream.
2. VLC's messages.

Maybe someone could help you..

gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

Re: libVLC in asp.net application

Postby gosalyn » 07 May 2009 09:43

In my desktop application where everything works fine, i wrote:

VLanControl.VlcUserControl vlcUC = new VLanControl.VlcUserControl();
//here i added vlcUC to the panel on the form
vlcUC.AddToPlayList(@"udp://@239.15.15.1:1234", null, null);
vlcUC.Play();


but when i use these lines inside of a webcontrol in asp.net, i get no exceptions from the .net wrapper code. i debugged it line by line and the code flows as it does in my desktop app. no errors, no exceptions. however i cant get to see the stream on the browser, i just hear it.

tamiro44
Cone that earned his stripes
Cone that earned his stripes
Posts: 131
Joined: 15 Feb 2009 15:21

Re: libVLC in asp.net application

Postby tamiro44 » 07 May 2009 09:58

I don't know if this helps you, but you can open IE and play the stream there by
getting the handle like that (Taken from http://www.codeproject.com/KB/audio-vid ... Video.aspx):

Code: Select all

bool bFound = false; IntPtr hwnd = System.IntPtr.Zero; if (!bIELauncheded) { bIELauncheded = true; SHDocVw.ShellWindows SWs = new ShellWindows(); IE = new InternetExplorer(); IE.Visible = true; object o = new object(); IE.Navigate("about:blank", ref o, ref o, ref o, ref o); } IEnumerator windows = new SHDocVw.ShellWindowsClass().GetEnumerator(); while (!bFound && windows.MoveNext()) { if ((windows.Current is SHDocVw.IWebBrowser2) && ((windows.Current as SHDocVw.IWebBrowser2).HWND == IE.HWND)) { ((windows.Current as SHDocVw.IWebBrowser2).Document as IOleWindow).GetWindow(out hwnd); if (IsWindowVisible(hwnd)) { bFound = true; vHandle = hwnd.ToInt32(); break; } } } if (!bFound) { Point pie = new Point(350, 350); IntPtr hIE = Win32.WindowFromPoint(pie); vHandle = hIE.ToInt32(); }

gosalyn
New Cone
New Cone
Posts: 6
Joined: 05 May 2009 11:13

Re: libVLC in asp.net application

Postby gosalyn » 07 May 2009 13:41

yeah I know that liquid video project, i did examine it too. but my application needs to be an asp.net web application because displaying video over the browser is just one aspect of the project and there are some other concepts too. so i thought that displaying the video over a browser like liquid video does (like creating an IE page and getting its handle), would be inappropriate on an asp.net project.
thanks again for your help tamiro..


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 25 guests