Поделиться через


AudioFromFile Class

Audio from File.When the object is serialized out as xml, its qualified name is a:audioFile.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.AudioFromFile

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class AudioFromFile _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As AudioFromFile
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class AudioFromFile : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • ExtensionList <a:extLst>

[ISO/IEC 29500-1 1st Edition]

20.1.3.2 audioFile (Audio from File)

This element specifies the existence of an audio file. This element is specified within the non-visual properties of an object. The audio shall be attached to an object as this is how it is represented within the document. The actual playing of the audio however is done within the timing node list that is specified under the timing element.

[Example: Consider the following picture object that has an audio file attached to it.

<p:pic>
<p:nvPicPr>
<p:cNvPr id="7" name="Rectangle 6">
<a:hlinkClick r:id="" action="ppaction://media"/>
</p:cNvPr>
    <p:cNvPicPr>
<a:picLocks noRot="1"/>
</p:cNvPicPr>
    <p:nvPr>
<a:audioFile r:link="rId1"/>
</p:nvPr>
</p:nvPicPr>
…
</p:pic>

In the above example, we see that there is a single audioFile 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 audioFile element from within the timing node list. The Linked relationship id is used to retrieve the actual audio file for playback purposes. end example]

Parent Elements

nvPr (§19.3.1.33)

Child Elements

Subclause

extLst (Extension List)

§20.1.2.2.15

Attributes

Description

contentType (Content Type of Linked Audio File)

Specifies the content type for the external file that is referenced by this element. Content types define a media type, a subtype, and an optional set of parameters, as defined in Part 2. If a rendering application cannot process external content of the content type specified, then the specified content can be ignored. [Note: A list of suggested audio types is provided in §15.2.2. end note]

If this attribute is omitted, application should attempt to determine the content type by reading the contents of the relationship’s target.

A producer that wants interoperability should use the following standard format:

  • audio/mpeg ISO/IEC 11172-3

The possible values for this attribute are defined by the W3C XML Schema string datatype.

link (Linked Relationship ID)

Namespace: .../officeDocument/2006/relationships

Specifies the identification information for a linked object. This attribute is used to specify the location of an object that does not reside within this file.

The possible values for this attribute are defined by the ST_RelationshipId simple type (§22.8.2.1).

[Note: The W3C XML Schema definition of this element’s content model (CT_AudioFile) is located in §A.4.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

AudioFromFile Members

DocumentFormat.OpenXml.Drawing Namespace