SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

One way to present media with SharePoint

Mark Miller answered a question over at End User SharePoint on how to manage media files in SharePoint. The gist of the answer is "Don't use SharePoint to store them, just to present them and manage their metadata" - something I agree with as SharePoint isn't a complete replacement for a fileserver (yet).

This got me thinking and I decided to see if I could come up with a way to present the end user with media that:

  1. Didn't require any administrative intervention
  2. Didn't require any editing of pages
  3. Allowed the viewer easy access to the content

As with pretty much anything you do with SharePoint there's always more than one solution to a problem so this is not the way of doing it, just one way of doing it.

I'd also like to point out that this isn't a tutorial or a how-to, just a description of a proof of concept. If anyone needs a more in-depth explanation I'll do my best to write one.

Servers

As mentioned above I don't believe in using SharePoint for bigger files (where "bigger" is 100-200 Mb and upwards) so we need to store the actual content somewhere. I'd also like to give the user a proper streaming "experience" - not just opening media files from a file share and for this I installed Windows Media Services 2008. I'm using Windows Server 2008 and IIS 7 but it should be fine on Windows 2003 and IIS 6 as well.

This leaves management, the presentation and the metadata to SharePoint - something it does really well. I'm using WSS 3.0 but the only real difference to MOSS is that you can get smarter filters and search functionality with MOSS.

The setup

So, Windows Media Services (WMS) and the content go on the same server. I set up WMS so that the default distribution point can serve up any file from a directory. I also share this directory so that users can upload content to it, thus making it available via WMS.

In WSS I create two lists; one document library where I store annotations to the media (could also be slideshows, course material or any sort of additional documentation) and one list to manage, and display, the media.

The Media library list is the interesting one and is set up like this:

The media library list column definition

 

 

 

 

 

 

 

 

Besides Annotations, which is a lookup based on the Annotations document library, there's only one really interesting column here and that's the Media column. This is where it all comes together and the magic that turns the pumkin into a chariot is Christophe's code for "HTML calculated columns". It's a very clever idea and I recommend you all to read his posts on the subject if you already haven't.

What the column does, in short, is that it uses the following code snippet to create the HTML needed to embed the media:

=<DIV><OBJECT id='WMP7' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'><PARAM NAME='URL' VALUE='mms://media.spirex.se/" & [Filename] & "'><PARAM NAME='AutoStart' VALUE='False'></OBJECT></DIV>

The script from Christophe then makes sure that the above gets rendered properly instead of displayed as you see it above (which SharePoint would do by default).

I also created a view that displays the Media, Annotation and Tags columns, grouping on Media type and then on Title with the groups initially collapsed. This way the media player will only be visible when the users expands the file she wishes to access.

The end result

With the above setup all the user needs to do in order to serve up streaming media via the SharePoint list/site is:

  1. Upload the media to the media server library
  2. Create a new entry in the media library list in SharePoint, using the proper information (filename, tags, annotations, etc):
    Adding a new entry

This fulfills the requirements I set up and lets the various technologies (WMS and WSS respectively) do what they do best.

I have set up a small demonstration site for this but be aware that it runs on my virtual test rig in my closet so if performance goes AWOL, just come back later.

Thanks for reading and please share your thoughts in the comments.

 

-- Martin Edelius


Posted 12-03-2008 5:45 PM by MartinNr5

Comments

Christophe wrote re: One way to present media with SharePoint
on 12-03-2008 4:09 PM

Nice demo!

We have set up something similar. Instead of asking the user to update the SharePoint list , you can also run an application that accesses SharePoint through its Web services and pre-fills the list.

Christophe

Martin Edelius wrote re: One way to present media with SharePoint
on 12-04-2008 12:07 AM

Hi Cristophe.

That is an even more user friendly way of doing it.

Do you have a description of the setup?

Christophe wrote re: One way to present media with SharePoint
on 12-04-2008 1:11 AM

The method is UpdateListItems in the lists.asmx Web service.

As for the setup, I don't know much about it as it is done outside SharePoint. It will all depend on your specific environment and the programming language you use.

Martin Edelius wrote re: One way to present media with SharePoint
on 12-04-2008 3:12 AM

I see.

I thought it was something that perhaps a workflow did every now and then in order to pick up the files.

iis | Digg hot tags wrote iis | Digg hot tags
on 12-04-2008 3:29 AM

Pingback from  iis | Digg hot tags

George Leithead wrote re: One way to present media with SharePoint
on 12-04-2008 3:49 AM

