Open XML SDK: AddMediaReferenceRelationship and AddVideoReferenceRelationship in Open XML Version 2.13.0 and Open XML Version 2.12.3

Ian Hoppus 1 Reputation point
2021-06-22T06:16:01.08+00:00

The code is run, both in version 2.13.0 and 2.12.3

Sample Code:

MediaDataPart mediaDataPart1 = document.CreateMediaDataPart("video/mp4", ".mp4");
System.IO.Stream mediaDataPart1Stream = System.IO.File.Open(@"D:\samplevideo.mp4", System.IO.FileMode.Open);
mediaDataPart1.FeedData(mediaDataPart1Stream);
mediaDataPart1Stream.Close();

slidePart1.AddMediaReferenceRelationship(mediaDataPart1, "rId2");
slidePart1.AddVideoReferenceRelationship(mediaDataPart1, "rId1");

Sample Result:

In slide1.xml.rels in version 2.12.3

<Relationship Type="http://schemas.microsoft.com/office/2007/relationships/media" Target="/media/mediadata.mp4" Id="rId2" />
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" Target="/media/mediadata.mp4" Id="rId1" />

video inside power point presentation is playable

In slide1.xml.rels in version 2.13.0

<Relationship Type="http://schemas.microsoft.com/office/2007/relationships/media" Target="/media/mediadata.mp4" Id="Rc3519f9b3fa04f59" />
<Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" Target="/media/mediadata.mp4" Id="R365391439af74425" />

video inside Power point presentation isn't playable anymore

what happen to relationship id reference in version 2.13.0(e.g. Id="Rc3519f9b3fa04f59" and not Id="rId1") ?

Is this a bug or another feature? Thank you.

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
119 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Bowen 1,276 Reputation points Microsoft Employee
    2021-06-22T16:59:55.637+00:00

    Hi @Ian Hoppus ,

    The Open XML SDK is a GitHub project, so this issue will be handled on GitHub Issues here: https://github.com/OfficeDev/Open-XML-SDK/issues/949

    Mike Bowen
    Microsoft Open Specifications

    0 comments No comments