none
Windows Media Player Loop Refresh

    Question

  • Hi,

    I have a windows media player file that I play in a loop using the axwindowsmediaplayer tool. The video plays and loops just fine, however there is a single black frame as the video loops back to the beginning. Any workarounds for this? This is the code I am using below

    wmpVideo.uiMode = "none";
    wmpVideo.stretchToFit = true;
    wmpVideo.settings.setMode("loop", true);
    wmpVideo.URL = (AppDomain.CurrentDomain.BaseDirectory + @"\Facial Animations\" + "sad.mp4");
    wmpVideo.Ctlcontrols.play();

    Wednesday, April 26, 2017 6:54 PM

Answers

  • I resolved this refresh problem by creating a WPF tool to sit in the tool box then applying the tool to the form's program. Works like a dream! I'm running the same video over and over again and you wouldn't even know it was 5 seconds long. To create the WPF tool I created a new item of a user control type then used this library: https://msdn.microsoft.com/en-us/library/system.windows.media(v=vs.110).aspx

    While this library may look like the windows media player library, This is not the case and can be used to have a lower level control over your video application.

    Saturday, May 20, 2017 2:13 AM

All replies

  • Hi T3rr0rByte13-Hobbyware.org,

    For your question, what is the single blank frame mean?

    The settings in your code are right, would you check the URL?

    You could use playlist for your URL.

    I hope this would be helpful.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 28, 2017 8:14 AM
    Moderator
  • I need the video to appear as though it is continuous, so that you can't tell that it is only 5 seconds long and then loops to the beginning again. The effect of the loop back to the beginning of the video, creates a black flash on the screen as it reloads to the beginning. I would like it to look like it could be 5, 10, 15 minute video.
    Friday, April 28, 2017 7:24 PM
  • Are there any other ways of displaying video in a forms application that may resolve my problem?
    Sunday, May 14, 2017 3:12 AM
  • I resolved this refresh problem by creating a WPF tool to sit in the tool box then applying the tool to the form's program. Works like a dream! I'm running the same video over and over again and you wouldn't even know it was 5 seconds long. To create the WPF tool I created a new item of a user control type then used this library: https://msdn.microsoft.com/en-us/library/system.windows.media(v=vs.110).aspx

    While this library may look like the windows media player library, This is not the case and can be used to have a lower level control over your video application.

    Saturday, May 20, 2017 2:13 AM