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

    Show / Hide Table of Contents

    MediaContent Class

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

    Represents a base type for all media (audio or video) that have an associated content that is either embedded in or linked to the presentation file.

    • C#
    • VB.NET
    public abstract class MediaContent : MediaObject
    Public MustInherit Class MediaContent
        Inherits MediaObject
    Inheritance:
    System.Object
    MediaObject
    MediaContent
    Derived
    AudioContent
    VideoContent

    Properties

    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.

    • C#
    • VB.NET
    public Content Content { get; set; }
    Public Property Content As Content
    Property Value
    Content

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

    Exceptions
    System.ArgumentNullException

    Value is null.

    IsFile

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

    • C#
    • VB.NET
    public sealed override bool IsFile { get; }
    Public NotOverridable Overrides ReadOnly Property IsFile As Boolean
    Property Value
    System.Boolean

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

    Overrides
    MediaObject.IsFile

    Methods

    SetContent(String)

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

    • C#
    • VB.NET
    public Content SetContent(string link)
    Public Function SetContent(link As String) As Content
    Parameters
    link
    System.String

    The link to the media content.

    Returns
    Content

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

    Exceptions
    System.ArgumentException

    link is null or System.String.Empty.

    SetContent(String, Stream)

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

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

    Content type (MIME type) of the media content.

    stream
    System.IO.Stream

    The media content stream.

    Returns
    Content

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

    Exceptions
    System.ArgumentException

    contentType is null or System.String.Empty.

    System.ArgumentNullException

    stream is null.

    Inherited Properties

    Bookmarks

    Gets the collection of bookmarks on the media.

    (Inherited from MediaObject)

    Fade

    Gets the starting and ending fade durations for the media.

    (Inherited from MediaObject)

    MediaType

    Gets the type of the media.

    (Inherited from MediaObject)

    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)

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.