Nice solution.  I think I'll put it into practice!

Martin Edelius wrote re: One way to present media with SharePoint
on 12-04-2008 7:07 AM

Hi George.

Great! Let me know how it works out. :)

Follow-up on the 7+1 demos « Path to SharePoint wrote Follow-up on the 7+1 demos &laquo; Path to SharePoint
on 12-04-2008 7:14 PM

Pingback from  Follow-up on the 7+1 demos &laquo; Path to SharePoint

Tom Resing wrote re: One way to present media with SharePoint
on 12-05-2008 10:07 AM

Hi Martin,

Very cool use of HTML Columns. I like how the media player is embedded. Is it just me or does that Jebus song have some weird audio distortion?

-Tom

Martin Edelius wrote re: One way to present media with SharePoint
on 12-05-2008 5:21 PM

Hi Tom.

Thanks for the feedback, much appreciated,. :)

The Jebus song could very well be distorted, I just grabbed an audio clip off the Internet that I understood was free to distribute so the actual quality is out of my control.

~ YESChandana ~ wrote Hot links - 1st Week of December 2008
on 12-07-2008 8:58 PM

Hot links - 1st Week of December 2008

Dawn wrote re: One way to present media with SharePoint
on 01-14-2009 5:26 PM

I really like your example for display media in sharepoint!

I'm trying to set this up on my own site and having a problem with the calculated column. When I paste the code into my column I get the following error:  "The formula contains a syntax error or is not supported."

Is there something I should be changing (besides the location of my media) that I am not picking up on?

Martin Edelius wrote re: One way to present media with SharePoint
on 01-15-2009 12:59 AM

Hi Dawn.

Can you post your code so that I can take a look at it?

Thanks.

Dawn wrote re: One way to present media with SharePoint
on 01-15-2009 10:50 AM

I made some adjustments and managed to get it to except my code. This is the code I used:

="<DIV><OBJECT id='WMP7' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'><PARAM NAME='URL' VALUE='mms://SERVER/VIDEO_DEMOS/&[Filename]&'><PARAM NAME='AutoStart' VALUE='False'></OBJECT></DIV>"

The problem I am having now is the video won't play.

I'm guess it isn't rendering the url value correctly, but I'm not sure what I'm missing now.

Martin Edelius wrote re: One way to present media with SharePoint
on 01-15-2009 11:27 AM

Hi Dawn.

You are missing quotation marks between the end of the first part of your path (mms://SERVER/VIDEO_DEMOS/) and the end of the VALUE tag ('>).

The  "& [Filename] &" part is not part of the HTML but is used by SharePoint when calculating the column.

Your code should look like this:

="<DIV><OBJECT id='WMP7' CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'><PARAM NAME='URL' VALUE='mms://SERVER/VIDEO_DEMOS/" & [Filename] & "'><PARAM NAME='AutoStart' VALUE='False'></OBJECT></DIV>"

Let me know if that solved your problem.

Dawn wrote re: One way to present media with SharePoint
on 01-15-2009 11:42 AM

That was it!  Thank you very much!!

Dawn wrote re: One way to present media with SharePoint
on 01-19-2009 1:28 PM

I have another question for you.  

On your demo site, how did you get the terminator video to expand when played?

Martin Edelius wrote re: One way to present media with SharePoint
on 01-20-2009 12:48 AM

Hi Dawn.

Actually, I didn't do anything in particular. The original format of that video is in HD so it's that big by default.

Admin's Blog wrote Hot links - 1st Week of December 2008
on 01-26-2009 4:29 AM

Customizing SharePoint with third party applications ( Link ) Getting Query String Parameters with JavaScript

Christophe wrote re: One way to present media with SharePoint
on 01-29-2009 3:28 AM

Martin, I just tried the demo and all the Web Parts throw out error messages.

Martin Edelius wrote re: One way to present media with SharePoint
on 01-29-2009 6:55 AM

Hi Christophe.

Thanks, I'll check this out when I get back home.

Joe wrote re: One way to present media with SharePoint
on 05-16-2009 1:25 PM

Hi, i've taken a look at your demo and think it's brilliant.  It's exactly what i'm looking for.  Unfortunately none of the images in your post display and so I don't really know what settings you have used.  Any chance of updating the image src or re-uploading the images please?  Thanks

MartinNr5 wrote re: One way to present media with SharePoint
on 05-18-2009 10:36 AM

Hi Joe.

Thanks for the feedback, much appreciated.

I've uploaded the images to Picasa instead, let me know if this works better for you.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.