PROBLEM: Invalid State Error with the Media Player ObjectDocument ID: IR04049
The information in this article applies to:
- AutoPlay Media Studio 4.0
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.
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):
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:
- Remove the MediaPlayerObject.Play action.
- 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.