Showing posts with label SharePoint Videos. Show all posts
Showing posts with label SharePoint Videos. Show all posts

Tuesday, May 14, 2013

SharePoint 2013/2016 Search: Adding a Hover Panel to the Video Horizontal Display Template


Check out the whole SharePoint 2013 Solution Series
New Titles Added Weekly!

In my previous post on Enhancing Video Results, I demonstrated how to display Video results in a horizontal fashion using the out-of-the-box Video horizontal template. However, this display does not incorporate a hover panel and thus nothing pops up when mousing over the results. No problem. I figured out how to add a hover panel to the template in just a few easy steps.

First, navigate to the Search Center display templates via SharePoint Designer 2013, similiar to the process explained in this post. For simplicity I am going to modify the display template file in-place but the recommended approach would be to make a copy and use that.

Locate the Item_Video_CompactHorizontal.html file, right-click, and select Edit File in Advanced Mode:





Paste this code at the top as shown in the image below:

var id = ctx.ClientControl.get_nextUniqueId();
var itemId = id + Srch.U.Ids.item;
var hoverId = id + Srch.U.Ids.hover;
var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Video_HoverPanel.js";
$setResultItem(itemId, ctx.CurrentItem);
ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();


Notice I am using the out-of-the-box Item_Video_HoverPanel .

Next, scroll down to the main <div> and change the id to use _#= $htmlEncode(itemId) =#_



(Click on image to display larger)

 Add the following code to that very same <div> tag:

onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_"
onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_"
(Click on image for larger view)

Now add the following <div> after the first <div>:

<div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>





Save the changes to the template. Navigate to your Search Center and perform a search that returns Video results:





Hovering over the results shows the hover panel preview!!!








 

Monday, May 13, 2013

SharePoint 2013: Enhancing Video Search Results


Check out the whole SharePoint 2013 Solution Series
New Titles Added Weekly!

In SharePoint 2013 Search there are several out-of-the-box query rules to display ranked result blocks of various result types (.e.g Word, Excel, PowerPoint, etc.). These are triggered based on specific action terms that appear either in the beginning or end of a search query (or both). However, Videos is not one of them.

Therefore, it would be nice if someone performed a search query using "video" or "videos" that a promoted result block of video results would appear at the top of the results. Easier done than said!

Navigate to your Site Settings from within your Search Center site collection and click on Search Query Rules under Site Collection Administration:

 
Select Local SharePoint Results (System) as the Result Source:

 
 
Click on the New Query Rule link:


Add the Rule Name, select Query Contains Action Term, enter "video;videos" in the Action term is one of these phrases:

 
Click on Add Result Block.
 
 
Modify the Block Title. Change Search this Source to Local Video Results (System) and increase the amount of Items as desired (I used 6).  Expand the Settings section.
 
Select the "More" link since there is already a Video Results page and enter the value shown in the image below. Select Video Item as the Display Template:
 



Click OK and then click Save on the New Query Rule page.

Navigate to your Search Center main page and perform a search using "videos" in the query:





The video result block appears at the top and displays the video results. The results show hover panels when moused over.

There is another way to display these results using an out-of-the-box horizontal video display template. If you go back into your Search Query Rules, edit the Video query, and then edit the Result Block, you may change the Display Template setting to just the Video entry:




Now the results are displayed horizontally along the top:


 
 
This presents well but there is no hover! You can easily modify the template (or make a new copy as the recommended approach) to display the hover. I will have those steps in another post soon!
 
 
 



 

Wednesday, January 16, 2013

SharePoint 2013: Activating Video Support in Your Site Collection

A few weeks ago, I wrote a post on using videos in SharePoint 2013 . However, as a reader pointed out, I did not really explain how to make sure that your site collection was set up to support videos and media. So here it is.

To enable video support within SharePoint 2013, you need to activate the Video and Media feature at the site collection level. Here are the quick and easy steps to perform this activation.

Step 1: From the Settings (gear icon) menu on your site collection, select Site Settings.


 
Step 2: Click on Site Collection Features under the Site Collection Administration section.
 
Step 3: Scroll down and find the Video and Media feature. Click on Activate to activate the feature.
 
Step 4: Return to your site collection. When you go to add an app for Videos, use the Asset Library:
 

 
 
Learn how to embed YouTube videos into your library.
Learn how to link to videos outside of SharePoint.

 

Friday, December 21, 2012

SharePoint 2013: Videos in SharePoint without Videos in SharePoint

Introduction
Videos are now supported within SharePoint 2013 via a new content type (to add video support to your site collection see this post). This means that video files may be uploaded to SharePoint and playable within a SharePoint site. However, the actual files do not need to actually live in SharePoint itself. A Video library can be populated simply from links to video content.

After returning from the Microsoft SharePoint Conference 2012 in Las Vegas, we downloaded most of the videos of the sessions and content. This collection of videos (as well as any collection of videos) takes up gigs and gigs of disk space. So if we uploaded them all into SharePoint, our content database would bloat to an unmanagable size. So where did we save them?

Network Server
We saved the videos and content to a network server such that people can access them from there, however, we thought it would nice to access the videos through SharePoint 2013 since it now supports the streaming of videos.

IIS Web Site
On the SharePoint 2013 box in a staging environment, we cracked open IIS and created a new web site named "Videos":

We pointed the Videos physical path to the network UNC shared folder:

 
So now we can access videos from the browser using http://sharepointroot/Videos/....
 
That was the first step.
 
 
Video Library
The next step was to add a library to our SharePoint site to add the video links. This is done by creating a Video Library which is accomplished by "Adding an app" from the Settings menu:


Select the Asset Library App:

Provide a name and click Create:

 

This process created the Video Library. Our actual library is just called Videos.


Adding Videos to the Videos Library via Links
When you intially navigate to the Videos Library and click on "new item", there is an assumption that you are uploading a file. In our case, we did not want to upload video files but simply add links to those video files.

We accomplished this by using the New Document menu from the Files top ribbon and selecting Video:



Selecting Video provides several options. We selected "Provide a link to a video" and then entered the http:// path of the video using our new Video web site in IIS:


Clicking OK brings you to a properties screen where you may set a thumbnail as well as other Video properties.

We continued this process for all of the videos available on our network share and loaded up the Video Library:

 
User Experience
We now can provide video content to people through SharePoint and have them watch the video stream right within the SharePoint site:
 
 

The experience is that the video is in SharePoint even though it technically does not live within SharePoint!!!

You may also do something similiar with external videos (such as YouTube) using the embed option. An example of this is shown here.


An example of search results from embedded videos:


You may Enhance your Video Search Results very easily. The details are here.


Matched Content