Re: Embedded Windows Media Player 11 odd behavior
- From: Arjan <Arjan@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Aug 2007 08:44:11 -0700
Hi Tim,
Thank you for your response.
I have taken a look at the WMP docs but they do not contain the answer that
I am looking for... nor any hints on how to solve my problem.
For my project I am using PlayStateChange and OpenStateChange events:
OpenStateChange
case 13: //wmposMediaOpen = 13
PlayStateChange
case 1: // wmppsStopped = 1,
case 3: //wmppsPlaying = 3,
The Play list could be an option however the following must be accomplished
and I do not have a feeling that would be possible with a playlist:
When the movie plays a text is shown that reads the same as what is being
heard.
When the movie finishes the next one must be loaded and the text must change
as well. During the second time the movies are being shown
a question and answer game has to be played a couple of times. When all
questions have been answered correctly the lesson is over. Any question
wrongly answered will result in having to answer the same question again
until all questions have been answered correctly. This question and answer
game is not yet functional at the current webpage.
The code must work also on Windows XP and Windows 2000 clients.
You can see the current code in action at http://www.aditservice.nl/vidilingua
Note that the second textbox contains the WMP events list that were fired
and caught.
As mentioned before:
Under Windows Vista + IE 7 + WMP 11.0.6000.xxxx the code works fine.
Under Windows XP + IE 6 + WMP 11.0.5721.xxxx and
under Windows 2000 + IE 6 + WMP 9 the code loads the movie, shows the first
frame and advances on to the next movie... Oddly both Windows XP and Windows
2000 do play the wav file correctly before advancing to the next item.
Leaving the page and going back the code works fine because the movies have
been cached in the IE cache....
--- Arjan
"CallMeTimm" wrote:
It is hard to say without looking at your code, but what event causes
the URL to refresh with the next media file? You have to be a little
careful using playState values to so certain things. Here is a blurb
from the WMP docs:
http://msdn2.microsoft.com/en-US/library/bb249362.aspx
Windows Media Player states are not guaranteed to occur in any
particular order. Furthermore, not every state necessarily occurs
during a sequence of events. You should not write code that relies
upon state order.
Nevertheless, I've had good luck using the PlayStateChange event with
the "MediaEnded" state value of 8.
Have you looked at using WMP playlists instead to do this?
--Tim
On Aug 8, 4:56 am, Arjan <Ar...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Scenario:
I have created a webpage with embedded Windows Media Player 11 using asp.net
2.0 and javascript. The produced <object ...> HTML code is conform the
documentation of the WMP 11 SDK. The javascript should handle the
OpenStateChange and PlayStateChange events of the embedded media player.
When the mpg movie file has finished playing the next mpg file should be
downloaded and played. When a mpg file is being played some text is being
shown in a textbox on the webpage.
The problem:
When the code is ran under Vista with IE 7 and WMP 11.0.6000 the Media
Player events are caught and handled correctly. The mpg movie is downloaded,
played and when finished playing the next mpg file is being downloaded and
the process repeats itself.
However the same code does not work as expected under Windows XP (Pro) Sp2
with IE 6 and WMP 11.0.5721. The same mpg media file is being downloaded and
if I am lucky only the first frame is shown, then the javascript starts to
download the next mpg media file repeating the whole process. Oddly enough
when a wav file is downloaded using the same code under Win XP with IE 6 the
sound file is being played.
Note: Under Win XP (PRO) SP 2 IE 6, when the mpg files are in the local IE6
cache the javascript code does work correctly and the movies are shown as
expected.
How can I get the javascript code with WMP 11 to work correctly under Win XP
(Pro) SP2 with IE6 so that when the movie is downloaded it will be played as
expected?
Any help is much appreciated.
Arjan
.
- Follow-Ups:
- Re: Embedded Windows Media Player 11 odd behavior
- From: zachd [MSFT]
- Re: Embedded Windows Media Player 11 odd behavior
- From: CallMeTimm
- Re: Embedded Windows Media Player 11 odd behavior
- References:
- Re: Embedded Windows Media Player 11 odd behavior
- From: CallMeTimm
- Re: Embedded Windows Media Player 11 odd behavior
- Prev by Date: Re: fast forward?
- Next by Date: Re: I don't want MediaPlayer to synchronize with my MemoryStick
- Previous by thread: Re: Embedded Windows Media Player 11 odd behavior
- Next by thread: Re: Embedded Windows Media Player 11 odd behavior
- Index(es):
Relevant Pages
|