You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PresentationML document consists of a number of parts, among which is the Picture (`<pic/>`) element.
51
+
52
+
The following text from the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification introduces the overall form of a `PresentationML` package.
53
+
54
+
Video File (`<videoFile/>`) specifies the presence of a video file. It is defined within the non-visual properties of an object. The video shall be attached to an object as this is how it is represented within the document. The actual playing of the video however is done within the timing node list that is specified under the timing element.
55
+
56
+
Consider the following `Picture` object that has a video attached to it.
57
+
58
+
```xml
59
+
<p:pic>
60
+
<p:nvPicPr>
61
+
<p:cNvPrid="7"name="Rectangle 6">
62
+
<a:hlinkClickr:id=""action="ppaction://media"/>
63
+
</p:cNvPr>
64
+
<p:cNvPicPr>
65
+
<a:picLocksnoRot="1"/>
66
+
</p:cNvPicPr>
67
+
<p:nvPr>
68
+
<a:videoFiler:link="rId1"/>
69
+
</p:nvPr>
70
+
</p:nvPicPr>
71
+
</p:pic>
72
+
```
73
+
74
+
In the above example, we see that there is a single videoFile element attached to this picture. This picture is placed within the document just as a normal picture or shape would be. The id of this picture, namely 7 in this case, is used to refer to this videoFile element from within the timing node list. The Linked relationship id is used to retrieve the actual video file for playback purposes.
The code first creates a media data part for the video file to be added. With the video file stream open, it feeds the media data part object. Next, video and media relationship references are added to the slide using the provided embedId for future reference to the video file and mediaEmbedId for media reference.
104
+
105
+
An image part is then added with a sample picture to be used as a placeholder for the video. A picture object is created with various elements, such as Non-Visual Drawing Properties (`<cNvPr/>`), which specify non-visual canvas properties. This allows for additional information that does not affect the appearance of the picture to be stored. The `<videoFile/>` element, explained above, is also included. The HyperLinkOnClick (`<hlinkClick/>`) element specifies the on-click hyperlink information to be applied to a run of text or image. When the hyperlink text or image is clicked, the link is fetched. Non-Visual Picture Drawing Properties (`<cNvPicPr/>`) specify the non-visual properties for the picture canvas. For a detailed explanation of the elements used, please refer to [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)]
Next Media(CT_Media) element is created with use of previously referenced mediaEmbedId(Embedded Picture Reference). The Blip element is also added; this element specifies the existence of an image (binary large image or picture) and contains a reference to the image data. Blip's Embed attribute is used to specify a placeholder image in the Image Part created previously.
All other elements such Offset(`<off/>`), Stretch(`<stretch/>`), FillRectangle(`<fillRect/>`), are appended to the ShapeProperties(`<spPr/>`) and ShapeProperties are appended to the Picture element(`<pic/>`). Finally the picture element that incudes video is added to the ShapeTree(`<sp/>`) of the slide.
124
+
125
+
Following is the complete sample code that you can use to add video to the slide.
Copy file name to clipboardExpand all lines: docs/presentation/overview.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,17 @@ This section provides how-to topics for working with presentation documents usin
22
22
23
23
-[Structure of a PresentationML document](structure-of-a-presentationml-document.md)
24
24
25
-
-[Add a comment to a slide in a presentation](how-to-add-a-comment-to-a-slide-in-a-presentation.md)
25
+
-[Add a comment to a slide in a presentation](how-to-add-a-comment-to-a-slide-in-a-presentation.md)
26
+
27
+
-[Add a video to a slide in a presentation](how-to-add-a-video-to-a-slide-in-a-presentation.md)
26
28
27
29
-[Apply a theme to a presentation](how-to-apply-a-theme-to-a-presentation.md)
28
30
29
31
-[Change the fill color of a shape in a presentation](how-to-change-the-fill-color-of-a-shape-in-a-presentation.md)
30
32
31
33
-[Create a presentation document by providing a file name](how-to-create-a-presentation-document-by-providing-a-file-name.md)
32
34
33
-
-[Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md)
35
+
-[Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md)
34
36
35
37
-[Delete a slide from a presentation](how-to-delete-a-slide-from-a-presentation.md)
Copy file name to clipboardExpand all lines: docs/presentation/working-with-comments.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,4 +193,4 @@ article.
193
193
[About the Open XML SDK for Office](../about-the-open-xml-sdk.md)
194
194
[How to: Create a Presentation by Providing a File Name](how-to-create-a-presentation-document-by-providing-a-file-name.md)
195
195
[How to: Add a comment to a slide in a presentation](how-to-add-a-comment-to-a-slide-in-a-presentation.md)
196
-
[How to: Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentatio.md)
196
+
[How to: Delete all the comments by an author from all the slides in a presentation](how-to-delete-all-the-comments-by-an-author-from-all-the-slides-in-a-presentation.md)
0 commit comments