Sign in to follow this  
Followers 0
choto

media player inside your application ?......help

6 posts in this topic

I know there is a control in autoit to play an avi file inside a gui, but it cannot read many formats...so, my question is:

Is there any way to put the ms media player inside my gui, I DON'T want to put the ms media player itself, only a window that show the media file I want to play, without any buttons or anything.

thanks.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

I could not make WMPlayer 7 object play movies embedded in autoit, only sound but there is another solution and that is to use my old friend Jeff Glatt's CWebpage library that can be made embedded into a window and play almost any code like mp3, Wave, avi, Vob, .wmv etc. here's a small example script...

; example on useing the medie player object with Jeff Glatt CWebPage library

#include "GUIConstants.au3"
$dll = DLLOpen("cwebpage.dll")

$hwnd = GUICreate("MediePlayer...",419,305,-1,-1)
$pos = WinGetClientSize($hwnd)

DLLCall($dll,"long","EmbedBrowserObject","hwnd",$hwnd)
GUISetState()

$a = '<EMBED src="D:\Video\Anne\Anne_Mette.wmv" hidden=0 autostart=1 loop=1'
$a = $a&' AutoSize=1 AutoRewind=1 ShowControls=0 ShowDisplay=1 VideoBorderWidth=10 VideoBorder3D=0'
$a = $a&' Volume=-1000 mute=0 width=280 height=250 style="border:1 solid red">'
 
DLLCall($dll,"long","DisplayHTMLStr","hwnd",$hwnd,"str",$a)
While 1
   $msg = GUIGetMsg()
   If $msg = -3 Then ExitLoop
WEnd
$ret = DLLCall($dll,"long","UnEmbedBrowserObject","hwnd",$hwnd)
DLLClose($dll)

Instate of the EMBED html tag one could use PARAM, for long time ago I wrote a medieplayer with CWebpage library in autoit3 - still downloadable and it uses the PARAM tag if one wants to have a look...

Download at site:

http://www.sitecenter.dk/latenight/nss-folder/au3medie

WMplayer Documentation on page

http://msdn.microsoft.com/library/default....k/paramtags.asp

CWebpage library is downloadable from:

http://www.codeguru.com/Cpp/I-N/ieprogram/article.php/c4379

kjactive :whistle:

Edited by kjactive

Share this post


Link to post
Share on other sites

Thank you , this example is waht I am looking for....

thanks PerryRaptor too.

Share this post


Link to post
Share on other sites

Only one more thing, what license has cwebpage library?, can I use it in my own programs...free ones? comercial ones?

thanks.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

read documentation related to the library but I don't think that there is any restrictions as I know Jeff to make a lot of freeware applications and non is with licence needs and he included the source code...

kjactive ;)

Edited by kjactive

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0