Results 1 to 5 of 5

Thread: Playing windows media from memory stream.

  1. #1
    Join Date
    Oct 2004
    Posts
    65

    Playing windows media from memory stream.

    This is Windows XP MCE 2005. I found few articles on this as well as other sites which says we can play media using an URL in Media Center that pointed to a file on my hard drive. I have many such media files and would like playing windows media from memory stream. But those provided examples wont work for me. Can anyone please tell me in very simple steps how to do the same? Many Thanks.

  2. #2
    Join Date
    Sep 2005
    Posts
    123

    Re: Playing windows media from memory stream.

    Well it totally depends on kind of SDK you using and what kind of application you are developing. You haven’t provided any information regarding the same so it will be difficult for us to provide any information.

  3. #3
    Join Date
    Oct 2004
    Posts
    65

    Re: Playing windows media from memory stream.

    Thanks for the reply vshori. I’m actually trying to develop an e-learning solution and I want to have windows media files on the hard or the cd-rom encrypted. At runtime I want to decrypt the tutorial in memory an play it from there. Any help now ? Thank you.

  4. #4
    Join Date
    Aug 2010
    Posts
    1

    Re: Playing windows media from memory stream.

    I need to save byte array to the windows media player, too.
    For c#, could you give any links for samples?

  5. #5
    Join Date
    Dec 2007
    Posts
    1,736

    Re: Playing windows media from memory stream.

    Hi selmaguzel,

    I have heard that Windows Media Player control cannot work with byte arrays directly. However, you can use something like File.WriteAllBytes(path, data) or alternatively if you don't want to write the file you could convert the byte array to a stream and then play that

    Code:
    var bytes = File.ReadAllBytes(@"C:\WINDOWS\Media\ding.wav"); // as sample 
     
    using (Stream s = new MemoryStream(bytes)) 
    { 
        // http://msdn.microsoft.com/en-us/library/ms143770%28v=VS.100%29.aspx 
        System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer(s); 
        myPlayer.Play(); 
    }

Similar Threads

  1. Replies: 5
    Last Post: 07-03-2012, 02:46 AM
  2. Is it easy to add a live stream on windows media center
    By dhanush123 in forum MediaCenter
    Replies: 4
    Last Post: 08-02-2012, 12:54 AM
  3. windows 7: not able to stream media file with WMP
    By zenath in forum Operating Systems
    Replies: 3
    Last Post: 18-01-2011, 12:06 PM
  4. How to share or stream media on windows 7
    By DeMario in forum Networking & Security
    Replies: 5
    Last Post: 03-02-2010, 09:47 AM
  5. How to stream videos in VLC through Windows Media Center
    By sasha_vienna@hotmail in forum MediaCenter
    Replies: 2
    Last Post: 13-01-2009, 12:37 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,264,359.58148 seconds with 17 queries