A while ago I wrote a web part that allowed the playing of "WMV" files inside of SharePoint. Since then I have been playing with it again and have changed it slightly. It is not ready for anyone to use yet as it is in a very "rough and ready" development state. I have made a few changes to the web part; the first one is that I have been experimenting with a custom component from ASPNetMedia. These components are fantastic they have done some of the work for you in regards to wrapping the joyous active x code into components you can use in your C# / VB.net code. Wanted I wanted to achieve this time was to make it so any kind of video file could be played through the web part and the video player would know which control to load based on its file extension. So if I now add the web part to the page it can be configured as shown below: (dodgy development version)
The first thing you are asked to do is select the players that you wish to add and use in the web part.
Next you need to add some basic control parameters such as size and whether to show it or not.
The URL of the file can be added by typing it in. I have a web share on my server that has some files:
Notice my wonderful naming convention!!
I simply add the URL that I wish to stream at this point and it should then add it to the properties. This link will load the flash video player.
All the completed parameters look as shown below:
So what does it look like, depending on the URL specified will dictate the control that is loaded. My URL's are:
Flash Video: http://localhost/Videos/video.flv
Real Player: http://localhost/Videos/video.mpeg
QuickTime: http://localhost/Videos/video.mov
Windows Media Player: http://localhost/Videos/video.wmv
When they render they should load as shown below:
Flash Video
Real Player
QuickTime
Windows Media Player
It needs polishing quite a bit but it works in principle. I have a few things to sort out yet:
- Web Part Connectivity
- Playlist Creation
- Ajax Refresh
Will plod along and see what I can do. J |