Posts Tagged ‘YouTube’

Improvements with embedding video in SharePoint 2013

October 18, 2012 Leave a comment

In reading through the list of content authoring improvements made within SharePoint 2013, I found here the following text which sounded very encouraging from a video asset upload and metadata management perspective:

"A new video content type is added, and the video upload process is improved for content authors. Thumbnail preview images are created automatically when a video is uploaded to an asset library, and content authors can choose a frame from the video and use that as the thumbnail preview image".

So I went ahead and tried to do some testing with adding video to a publishing page on an installation of SharePoint 2013 Preview to see what the new experience is like. Here’s how you do it.


When you choose the upload "From Computer" option, here’s what you get to do:


The "Images" library – an "Asset Library" by definition seems to be the default destination library. I uploaded to "Videos" – an asset library I added to my site to keep videos separated from other publishing images. After upload, you get to edit metadata relating to your video.


In addition to keywords, author and comments, the preview image, copyright and label can be set.


I set everything except the preview image. On publishing, the page looks like this – rendered using the Silverlight web part and a random key frame chosen for the preview image.


Now all of this was for when you have your own video asset that you want to store on local infrastructure or on SharePoint and reference on your page in SharePoint. There is also an easy way to embed video from the popular video services such as YouTube and Vimeo.

Among the options presented above on where you want to select the video you insert from, you see "Embed" which allows you to paste an HTML code snippet in, to reference the video like you would do when you are trying to embed video from YouTube, for instance. Since inserting iframes in HTML field controls in SharePoint 2013 is possible, it should be a breeze to achieve something like the below… What? I love Coldplay.


NOTE: In order for an iframe to be able to display content from another site, the domain for the site will need to be cleared through HTML Field Security in site settings. This is also something that was newly introduced with SharePoint 2013 and is mentioned among the content authoring improvements that I referred to above.

I did play around with this feature too and posted some findings here. The reason I was able to quickly embed video from YouTube is because the domains for YouTube and Vimeo are already placed in the list of secure domains for display in HTML fields. So you can just borrow the video embedding code snippets from those sites and just paste them into the source of an HTML field in SharePoint 2013 and it would work.

Thumbnail / Preview Images

As mentioned in the list of improvements on the TechNet site, there is a way to pick a thumbnail image by playing back the video and using a "Capture Thumbnail" button (which is referred to as the "Camera button" in the options – likely to change by release?).


The other ways to set a thumbnail image is to use a picture saved to disk or one that can be obtained from a web address.

When the thumbnail image corresponding a video uploaded to an asset library is changed, the behavior observed on a publishing page where the video is embedded is slightly off – the video no longer has a preview image – it is blacked out as shown below. Not sure if this is a "preview" bug that will be fixed by release. Refreshing the page didn’t help restore the preview image. The playback wasn’t affected, though. Checked after playback if the preview image would be restored. That didn’t work either.


Checking out and editing the page seem to have the desired effect of refreshing the thumbnail image corresponding to the video.


This may be painful if there are a large number of pages with embedded video whose thumbnail previews are being changed. The behavior seems to suggest that they would all be blacked out and will need to be republished.

The article mentions that automatic thumbnail generation is possible but will require Windows Desktop Experience to be enabled. I did this using the method I published here. That didn’t change the overall behavior much. The thumbnail generation and the refresh on update behavior was pretty much the same. Although it didn’t black out this time (which may be due to the difference in media format – WMV before vs. MP4 this time), it did not apply the updated thumbnail image (even after republishing the page).

I wonder if this is behavior that I am experiencing exclusively but I doubt it given the number of times I have tried it and am constantly able to reproduce it. Given I am doing all this on SharePoint 2013 Preview, I do hope it is fixed by release.

%d bloggers like this: