Link to home
Start Free TrialLog in
Avatar of Smoerble
SmoerbleFlag for Germany

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!
Avatar of benbalbo
benbalbo

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.
Avatar of Smoerble

ASKER

Yes that would be easier but it is variable.
ASKER CERTIFIED SOLUTION
Avatar of benbalbo
benbalbo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Problem was solved by triggering a setTimeout("checkPlayerState()",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".