HINT: Activex with media player

HINT: Activex with media player

Postby Rochinha » Mon Mar 17, 2008 4:51 pm

Hello friends:

The code for fwplayer.PRG:
Code: Select all  Expand view
#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  Expand view
<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.
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Antonio Linares » Mon Mar 17, 2008 7:46 pm

Rochina,

Does it work ? How ? :-)

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Rochinha » Tue Mar 18, 2008 3:27 pm

Antonio,

Excuse-me.

The code name of video file is media.ASX

To run this samples uses:

fwplayer.exe filme.asx
Rochinha
 
Posts: 310
Joined: Sun Jan 08, 2006 10:09 pm
Location: Brasil - Sao Paulo

Postby Antonio Linares » Tue Mar 18, 2008 5:52 pm

Thanks! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests