:Start of VDSWMP
VDSWmp.dsc
DragonSphere Software Demos
If you are viewing this script in your browser you can save it as a VDS 5.x source file (*.dsc) to run it.
#
# DragonSphere Software's Home Page
#
# All Source Files for this demo
#
# This demo hosts the MS Windows Media Player
# To use this demo you drag media files(ie... *.avi,*.mp3,*.wmp, and etc..)
# to the VDS dialog.
# The demo uses Media Player's built in play list to manage the medai files
# Side note: The demo uses Gadget's built in sleep timer and shows the usage
# of the command Gadget VDSHasEvents,ALL
#
#OPTION ERRORTRAP,ONERROR
Title VDS Windows Media Player
OPTION SCALE, 96
OPTION DECIMALSEP, "."
If @Greater(@Name(@SYSINFO(DSVER)),4)
External GadgetX.dll,@SYSINFO(DSVER)
#DEFINE COMMAND,GADGETX,DEFINE,SET,SLEEP,VDSHASEVENTS,OLE,CALL
#DEFINE FUNCTION,GADGETX,GET,GETVAR,OLE,CALL,GETLASTERROR
#DEFINE COMMAND,OpenStateChange
#DEFINE COMMAND,PlayStateChange
Else
Warn This demo will only work with VDS 5+
Stop
End
# Ole true and false
Define Constant,OLE_TRUE,-1
Define Constant,OLE_FALSE,0
# State of playback
# Please select one of these constants from the table for usage.
# WMPPlayState
# State is undefined
Define Constant,wmppsUndefined,0
# Playback is stopped
Define Constant,wmppsStopped,1
# Playback is paused
Define Constant,wmppsPaused,2
# Stream is playing
Define Constant,wmppsPlaying,3
# Stream is Scanning forward
Define Constant,wmppsScanForward,4
# Stream is Scanning in reverse
Define Constant,wmppsScanReverse,5
# Media is being buffered
Define Constant,wmppsBuffering,6
# Waiting for streaming data
Define Constant,wmppsWaiting,7
# End of media reached
Define Constant,wmppsMediaEnded,8
# Preparing new media
Define Constant,wmppsTransitioning,9
# Ready to begin playing
Define Constant,wmppsReady,10
# Trying to reconnect for streaming data
Define Constant,wmppsReconnecting,11
# Last playstate
Define Constant,wmppsLast,12
# WMPOpenState
# Undefined
Define Constant,wmposUndefined,0
# New Playlist is about to be loaded
Define Constant,wmposPlaylistChanging,1
# Locating the playlist
Define Constant,wmposPlaylistLocating,2
# Connecting to the server holding a playlist
Define Constant,wmposPlaylistConnecting,3
# Loading a playlist
Define Constant,wmposPlaylistLoading,4
# Opening a playlist
Define Constant,wmposPlaylistOpening,5
# Playlist is open
Define Constant,wmposPlaylistOpenNoMedia,6
# Playlist has changed
Define Constant,wmposPlaylistChanged,7
# New media is about to be loaded
Define Constant,wmposMediaChanging,8
# Locating the media
Define Constant,wmposMediaLocating,9
# Connecting to the server holding media
Define Constant,wmposMediaConnecting,10
# Loading media
Define Constant,wmposMediaLoading,11
# Opening a media
Define Constant,wmposMediaOpening,12
# Media is open
Define Constant,wmposMediaOpen,13
# Starting codec acquisition
Define Constant,wmposBeginCodecAcquisition,14
# End codec acquisition
Define Constant,wmposEndCodecAcquisition,15
# Starting license acquisition
Define Constant,wmposBeginLicenseAcquisition,16
# End license acquisition
Define Constant,wmposEndLicenseAcquisition,17
# Starting individualization
Define Constant,wmposBeginIndividualization,18
# End individualization
Define Constant,wmposEndIndividualization,19
# Waiting for media
Define Constant,wmposMediaWaiting,20
# Opening an URL whose type is not known
Define Constant,wmposOpeningUnknownURL,21
# Objects needed
Define Variable,Object,WMP
Define Variable,Object,MyPlayList
Define Variable,Object,MyMedia
Define IID,WMPOCXEvents,{6BF52A51-394A-11D3-B153-00C04F79FAA6}
# Gadget VDSHasEvents flags
Define Constant,KEY,$1
Define Constant,MOUSEMOVE,$2
Define Constant,MOUSEBUTTON,$4
Define Constant,POSTMESSAGE,$8
Define Constant,TIMER,$10
Define Constant,PAINT,$20
Define Constant,SENDMESSAGE,$40
Define Constant,HOTKEY,$80
# For debugging turn on Exceptions
# Ole Exceptions,HIDE
# Initialize OLE This is required for any application to use ActiveX controls.
Ole Init
%%NewState = 0
# Create the Media Player object and save it to the Gadget WMP object
#Set WMP,@Ole(Create,WMPlayer.OCX.7,NULL)
# Gets the pixels from inches
# This allows our media player to display a
# wide screen 9" wide X 6" heigh just like many portable DVD players.
%%Width = @Prod(@Sysinfo(PIXPERIN),7)
%%Height = @Prod(@Sysinfo(PIXPERIN),4)
%%winclass = "#WMP"
DIALOG CREATE,VDS Windows Media Player,-1,0,%%Width,%%Height,CLASS WMP,DRAGDROP,PAINT,RESIZABLE
DIALOG ADD,MENU,View,Full Screen,All Controls,Mini Controls,No Controls
REM *** Modified by Dialog Designer on 9/11/2005 - 17:54 ***
# Add WMP to the VDS dialog
# GadgetX Add,OLE,,
:End of VDSWmp