Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add video #334

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Add video #334

wants to merge 16 commits into from

Conversation

mkaszewiak
Copy link

Here is another pull request @twsouthwick Thanks

Copy link
Contributor

Learn Build status updates of commit 798e91f:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ⚠️Warning Details
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/presentation/insert_a_new_slideto/cs/insert_a_new_slideto_cs.csproj ✅Succeeded
samples/samples.sln ✅Succeeded

docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md

  • Line 105, Column 185: [Warning: disallowed-html-tag - See documentation] HTML tag 'cNvPr' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 105, Column 348: [Warning: disallowed-html-tag - See documentation] HTML tag 'videoFile' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 105, Column 427: [Warning: disallowed-html-tag - See documentation] HTML tag 'hlinkClick' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.
  • Line 105, Column 641: [Warning: disallowed-html-tag - See documentation] HTML tag 'cNvPicPr' isn't allowed. Replace it with approved Markdown or escape the brackets if the content is a placeholder.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 86255f9:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/presentation/insert_a_new_slideto/cs/insert_a_new_slideto_cs.csproj ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit c421671:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/presentation/insert_a_new_slideto/cs/insert_a_new_slideto_cs.csproj ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit df45c27:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/presentation/insert_a_new_slideto/cs/insert_a_new_slideto_cs.csproj ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit ed67d1c:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 62a8d4c:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@twsouthwick twsouthwick requested a review from Copilot March 31, 2025 17:00
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds functionality to programmatically insert a video into a slide of a presentation and updates the corresponding documentation to guide users through the process.

  • Implements AddVideo method with Open XML SDK to manage video insertion, placeholder image, and related relationships.
  • Updates documentation to include code snippets and a comprehensive guide for using the new video functionality.

Reviewed Changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated 2 comments.

File Description
samples/presentation/add_video/cs/Program.cs Implements video insertion functionality using the Open XML SDK.
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md Updates documentation with detailed usage steps and code references.
Files not reviewed (4)
  • samples/presentation/add_video/cs/add_video_cs.csproj: Language not supported
  • samples/presentation/add_video/vb/Program.vb: Language not supported
  • samples/presentation/add_video/vb/add_video_vb.vbproj: Language not supported
  • samples/samples.sln: Language not supported

@twsouthwick
Copy link
Collaborator

Looks like copilot found some spelling issues, but other than that, LGTM

}
// <Snippet2>
//Get presentation part
PresentationPart presentationPart = presentationDocument.PresentationPart;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the samples not use var? Not a blocker, but we should be consistent

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will stick with data types but we may discuss it on the meeting as the current samples have it mixed var and data types. Thanks


## Getting a Presentation Object

In the Open XML SDK, the `PresentationDocument` class represents a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a shared snippet that could be used here that has links to the APIs. @mikeebowen do you know what I'm referring to?

@twsouthwick twsouthwick mentioned this pull request Mar 31, 2025
Copy link
Collaborator

@twsouthwick twsouthwick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's clean a few of these things up

Copy link
Contributor

Learn Build status updates of commit 7978539:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 83d351e:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit b869034:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@mkaszewiak mkaszewiak requested a review from twsouthwick April 1, 2025 11:15
Copy link
Contributor

Learn Build status updates of commit 8db9e3b:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 4283f96:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit b35f7d8:

✅ Validation status: passed

File Status Preview URL Details
docs/presentation/how-to-add-a-video-to-a-slide-in-a-presentation.md ✅Succeeded
samples/presentation/add_video/cs/add_video_cs.csproj ✅Succeeded
samples/presentation/add_video/cs/Program.cs ✅Succeeded
samples/presentation/add_video/vb/add_video_vb.vbproj ✅Succeeded
samples/presentation/add_video/vb/Program.vb ✅Succeeded
samples/samples.sln ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants