GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    AudioContent Class

    Namespace:
    GemBox.Presentation.Media
    Assembly:
    GemBox.Presentation.dll

    Represents an Audio that has an associated content that is either embedded in or linked to the presentation file.

    • C#
    • VB.NET
    public sealed class AudioContent : MediaContent
    Public NotInheritable Class AudioContent
        Inherits MediaContent
    Inheritance:
    System.Object
    MediaObject
    MediaContent
    AudioContent

    Properties

    ContentType

    Gets the type of the audio content.

    • C#
    • VB.NET
    public AudioContentType ContentType { get; }
    Public ReadOnly Property ContentType As AudioContentType
    Property Value
    AudioContentType

    The type of the audio content.

    MediaType

    Gets the Audio value.

    • C#
    • VB.NET
    public override MediaType MediaType { get; }
    Public Overrides ReadOnly Property MediaType As MediaType
    Property Value
    MediaType

    The Audio value.

    Overrides
    MediaObject.MediaType

    Name

    Gets or sets the original name or a given short name for the corresponding sound.

    Applicable only to embedded WAV sounds. Setting this property to any other sound type will raise System.InvalidOperationException.

    Default value is System.String.Empty.

    • C#
    • VB.NET
    public string Name { get; set; }
    Public Property Name As String
    Property Value
    System.String

    The original name or a given short name for the corresponding sound.

    Remarks

    This is used to distinguish this sound from others by providing a human readable name for the attached sound should the user need to identify the sound among others within the UI.

    Exceptions
    System.InvalidOperationException

    Name can be set only to embedded WAV audio.

    Methods

    SetContent(AudioContentType, Stream)

    Sets the audio content.

    • C#
    • VB.NET
    public Content SetContent(AudioContentType contentType, Stream stream)
    Public Function SetContent(contentType As AudioContentType, stream As Stream) As Content
    Parameters
    contentType
    AudioContentType

    Content type of the audio content.

    stream
    System.IO.Stream

    The audio content stream.

    Returns
    Content

    An instance of a Content class that represents the audio content that has been set.

    Exceptions
    System.ArgumentNullException

    stream is null.

    Inherited Properties

    Bookmarks

    Gets the collection of bookmarks on the media.

    (Inherited from MediaObject)

    Content

    Gets or sets the media content (audio or video data encoded in a particular format) that is either embedded in or linked to the presentation file.

    (Inherited from MediaContent)

    Fade

    Gets the starting and ending fade durations for the media.

    (Inherited from MediaObject)

    IsFile

    Gets the true value since this media has an associated content that is either embedded in or linked to the presentation file.

    (Inherited from MediaContent)

    Picture

    Gets the Picture associated with this media.

    (Inherited from MediaObject)

    Trim

    Gets the amount of time to be trimmed from the start and end of the media during playback.

    (Inherited from MediaObject)

    Inherited Methods

    SetContent(System.String)

    Sets the media content (audio or video data encoded in a particular format).

    (Inherited from MediaContent)

    SetContent(System.String, System.IO.Stream)

    Sets the media content (audio or video data encoded in a particular format).

    (Inherited from MediaContent)

    Examples

    Audio and Video Example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.