Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

PROBLEM: Invalid State Error with the Media Player Object

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PROBLEM: Invalid State Error with the Media Player Object

    PROBLEM: Invalid State Error with the Media Player Object

    PROBLEM: Invalid State Error with the Media Player Object

    Document ID: IR04049
    The information in this article applies to:
    • AutoPlay Media Studio 4.0

    SUMMARY

    This article explains the problem where your application will generate invalid state errors when you use a MediaPlayerObject.Load action followed by a MediaPlayerObject.Play action on a Media Player Object.

    DISCUSSION

    If you have a Media Player Object which is set to Automatically Start Playing Media, and you proceed to perform a MediaPlayerObject.Load action followed by a MediaPlayerObject.Play action on it, AutoPlay Media Studio 4.0 will generate an invalid state error (see the following code):

    MediaPlayerObject[MediaPlayer1].Load("%SrcDir%\movie.mpg")
    MediaPlayerObject[MediaPlayer1].Play

    The above actions will produce the following error:
    "The Media Player's state was incompatible with the action."

    Basically, when you load a file into a Media Player Object which is set to Automatically Start Playing Media, your video will automatically play. There is no need for the MediaPlayerObject.Play action.

    There are two solutions to this problem. Either:

    1. Remove the MediaPlayerObject.Play action.

      OR

    2. Keep the MediaPlayerObject.Play action, and ensure that your Media Player Object is not set to Automatically Start Playing Media.

    KEYWORDS: AutoPlay Media Studio 4.0, Bug, Invalid, State, Play, Load, Media, Player, Object


    Last reviewed: October 31, 2003
    Copyright 2003 Indigo Rose Corporation. All rights reserved.
Working...
X