Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Location
    Texas
    Posts
    239

    Video Object Play/Pause

    I'm at a loss here and could use some help. I decided to switch the Media.Player object with a Video object so I could customize my slider to match my app a little better, and for some reason this code works on all videos except .mpg. I'm not really sure what is going on here (Maybe a bug) but if someone could point me in the right direction I would be greatfull.

    I'm using a WinButton to play and pause the video.

    Code:
    mpstate = Video.GetState("Video1");
    
    	if (mpstate == VIDEO_PAUSED) then
    	Video.Play("Video1");
    	WinButton.SetText("Plugin8", "Pause");
    	else
    	Video.Pause("Video1");
    	WinButton.SetText("Plugin8", "Resume");
    
    	end

  2. #2
    Join Date
    Dec 2004
    Location
    Texas
    Posts
    239
    Nevermind I got it. I added a Dialog.Message after the Get.State and the returns are 0 for paused and 2 for playing. The help file says the returns should be Video_Paused and Video_Playing. This is how I changed it and it works fine now:

    Code:
    mpstate = Video.GetState("Video1");
    --Dialog.Message("Notice", mpstate, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    
    	if (mpstate == 0) then
    	Video.Play("Video1");
    	WinButton.SetText("Plugin8", "Pause");
    	elseif (mpstate == 2)then
    	Video.Pause("Video1");
    	WinButton.SetText("Plugin8", "Resume");
    
    	end

Similar Threads

  1. Online Video Tutorials and CD-ROM Training Series
    By Ted Sullivan in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 05-10-2004, 12:05 PM
  2. Playing a Video using the Embedded Video Object
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-26-2003, 12:36 PM
  3. INFO: Difference between the Media Player Object and the AVI Object
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-29-2002, 02:15 PM
  4. HOWTO: Make a Media Player Object Go Full Screen
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-23-2002, 11:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts