Belini Posted July 10, 2016 Posted July 10, 2016 (edited) I've googled a lot and I have not found a UDF to play .mp4 videos in a small frame in the GUI, can anyone give a hint? Edited July 10, 2016 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
dmob Posted July 11, 2016 Posted July 11, 2016 VLC? https://www.autoitscript.com/forum/topic/114143-vlc-media-player-udf/
PACaleala Posted July 11, 2016 Posted July 11, 2016 get the au3 source code from http://aamp.sourceforge.net/ have fun
Belini Posted July 11, 2016 Author Posted July 11, 2016 @dmob you tell if I can use this UDF with the portable version of VLC?@PACaleala I could not test because the code that is there is full of strange characters and missing part in some functions too, you have code that is working? My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Belini Posted July 12, 2016 Author Posted July 12, 2016 I found a code made by @jscript using the in-built Media Player but I was unable to close the video that is playing to put another and here are getting several videos open at the same time, does anyone know how to close the video to perform next? expandcollapse popup#include <guiconstantsex.au3> #include <windowsconstants.au3> #include <ButtonConstants.au3> #include <WinAPI.au3> #include <IE.au3> _Example(@ScriptDir & "\teste.mp4") ; File name of media! ; example Func _Example($sFileName) Local $hForm, $aiCliSize, $iCtrlID ;$hForm = GUICreate("MediaPlayer_Embedded!", 640, 480, -1, -1, BitOR($WS_POPUP, $WS_SIZEBOX), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) ;$aiCliSize = WinGetClientSize($hForm) ;$iCtrlID = _MediaPlayerEmbeded($sFileName, -2, -2, 640, 490) ;GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") ; Or $hForm = GUICreate("MediaPlayer_Embedded!", 640, 480, -1, -1, $WS_POPUP) $aiCliSize = WinGetClientSize($hForm) $iCtrlID = _MediaPlayerEmbeded($sFileName, 1, 1, $aiCliSize[0], $aiCliSize[1]) GUISetState() ;Sleep(2000) ;GUICtrlSetState($iCtrlID, $GUI_HIDE) ;Sleep(2000) ;GUICtrlSetState($iCtrlID, $GUI_SHOW) ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc ;==>_Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _MediaPlayerEmbeded ; Description ...: ; Syntax ........: _MediaPlayerEmbeded( $sFileName, $iLeft, $iTop, $iWidth, $iHeight ) ; Parameters ....: $sFileName - A string value. ; $iLeft - An integer value. ; $iTop - An integer value. ; $iWidth - An integer value. ; $iHeight - An integer value. ; Return values .: None ; Author ........: JScript ; Modified ......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: _MediaPlayerEmbeded($sFileName, $iLeft, $iTop, $iWidth, $iHeight) ; =============================================================================================================================== Func _MediaPlayerEmbeded($sFileName, $iLeft, $iTop, $iWidth, $iHeight) Local $oShell, $sInnerHTML, $iCtrlID $sInnerHTML = '<object id="player" height="100%" width="100%" align="middle" ' & _ 'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"> ' & _ ' <param name="URL" value="' & $sFileName & '">' & _ ' <param name="uiMode" value="none"> ' & _ ' <param name="fullScreen" value="false"> ' & _ ' <param name="ShowControls" value="true"> ' & _ ' <param name="ShowStatusBar" value="true"> ' & _ ' <param name="ShowDisplay" value="true"> ' & _ ' <embed type="application/x-mplayer2" ' & _ ' pluginspage = "http://www.microsoft.com/Windows/MediaPlayer/" ' & _ ' SRC="' & $sFileName & '"' & _ '</embed></object>' $oShell = ObjCreate("Shell.Explorer") $iCtrlID = GUICtrlCreateObj($oShell, $iLeft, $iTop, $iWidth, $iHeight) $oShell.navigate("about:blank") While $oShell.Busy() Sleep(10) WEnd With $oShell.document .write('<HEAD><TITLE></TITLE><script language="javascript"></script></HEAD>') .write('<body onselectstart="return false" oncontextmenu="return false" onclick="return false" ondragstart="return false" ondragover="return false">') .body.innerHTML = $sInnerHTML .body.topmargin = 0 .body.leftmargin = 0 .body.scroll = "no" .body.bgcolor = 0x000000 .body.style.borderWidth = 0 EndWith Return $iCtrlID EndFunc ;==>_MediaPlayerEmbeded Func WM_NCHITTEST($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam, $lParam Local $iDef = _WinAPI_DefWindowProc($hWnd, $iMsg, $wParam, $lParam) Switch $iDef Case $HTSYSMENU, $HTBOTTOM, $HTBOTTOMLEFT, $HTBOTTOMRIGHT, $HTLEFT, $HTRIGHT, $HTTOP, $HTTOPLEFT, $HTTOPRIGHT Return $HTCAPTION; -1 to not moving! EndSwitch Return $iDef EndFunc ;==>WM_NCHITTEST My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Belini Posted July 18, 2016 Author Posted July 18, 2016 No one knows how I can close the previous video to another place to play using the embedded media player? My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Danyfirex Posted July 18, 2016 Posted July 18, 2016 (edited) Hello. I think is redundant embebed the windows media Player control using html. you can use autoit object functions instead. here is the doc of windows media player. https://msdn.microsoft.com/en-us/library/windows/desktop/dd564680(v=vs.85).aspx Saludos Edited July 18, 2016 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Belini Posted July 19, 2016 Author Posted July 19, 2016 Thanks for the tip @Danyfirex I'll see if I can get something from the information that is there My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
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