The main idea here to store embedded video properties and not the embedded code itself.
For storing embedded video properties we will use Custom List, see implementation section for description. Page for Video Links list (default view with embedded player) is shown below
In order to embed a video into SharePoint:
- On YouTube site click the Share button located under the video.
- Click the Embed button.
- Copy at least src attribute value provided in the expanded box (see table 1 for supported attributes).
- Create new Video Link item and paste attribute values for embedded code into Video Links item. Save it.
Table 1. Mapping between embedded code iframe attributes and Video Link item
|Attribute name||Video Links field name|
Video Links implementation
As was mentioned earlier only properties for embedded video code are stored and not the embedded code itself. For storing embedded video code properties is used Custom List that extends OOB Links List (TemplateType = 103)
For embedded video properties we create Video Link Content Type that inherits from Link CT (0×0105)
where we define the following fields