Windows Mobile Media Player Click Event RRS feed

  • Question

  • I have an application that plays video in *fullscreen*.

    Once the video finishes, I handle the playstatechanged event to remove the windows media player control from the form and add some other control (to provide the effect of a screen coming up after the video)

    The problem is that while the video is playing, if i tap the screen, the video freezes (the sound is still playing) and once the video stream completes playback (with the screen is stuck on one frame), the form appears after a brief flash of the taskbar. 

    I believe it has something to do with the default behaviour of Media player returning to the normal size from fullscreen when I tap the screen.

    My queries:

    1. How can I stop the player from freezing the video? I've tried handling the Click, ClickEvent, MouseDown events, inherited and overriden OnMouseDown etc, in order to override the default behavior of Windows Media Player, encapsulated the WMPLib control inside a Panel and disable the panel but no luck.

    2. Any way to remove the brief flash of the taskbar when the tap occurs, or smoothen it out?

    3. I thought of using DirectShow to create a custom player but the problem is that the source video will be in WMV format and DirectShow might not be able to play it without custom filters...I'm trying to save some work here :D


    Request for any help/info!

    Monday, May 10, 2010 11:20 AM

All replies

  • I found the only plausible workaround of doing this was to have a substantially larger WMP control wherein the control bar goes to the non window area.

    This is what i did to improve performance and reduce flickers:

    - Use Control.SetParent to set the parent of the WMP Control

    - Give the player a background color

    - I had a custom file video to play everytime, so i made sure the video fades in from the background color

    - Used ScreenOrientation = ScreenOrientation.Angle90 to rotate the screen just before playing the video

    - Handled playstatechanged event and if the play state is stop, set orientation back to whatever it was before playback started


    Did not enjoy doing it this way but had to. Maybe next release might see a better approach.

    Hope it helps someone.

    Wednesday, June 9, 2010 9:36 AM