Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Question about Videoplay in Silverlight RSS

5 replies

Last post Aug 23, 2011 06:41 AM by Haixia Xie - MSFT

(0)
  • DellaRocco

    DellaRocco

    Member

    19 Points

    84 Posts

    Question about Videoplay in Silverlight

    Aug 17, 2011 06:37 PM | LINK

    Hi!

    At the moment I have a database, in which exists videos in a binaryfield. When I would like to watch it, I open the video through a Downloadhandler (.ashx) and through the Downloadhandler, the client get the Downloaddialog and he can watch the video with his standard videoplayer.

    Now, I don't want use the downloadhandler anymore and I would like to play the video in a silverlight videoplayer! My question is now, can I play a video in a silverlight videoplayer, if the video exists in a database?

    If yes, can I play the standard videos in the player or do I must encode the videos with a special programme before?

    Thank you in advance!

    Regards

    DellaRocco

  • Haixia Xie - MSFT

    Haixia Xie -...

    Contributor

    4220 Points

    1034 Posts

    Microsoft

    Re: Question about Videoplay in Silverlight

    Aug 19, 2011 07:45 AM | LINK

    Hi DellaRocco,

    What do you mean by saying this( if the video exists in a database)? Is the video link or the video file or the video name exists in a database?

    1.If the video file is in ClientBin but the file name store in database, read or replace the route dynamically, this thread will help you:

    http://forums.silverlight.net/t/92145.aspx

    2.If the the video file is in Silverlight application, you can use wcf service, then set myMedia.Source = new Uri("MediaElement.wmv", UriKind.Relative);

    About how to returns a resource file from a location in the specified zip package, this article may help you.

    In addtion, below link demostrate how to implement Silverlight video player.

    http://slvideoplayer.codeplex.com/wikipage?title=installation%20instructions&referringTitle=Home

    Hope it can help you.

    Best Regards,

    Haixia Xie
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework
  • DellaRocco

    DellaRocco

    Member

    19 Points

    84 Posts

    Re: Question about Videoplay in Silverlight

    Aug 19, 2011 11:25 AM | LINK

    Hi and thank you for your answer!

    With "if the video exists in a database" I mean, that not only the videofilename is stored in the database, but also the whole video is saved in the database! Is that possible?

    Best Regards

    DellaRocco

  • oak_silver

    oak_silver

    Participant

    1524 Points

    253 Posts

    Re: Question about Videoplay in Silverlight

    Aug 22, 2011 01:14 AM | LINK

    Of course, it is possible. This thread may help you.

    Please mark it as answer if it helps.
  • DellaRocco

    DellaRocco

    Member

    19 Points

    84 Posts

    Re: Question about Videoplay in Silverlight

    Aug 22, 2011 10:20 AM | LINK

    oak_silver

    Of course, it is possible. This thread may help you.

    Thank you for your answer!

    But I don't want to realize that, with the "Save As"-Dialog (which works so far!). When a video in the database exist (byte[]), then I would like to display it with an Silverlight videoplayer for example. So that the client doesn't need to install a videoplayer on his machine!

    Best Regards

    DellaRocco

  • Haixia Xie - MSFT

    Haixia Xie -...

    Contributor

    4220 Points

    1034 Posts

    Microsoft

    Re: Question about Videoplay in Silverlight

    Aug 23, 2011 06:41 AM | LINK

    Hi DellaRocco,

    The key of this issue is retriving binary data from database, this two articles may help you.

    http://coder000.com/store-retrieve-binary-data-blobs-audio-video-image-exe-etc-in-database-in-vb-net/

    http://www.codeproject.com/KB/database/SqlFileStream.aspx

    If you need code in other languages, you can use this tool to do the convertion.

    Best Regards,

    Haixia Xie
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com
    Microsoft One Code Framework