question

IanHoppus-0960 avatar image
0 Votes"
IanHoppus-0960 asked MikeBowen-1599 answered

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

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.

openspecs-office
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MikeBowen-1599 avatar image
0 Votes"
MikeBowen-1599 answered

Hi @IanHoppus-0960 ,

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


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.