Smoerble
asked on
Media Player: Detecting end of film for multiple film ASX
I am using an embedded Windows Media Player. The film called is an ASX file that specify a series of streams to load after one another. I would like to detect the end of the *last* stream. The Player.playState returns "MediaEnded" after each stream but I want an event only after the last. Clues anyone? Thank you very much!
If the page always knows how many streams are going to be played, you could use a counter to count the number of "MediaEnded"s you get.
ASKER
Yes that would be easier but it is variable.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Problem was solved by triggering a setTimeout("checkPlayerSta te()",10) timer when I receive a media ended event. If I after 10 ms still get a "media ended" status, I know it was the last stream, otherwise I get status "buffering".