Domanda

I know this question has been asked before but that didn't help. My client has a requirement to search all videos across site collections and show them in the home page. I'm doing this using a content search Web part which searches for all videos across site collections. Now the issue with this is, even though videos uploaded to asset library are shown, playing them takes you to a video player page instead of directly showing the video. Upon further investigation (customizing the display template, using fiddler to check the managed properties content search Web part returns) I found that SharePoint automatically uploads the video to an auto-generated folder and the url I'm getting is only up till the folder.

Is there any way i can get the full url to the video uploaded?

Is there any other way to show the video without uploading it to Asset library but some other document library?

Note : uploading to document library doesn't show the video preview image.

Please help me on this.

Thanks.

Update: I noticed that the videos with all their properties (URL, full name) are getting stored with another content type known as Video Rendition. But when I try to access this content type in content search, it doesn't return any values even though obviously the video has been saved to that type. Also, I listed all the content types of the site collection with their usage in powershell but still, there is no item using video rendition returned. This is all very strange. On the one hand, where I can clearly see the videos being stored with the video rendition content type, accessing them on the other doesn't return any value. This is brain wracking stuff!

È stato utile?

Soluzione

Solved this by using ReST API. Querying the folder using "http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files" URL did the trick and helped me get the properties of the actual video stored under the folder.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top