HINT: Activex with media player

Post Reply
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

HINT: Activex with media player

Post by Rochinha »

Hello friends:

The code for fwplayer.PRG:

Code: Select all

#include "FiveWin.ch"

function Main(filme)
   local oWnd, oActiveX
   DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support"

   oActiveX = TActiveX():New( oWnd, "MediaPlayer.MediaPlayer.1" )
   oActiveX:SetProp( "FileName"     , filme )
   oActiveX:SetProp( "ShowStatusBar", "True" )
   oActiveX:SetProp( "ShowControls" , "False" )
   oActiveX:SetProp( "AutoStart"    , "False" )
   oActiveX:SetProp( "width"        , 295 ) 
   oActiveX:SetProp( "height"       , 239 )
   oActiveX:SetProp( "ShowStatusBar", 001 )
   oActiveX:SetProp( "ShowControls" , 001 )
   oActiveX:SetProp( "AutoStart"    , 000 )
   oWnd:oClient := oActiveX

   ACTIVATE WINDOW oWnd
   return nil

function EventInfo( event, aParams )
   local cMsg := "Event: " + cValToChar( event ) + CRLF + CRLF 
   local n
   cMsg += "Params: " 
   for n = 1 to Len( aParams )
      cMsg += cValToChar( aParams[ n ] ) + CRLF
   next
   MsgInfo( cMsg )
   return nil
The code for filme.PRG

Code: Select all

<Asx Version = "3.0" > 
	<Title>Playlist1</Title>
	<Param Name = "AllowShuffle" Value = "yes" />
	<Entry> 
		<Param Name = "Bitrate" Value = "96002" />
			<Duration value = "00:02:29.500" />
		<Param Name = "FileSize" Value = "1925021" />
		<Param Name = "FileType" Value = "wmv" />
		<Param Name = "Is_Protected" Value = "False" />
		<Param Name = "Is_Trusted" Value = "false" />
		<Param Name = "MediaType" Value = "video" />
		<Param Name = "SourceURL" Value = "mms://www.itmnetworks.com.br/suporte/videos/muppets.wmv" />
		<Title>Muppets</Title>
		<Param Name = "type" Value = "downloaded" />
		<Param Name = "WM/MediaClassPrimaryID" Value = "{DB9830BD-3AB3-4FAB-8A37-1A995F7FF74B}" />
		<Param Name = "WM/MediaClassSecondaryID" Value = "{00000000-0000-0000-0000-000000000000}" />
		<Param Name = "WMFSDKNeeded" Value = "0.0.0.0000" />
		<Param Name = "WMFSDKVersion" Value = "7.01.00.3055" />
		<Ref href = "mms://www.itmnetworks.com.br/suporte/videos/muppets.wmv"/>
	</Entry>
</Asx>
Last edited by Rochinha on Tue Mar 18, 2008 3:32 pm, edited 1 time in total.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Rochina,

Does it work ? How ? :-)

Is filme the name of that XML file ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Rochinha
Posts: 309
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo
Contact:

Post by Rochinha »

Antonio,

Excuse-me.

The code name of video file is media.ASX

To run this samples uses:

fwplayer.exe filme.asx
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply