MediaPlaybackItem Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MediaPlaybackItem(MediaSource) |
Initializes a new instance of the MediaPlaybackItem class. |
MediaPlaybackItem(MediaSource, TimeSpan) |
Initializes a new instance of the MediaPlaybackItem class with a StartTime value indicating the position within the item where playback should begin. |
MediaPlaybackItem(MediaSource, TimeSpan, TimeSpan) |
Initializes a new instance of the MediaPlaybackItem class with a StartTime value indicating the position within the item where playback should begin and a DurationLimit value specifying the maximum playback duration of the item. |
MediaPlaybackItem(MediaSource)
Initializes a new instance of the MediaPlaybackItem class.
public:
MediaPlaybackItem(MediaSource ^ source);
MediaPlaybackItem(MediaSource const& source);
public MediaPlaybackItem(MediaSource source);
function MediaPlaybackItem(source)
Public Sub New (source As MediaSource)
Parameters
- source
- MediaSource
The media source from which the MediaPlaybackItem is created.
Remarks
A MediaSource can only be used by a single MediaPlaybackItem. If you attempt to create a second MediaPlaybackItem from the same MediaSource, the constructor will fail with an MF_E_UNEXPECTED error. In C# this error is projected as a System.Exception.
Applies to
MediaPlaybackItem(MediaSource, TimeSpan)
Initializes a new instance of the MediaPlaybackItem class with a StartTime value indicating the position within the item where playback should begin.
public:
MediaPlaybackItem(MediaSource ^ source, TimeSpan startTime);
MediaPlaybackItem(MediaSource const& source, TimeSpan const& startTime);
public MediaPlaybackItem(MediaSource source, System.TimeSpan startTime);
function MediaPlaybackItem(source, startTime)
Public Sub New (source As MediaSource, startTime As TimeSpan)
Parameters
- source
- MediaSource
The media source from which the MediaPlaybackItem is created.
The position within the MediaPlaybackItem where playback should begin.
Windows requirements
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
See also
Applies to
MediaPlaybackItem(MediaSource, TimeSpan, TimeSpan)
Initializes a new instance of the MediaPlaybackItem class with a StartTime value indicating the position within the item where playback should begin and a DurationLimit value specifying the maximum playback duration of the item.
public:
MediaPlaybackItem(MediaSource ^ source, TimeSpan startTime, TimeSpan durationLimit);
MediaPlaybackItem(MediaSource const& source, TimeSpan const& startTime, TimeSpan const& durationLimit);
public MediaPlaybackItem(MediaSource source, System.TimeSpan startTime, System.TimeSpan durationLimit);
function MediaPlaybackItem(source, startTime, durationLimit)
Public Sub New (source As MediaSource, startTime As TimeSpan, durationLimit As TimeSpan)
Parameters
- source
- MediaSource
The media source from which the MediaPlaybackItem is created.
The position within the MediaPlaybackItem where playback should begin.
The maximum playback duration of the MediaPlaybackItem.
Windows requirements
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|