AzKay Posted December 2, 2008 Share Posted December 2, 2008 (edited) Needed: DivX Web PlayerDivX.au3expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.13.7 (beta) Author: AzKay Script Function: DivX Web Player UDF #ce ---------------------------------------------------------------------------- #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include-once Func _DivX_Create($sDivXTitle, $iX, $iY, $iWidth, $iHeight, $pContextMenu = 1, $pMode = "mini") If Not IsObj(ObjCreate("npdivx.DivXBrowserPlugin.1")) Then SetError(-1, "DivX Plugin not installed") Return -1 EndIf Local $oDivX, $aRet[2] $oDivX = ObjCreate("npdivx.DivXBrowserPlugin.1") $hDivX_ctrl = GUICtrlCreateObj($oDivX, $iX, $iY, $iWidth, $iHeight) $oDivX.SetMovieTitle($sDivXTitle) $oDivX.SetAllowContextMenu($pContextMenu) $oDivX.SetMode($pMode) $aRet[0] = $oDivX $aRet[1] = $hDivX_ctrl Return $aRet EndFunc Func _DivX_Close($oDivX, $hDivX) If Not IsObj($oDivX) Then SetError(-1, "Invalid DivX Object") Return -1 EndIf If Not IsHWnd($hDivX) Then SetError(-2, "Invalid hWnd") Return -2 EndIf $oDivX.Stop GUICtrlDelete($hDivX) Global $oDivX = "" EndFunc Func _DivX_Resize($hDivX, $oDivX, $iX, $iY, $iWidth, $iHeight) If Not IsObj($oDivX) Then SetError(-1, "Invalid DivX Object") Return -1 EndIf If Not IsHWnd($hDivX) Then SetError(-2, "Invalid hWnd") Return -2 EndIf GUICtrlSetPos($hDivX, $iX, $iY, $iWidth, $iHeight) $oDivX.Resize($iWidth, $iHeight) Return 1 EndFunc Func _DivX_GetProperty($oDivX, $pProperty) If Not IsObj($oDivX) Then SetError(-1, "Invalid DivX Object") Return -1 EndIf Switch $pProperty Case "Width" $sRet = $oDivX.GetVideoWidth Case "Height" $sRet = $oDivX.GetVideoHeight Case "Length" $sRet = $oDivX.GetTotalTime Case "Frames" $sRet = $oDivX.GetTotalVideoFrames Case "FrameRate" $sRet = $oDivX.GetVideoFrameRate Case Else SetError(-2, "Invalid Property") Return -2 EndSwitch Return $sRet EndFunc Func _DivX_Command($oDivX, $pCommand, $pParam = "") If Not IsObj($oDivX) Then SetError(-1, "Invalid DivX Object") Return -1 EndIf Switch $pCommand Case "Open" $oDivX.Open($pParam) Case "AutoPlay" $oDivX.SetAutoPlay($pParam) Case "Play" $oDivX.Play Case "Stop" $oDivX.Stop Case "Pause" $oDivX.Pause Case "FF" $oDivX.FF Case "RW" $oDivX.RW Case "StepBackward" $oDivX.StepBackward Case "StepForward" $oDivX.StepForward Case "Seek" $oDivX.Seek("DRAG", $pParam) Case "Volume" $oDivX.SetVolume($pParam) Case "Mute" $oDivX.Mute Case "UnMute" $oDivX.UnMute Case "FullScreen" $oDivX.GoFullscreen Case "Window" $oDivX.GoWindowed Case "Embed" $oDivX.GoEmbedded Case "Loop" $oDivX.SetLoop($pParam) Case "UI" $oDivX.SetMode($pParam) Case "BufferMode" $oDivX.SetBufferingMode($pParam) Case "ContextMenu" $oDivX.SetAllowContextMenu($pParam) Case "ShowContextMenu" $oDivX.ShowContextMenu Case "ShowPreferences" $oDivX.ShowPreferences Case "MovieTitle" $oDivX.SetMovieTitle($pParam) Case "PreviewImage" $oDivX.SetPreviewImage($pParam) Case "PreviewText" $oDivX.SetPreviewMessage($pParam) Case "PreviewTextFontSize" $oDivX.SetPreviewMessageFontSize($pParam) Case Else SetError(-2, "Invalid Command") Return -2 EndSwitch Return 1 EndFuncI havnt done any testing, save the example code.So, any problems/solutions/reports will be appreciated.Ill post more descriptions for each function when I wake up, But thats the basics there.Some things I cant get working right, like SetAutoPlayer, SetPreviewImage, etc. So, Ill have to look at them when I get up.Keep me posted ;o Edited December 2, 2008 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
SoftVoile Posted December 2, 2008 Share Posted December 2, 2008 is it for browsers? ...or for playing AVI files like a player? Unresolved topics:1- Please help me in Editing or replacing a page in FireFox and IE.Please have a look at them. Link to comment Share on other sites More sharing options...
AzKay Posted December 3, 2008 Author Share Posted December 3, 2008 The example is pretty self explanatory. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted December 3, 2008 Share Posted December 3, 2008 (edited) Since Stage6 went down, I don't know how much use DivX is anymore. Most Flash-based websites can offer high quality streaming I guess it all depends, seems like DivX Webplayer can play additional formats (avi/divx) that flash can't. Edited December 3, 2008 by Kastout Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
AzKay Posted December 3, 2008 Author Share Posted December 3, 2008 Theres a few sites that use avi/divx for movie/series streaming, But best not get into that here. Its not so legal. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ludocus Posted December 3, 2008 Share Posted December 3, 2008 normal MciSendString can do this to.. look at some movie udf's Link to comment Share on other sites More sharing options...
AzKay Posted December 3, 2008 Author Share Posted December 3, 2008 None of them worked for me. Thus. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 3, 2008 Share Posted December 3, 2008 (edited) None of them worked for me. Thus.I use mcisendstring for videos in EMP so it is possible, you only have to find the right udf (or create it yourself) Edited December 3, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
AzKay Posted December 4, 2008 Author Share Posted December 4, 2008 I never said it wasnt possible, But all the ones I tried, didnt work with any of my avi files from eztv. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now