# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.0.1

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.devices.enumeration
import winrt.windows.foundation
import winrt.windows.foundation.collections
import winrt.windows.foundation.numerics
import winrt.windows.graphics.directx.direct3d11
import winrt.windows.media
import winrt.windows.media.audio
import winrt.windows.media.casting
import winrt.windows.media.core
import winrt.windows.media.mediaproperties
import winrt.windows.media.protection
import winrt.windows.storage
import winrt.windows.storage.streams
import winrt.windows.ui.composition

from winrt.windows.media.playback import AutoLoadedDisplayPropertyKind, FailedMediaStreamKind, MediaBreakInsertionMethod, MediaCommandEnablingRule, MediaPlaybackItemChangedReason, MediaPlaybackItemErrorCode, MediaPlaybackSessionVideoConstrictionReason, MediaPlaybackState, MediaPlayerAudioCategory, MediaPlayerAudioDeviceType, MediaPlayerError, MediaPlayerState, SphericalVideoProjectionMode, StereoscopicVideoRenderMode, TimedMetadataTrackPresentationMode

Self = typing.TypeVar('Self')

@typing.final
class BackgroundMediaPlayer_Static(type):
    def is_media_playing(cls) -> bool: ...
    def send_message_to_background(cls, value: typing.Optional[winrt.windows.foundation.collections.ValueSet], /) -> None: ...
    def send_message_to_foreground(cls, value: typing.Optional[winrt.windows.foundation.collections.ValueSet], /) -> None: ...
    def shutdown(cls) -> None: ...
    def add_message_received_from_background(cls, value: winrt.windows.foundation.EventHandler[MediaPlayerDataReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_message_received_from_background(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_message_received_from_foreground(cls, value: winrt.windows.foundation.EventHandler[MediaPlayerDataReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_message_received_from_foreground(cls, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def current(cls) -> typing.Optional[MediaPlayer]: ...

@typing.final
class BackgroundMediaPlayer(winrt.system.Object, metaclass=BackgroundMediaPlayer_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BackgroundMediaPlayer: ...

@typing.final
class CurrentMediaPlaybackItemChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CurrentMediaPlaybackItemChangedEventArgs: ...
    @_property
    def new_item(self) -> typing.Optional[MediaPlaybackItem]: ...
    @_property
    def old_item(self) -> typing.Optional[MediaPlaybackItem]: ...
    @_property
    def reason(self) -> MediaPlaybackItemChangedReason: ...

@typing.final
class MediaBreak(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreak: ...
    @typing.overload
    def __new__(cls: typing.Type[MediaBreak], insertion_method: MediaBreakInsertionMethod) -> MediaBreak:...
    @typing.overload
    def __new__(cls: typing.Type[MediaBreak], insertion_method: MediaBreakInsertionMethod, presentation_position: datetime.timedelta) -> MediaBreak:...
    @_property
    def can_start(self) -> bool: ...
    @can_start.setter
    def can_start(self, value: bool) -> None: ...
    @_property
    def custom_properties(self) -> typing.Optional[winrt.windows.foundation.collections.ValueSet]: ...
    @_property
    def insertion_method(self) -> MediaBreakInsertionMethod: ...
    @_property
    def playback_list(self) -> typing.Optional[MediaPlaybackList]: ...
    @_property
    def presentation_position(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...

@typing.final
class MediaBreakEndedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakEndedEventArgs: ...
    @_property
    def media_break(self) -> typing.Optional[MediaBreak]: ...

@typing.final
class MediaBreakManager(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakManager: ...
    def play_break(self, value: typing.Optional[MediaBreak], /) -> None: ...
    def skip_current_break(self) -> None: ...
    def add_break_ended(self, handler: winrt.windows.foundation.TypedEventHandler[MediaBreakManager, MediaBreakEndedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_break_ended(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_break_skipped(self, handler: winrt.windows.foundation.TypedEventHandler[MediaBreakManager, MediaBreakSkippedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_break_skipped(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_break_started(self, handler: winrt.windows.foundation.TypedEventHandler[MediaBreakManager, MediaBreakStartedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_break_started(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_breaks_seeked_over(self, handler: winrt.windows.foundation.TypedEventHandler[MediaBreakManager, MediaBreakSeekedOverEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_breaks_seeked_over(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def current_break(self) -> typing.Optional[MediaBreak]: ...
    @_property
    def playback_session(self) -> typing.Optional[MediaPlaybackSession]: ...

@typing.final
class MediaBreakSchedule(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakSchedule: ...
    def insert_midroll_break(self, media_break: typing.Optional[MediaBreak], /) -> None: ...
    def remove_midroll_break(self, media_break: typing.Optional[MediaBreak], /) -> None: ...
    def add_schedule_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaBreakSchedule, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_schedule_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def preroll_break(self) -> typing.Optional[MediaBreak]: ...
    @preroll_break.setter
    def preroll_break(self, value: typing.Optional[MediaBreak]) -> None: ...
    @_property
    def postroll_break(self) -> typing.Optional[MediaBreak]: ...
    @postroll_break.setter
    def postroll_break(self, value: typing.Optional[MediaBreak]) -> None: ...
    @_property
    def midroll_breaks(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[MediaBreak]]: ...
    @_property
    def playback_item(self) -> typing.Optional[MediaPlaybackItem]: ...

@typing.final
class MediaBreakSeekedOverEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakSeekedOverEventArgs: ...
    @_property
    def new_position(self) -> datetime.timedelta: ...
    @_property
    def old_position(self) -> datetime.timedelta: ...
    @_property
    def seeked_over_breaks(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[MediaBreak]]: ...

@typing.final
class MediaBreakSkippedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakSkippedEventArgs: ...
    @_property
    def media_break(self) -> typing.Optional[MediaBreak]: ...

@typing.final
class MediaBreakStartedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaBreakStartedEventArgs: ...
    @_property
    def media_break(self) -> typing.Optional[MediaBreak]: ...

@typing.final
class MediaItemDisplayProperties(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaItemDisplayProperties: ...
    def clear_all(self) -> None: ...
    @_property
    def type(self) -> winrt.windows.media.MediaPlaybackType: ...
    @type.setter
    def type(self, value: winrt.windows.media.MediaPlaybackType) -> None: ...
    @_property
    def thumbnail(self) -> typing.Optional[winrt.windows.storage.streams.RandomAccessStreamReference]: ...
    @thumbnail.setter
    def thumbnail(self, value: typing.Optional[winrt.windows.storage.streams.RandomAccessStreamReference]) -> None: ...
    @_property
    def music_properties(self) -> typing.Optional[winrt.windows.media.MusicDisplayProperties]: ...
    @_property
    def video_properties(self) -> typing.Optional[winrt.windows.media.VideoDisplayProperties]: ...

@typing.final
class MediaPlaybackAudioTrackList(winrt.system.Object, winrt._winrt.Sequence[winrt.windows.media.core.AudioTrack]):
    def __len__(self) -> int: ...
    def __iter__(self) -> winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.AudioTrack]: ...
    @typing.overload
    def __getitem__(self, index: typing.SupportsIndex) -> winrt.windows.media.core.AudioTrack: ...
    @typing.overload
    def __getitem__(self, index: slice) -> winrt.system.Array[winrt.windows.media.core.AudioTrack]: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackAudioTrackList: ...
    def first(self) -> typing.Optional[winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.AudioTrack]]: ...
    def get_at(self, index: winrt.system.UInt32, /) -> typing.Optional[winrt.windows.media.core.AudioTrack]: ...
    def get_many(self, start_index: winrt.system.UInt32, items: winrt.system.Array[winrt.windows.media.core.AudioTrack], /) -> winrt.system.UInt32: ...
    def index_of(self, value: typing.Optional[winrt.windows.media.core.AudioTrack], /) -> typing.Tuple[bool, winrt.system.UInt32]: ...
    def add_selected_index_changed(self, handler: winrt.windows.foundation.TypedEventHandler[winrt.windows.media.core.ISingleSelectMediaTrackList, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_selected_index_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def size(self) -> winrt.system.UInt32: ...
    @_property
    def selected_index(self) -> winrt.system.Int32: ...
    @selected_index.setter
    def selected_index(self, value: winrt.system.Int32) -> None: ...

@typing.final
class MediaPlaybackCommandManager(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManager: ...
    def add_auto_repeat_mode_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_auto_repeat_mode_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_fast_forward_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerFastForwardReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_fast_forward_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_next_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerNextReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_next_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_pause_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerPauseReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_pause_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_play_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerPlayReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_play_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_position_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerPositionReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_position_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_previous_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerPreviousReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_previous_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_rate_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerRateReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_rate_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_rewind_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerRewindReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_rewind_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_shuffle_received(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManager, MediaPlaybackCommandManagerShuffleReceivedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_shuffle_received(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def auto_repeat_mode_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def fast_forward_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def media_player(self) -> typing.Optional[MediaPlayer]: ...
    @_property
    def next_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def pause_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def play_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def position_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def previous_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def rate_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def rewind_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...
    @_property
    def shuffle_behavior(self) -> typing.Optional[MediaPlaybackCommandManagerCommandBehavior]: ...

@typing.final
class MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...
    @_property
    def auto_repeat_mode(self) -> winrt.windows.media.MediaPlaybackAutoRepeatMode: ...

@typing.final
class MediaPlaybackCommandManagerCommandBehavior(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerCommandBehavior: ...
    def add_is_enabled_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackCommandManagerCommandBehavior, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_is_enabled_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def enabling_rule(self) -> MediaCommandEnablingRule: ...
    @enabling_rule.setter
    def enabling_rule(self, value: MediaCommandEnablingRule) -> None: ...
    @_property
    def command_manager(self) -> typing.Optional[MediaPlaybackCommandManager]: ...
    @_property
    def is_enabled(self) -> bool: ...

@typing.final
class MediaPlaybackCommandManagerFastForwardReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerFastForwardReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerNextReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerNextReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerPauseReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerPauseReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerPlayReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerPlayReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerPositionReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerPositionReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...
    @_property
    def position(self) -> datetime.timedelta: ...

@typing.final
class MediaPlaybackCommandManagerPreviousReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerPreviousReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerRateReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerRateReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...
    @_property
    def playback_rate(self) -> winrt.system.Double: ...

@typing.final
class MediaPlaybackCommandManagerRewindReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerRewindReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...

@typing.final
class MediaPlaybackCommandManagerShuffleReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackCommandManagerShuffleReceivedEventArgs: ...
    def get_deferral(self) -> typing.Optional[winrt.windows.foundation.Deferral]: ...
    @_property
    def handled(self) -> bool: ...
    @handled.setter
    def handled(self, value: bool) -> None: ...
    @_property
    def is_shuffle_requested(self) -> bool: ...

@typing.final
class MediaPlaybackItem_Static(type):
    def find_from_media_source(cls, source: typing.Optional[winrt.windows.media.core.MediaSource], /) -> typing.Optional[MediaPlaybackItem]: ...

@typing.final
class MediaPlaybackItem(winrt.system.Object, metaclass=MediaPlaybackItem_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackItem: ...
    @typing.overload
    def __new__(cls: typing.Type[MediaPlaybackItem], source: typing.Optional[winrt.windows.media.core.MediaSource], start_time: datetime.timedelta) -> MediaPlaybackItem:...
    @typing.overload
    def __new__(cls: typing.Type[MediaPlaybackItem], source: typing.Optional[winrt.windows.media.core.MediaSource], start_time: datetime.timedelta, duration_limit: datetime.timedelta) -> MediaPlaybackItem:...
    @typing.overload
    def __new__(cls: typing.Type[MediaPlaybackItem], source: typing.Optional[winrt.windows.media.core.MediaSource]) -> MediaPlaybackItem:...
    def apply_display_properties(self, value: typing.Optional[MediaItemDisplayProperties], /) -> None: ...
    def get_display_properties(self) -> typing.Optional[MediaItemDisplayProperties]: ...
    def add_audio_tracks_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackItem, winrt.windows.foundation.collections.IVectorChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_audio_tracks_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_timed_metadata_tracks_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackItem, winrt.windows.foundation.collections.IVectorChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_timed_metadata_tracks_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_video_tracks_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackItem, winrt.windows.foundation.collections.IVectorChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_video_tracks_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def audio_tracks(self) -> typing.Optional[MediaPlaybackAudioTrackList]: ...
    @_property
    def source(self) -> typing.Optional[winrt.windows.media.core.MediaSource]: ...
    @_property
    def timed_metadata_tracks(self) -> typing.Optional[MediaPlaybackTimedMetadataTrackList]: ...
    @_property
    def video_tracks(self) -> typing.Optional[MediaPlaybackVideoTrackList]: ...
    @_property
    def can_skip(self) -> bool: ...
    @can_skip.setter
    def can_skip(self, value: bool) -> None: ...
    @_property
    def break_schedule(self) -> typing.Optional[MediaBreakSchedule]: ...
    @_property
    def duration_limit(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @_property
    def start_time(self) -> datetime.timedelta: ...
    @_property
    def is_disabled_in_playback_list(self) -> bool: ...
    @is_disabled_in_playback_list.setter
    def is_disabled_in_playback_list(self, value: bool) -> None: ...
    @_property
    def auto_loaded_display_properties(self) -> AutoLoadedDisplayPropertyKind: ...
    @auto_loaded_display_properties.setter
    def auto_loaded_display_properties(self, value: AutoLoadedDisplayPropertyKind) -> None: ...
    @_property
    def total_download_progress(self) -> winrt.system.Double: ...

@typing.final
class MediaPlaybackItemError(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackItemError: ...
    @_property
    def error_code(self) -> MediaPlaybackItemErrorCode: ...
    @_property
    def extended_error(self) -> winrt.windows.foundation.HResult: ...

@typing.final
class MediaPlaybackItemFailedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackItemFailedEventArgs: ...
    @_property
    def error(self) -> typing.Optional[MediaPlaybackItemError]: ...
    @_property
    def item(self) -> typing.Optional[MediaPlaybackItem]: ...

@typing.final
class MediaPlaybackItemOpenedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackItemOpenedEventArgs: ...
    @_property
    def item(self) -> typing.Optional[MediaPlaybackItem]: ...

@typing.final
class MediaPlaybackList(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackList: ...
    def __new__(cls: typing.Type[MediaPlaybackList]) -> MediaPlaybackList:...
    def move_next(self) -> typing.Optional[MediaPlaybackItem]: ...
    def move_previous(self) -> typing.Optional[MediaPlaybackItem]: ...
    def move_to(self, item_index: winrt.system.UInt32, /) -> typing.Optional[MediaPlaybackItem]: ...
    def set_shuffled_items(self, value: typing.Iterable[MediaPlaybackItem], /) -> None: ...
    def add_current_item_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackList, CurrentMediaPlaybackItemChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_current_item_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_item_failed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackList, MediaPlaybackItemFailedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_item_failed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_item_opened(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackList, MediaPlaybackItemOpenedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_item_opened(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def shuffle_enabled(self) -> bool: ...
    @shuffle_enabled.setter
    def shuffle_enabled(self, value: bool) -> None: ...
    @_property
    def auto_repeat_enabled(self) -> bool: ...
    @auto_repeat_enabled.setter
    def auto_repeat_enabled(self, value: bool) -> None: ...
    @_property
    def current_item(self) -> typing.Optional[MediaPlaybackItem]: ...
    @_property
    def current_item_index(self) -> winrt.system.UInt32: ...
    @_property
    def items(self) -> typing.Optional[winrt.windows.foundation.collections.IObservableVector[MediaPlaybackItem]]: ...
    @_property
    def starting_item(self) -> typing.Optional[MediaPlaybackItem]: ...
    @starting_item.setter
    def starting_item(self, value: typing.Optional[MediaPlaybackItem]) -> None: ...
    @_property
    def max_prefetch_time(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @max_prefetch_time.setter
    def max_prefetch_time(self, value: typing.Optional[typing.Optional[datetime.timedelta]]) -> None: ...
    @_property
    def shuffled_items(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[MediaPlaybackItem]]: ...
    @_property
    def max_played_items_to_keep_open(self) -> typing.Optional[typing.Optional[winrt.system.UInt32]]: ...
    @max_played_items_to_keep_open.setter
    def max_played_items_to_keep_open(self, value: typing.Optional[typing.Optional[winrt.system.UInt32]]) -> None: ...

@typing.final
class MediaPlaybackSession(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackSession: ...
    def get_buffered_ranges(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.media.MediaTimeRange]]: ...
    def get_output_degradation_policy_state(self) -> typing.Optional[MediaPlaybackSessionOutputDegradationPolicyState]: ...
    def get_played_ranges(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.media.MediaTimeRange]]: ...
    def get_seekable_ranges(self) -> typing.Optional[winrt.windows.foundation.collections.IVectorView[winrt.windows.media.MediaTimeRange]]: ...
    def is_supported_playback_rate_range(self, rate1: winrt.system.Double, rate2: winrt.system.Double, /) -> bool: ...
    def add_buffering_ended(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffering_ended(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_buffering_progress_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffering_progress_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_buffering_started(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffering_started(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_download_progress_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_download_progress_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_natural_duration_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_natural_duration_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_natural_video_size_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_natural_video_size_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_playback_rate_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_playback_rate_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_playback_state_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_playback_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_position_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_position_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_seek_completed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_seek_completed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_buffered_ranges_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffered_ranges_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_played_ranges_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_played_ranges_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_seekable_ranges_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_seekable_ranges_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_supported_playback_rates_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlaybackSession, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_supported_playback_rates_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def stereoscopic_video_packing_mode(self) -> winrt.windows.media.mediaproperties.StereoscopicVideoPackingMode: ...
    @stereoscopic_video_packing_mode.setter
    def stereoscopic_video_packing_mode(self, value: winrt.windows.media.mediaproperties.StereoscopicVideoPackingMode) -> None: ...
    @_property
    def position(self) -> datetime.timedelta: ...
    @position.setter
    def position(self, value: datetime.timedelta) -> None: ...
    @_property
    def playback_rate(self) -> winrt.system.Double: ...
    @playback_rate.setter
    def playback_rate(self, value: winrt.system.Double) -> None: ...
    @_property
    def normalized_source_rect(self) -> winrt.windows.foundation.Rect: ...
    @normalized_source_rect.setter
    def normalized_source_rect(self, value: winrt.windows.foundation.Rect) -> None: ...
    @_property
    def buffering_progress(self) -> winrt.system.Double: ...
    @_property
    def can_pause(self) -> bool: ...
    @_property
    def can_seek(self) -> bool: ...
    @_property
    def download_progress(self) -> winrt.system.Double: ...
    @_property
    def is_protected(self) -> bool: ...
    @_property
    def media_player(self) -> typing.Optional[MediaPlayer]: ...
    @_property
    def natural_duration(self) -> datetime.timedelta: ...
    @_property
    def natural_video_height(self) -> winrt.system.UInt32: ...
    @_property
    def natural_video_width(self) -> winrt.system.UInt32: ...
    @_property
    def playback_state(self) -> MediaPlaybackState: ...
    @_property
    def is_mirroring(self) -> bool: ...
    @is_mirroring.setter
    def is_mirroring(self, value: bool) -> None: ...
    @_property
    def spherical_video_projection(self) -> typing.Optional[MediaPlaybackSphericalVideoProjection]: ...
    @_property
    def playback_rotation(self) -> winrt.windows.media.mediaproperties.MediaRotation: ...
    @playback_rotation.setter
    def playback_rotation(self, value: winrt.windows.media.mediaproperties.MediaRotation) -> None: ...

@typing.final
class MediaPlaybackSessionBufferingStartedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackSessionBufferingStartedEventArgs: ...
    @_property
    def is_playback_interruption(self) -> bool: ...

@typing.final
class MediaPlaybackSessionOutputDegradationPolicyState(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackSessionOutputDegradationPolicyState: ...
    @_property
    def video_constriction_reason(self) -> MediaPlaybackSessionVideoConstrictionReason: ...

@typing.final
class MediaPlaybackSphericalVideoProjection(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackSphericalVideoProjection: ...
    @_property
    def view_orientation(self) -> winrt.windows.foundation.numerics.Quaternion: ...
    @view_orientation.setter
    def view_orientation(self, value: winrt.windows.foundation.numerics.Quaternion) -> None: ...
    @_property
    def projection_mode(self) -> SphericalVideoProjectionMode: ...
    @projection_mode.setter
    def projection_mode(self, value: SphericalVideoProjectionMode) -> None: ...
    @_property
    def is_enabled(self) -> bool: ...
    @is_enabled.setter
    def is_enabled(self, value: bool) -> None: ...
    @_property
    def horizontal_field_of_view_in_degrees(self) -> winrt.system.Double: ...
    @horizontal_field_of_view_in_degrees.setter
    def horizontal_field_of_view_in_degrees(self, value: winrt.system.Double) -> None: ...
    @_property
    def frame_format(self) -> winrt.windows.media.mediaproperties.SphericalVideoFrameFormat: ...
    @frame_format.setter
    def frame_format(self, value: winrt.windows.media.mediaproperties.SphericalVideoFrameFormat) -> None: ...

@typing.final
class MediaPlaybackTimedMetadataTrackList(winrt.system.Object, winrt._winrt.Sequence[winrt.windows.media.core.TimedMetadataTrack]):
    def __len__(self) -> int: ...
    def __iter__(self) -> winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.TimedMetadataTrack]: ...
    @typing.overload
    def __getitem__(self, index: typing.SupportsIndex) -> winrt.windows.media.core.TimedMetadataTrack: ...
    @typing.overload
    def __getitem__(self, index: slice) -> winrt.system.Array[winrt.windows.media.core.TimedMetadataTrack]: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackTimedMetadataTrackList: ...
    def first(self) -> typing.Optional[winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.TimedMetadataTrack]]: ...
    def get_at(self, index: winrt.system.UInt32, /) -> typing.Optional[winrt.windows.media.core.TimedMetadataTrack]: ...
    def get_many(self, start_index: winrt.system.UInt32, items: winrt.system.Array[winrt.windows.media.core.TimedMetadataTrack], /) -> winrt.system.UInt32: ...
    def get_presentation_mode(self, index: winrt.system.UInt32, /) -> TimedMetadataTrackPresentationMode: ...
    def index_of(self, value: typing.Optional[winrt.windows.media.core.TimedMetadataTrack], /) -> typing.Tuple[bool, winrt.system.UInt32]: ...
    def set_presentation_mode(self, index: winrt.system.UInt32, value: TimedMetadataTrackPresentationMode, /) -> None: ...
    def add_presentation_mode_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlaybackTimedMetadataTrackList, TimedMetadataPresentationModeChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_presentation_mode_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def size(self) -> winrt.system.UInt32: ...

@typing.final
class MediaPlaybackVideoTrackList(winrt.system.Object, winrt._winrt.Sequence[winrt.windows.media.core.VideoTrack]):
    def __len__(self) -> int: ...
    def __iter__(self) -> winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.VideoTrack]: ...
    @typing.overload
    def __getitem__(self, index: typing.SupportsIndex) -> winrt.windows.media.core.VideoTrack: ...
    @typing.overload
    def __getitem__(self, index: slice) -> winrt.system.Array[winrt.windows.media.core.VideoTrack]: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlaybackVideoTrackList: ...
    def first(self) -> typing.Optional[winrt.windows.foundation.collections.IIterator[winrt.windows.media.core.VideoTrack]]: ...
    def get_at(self, index: winrt.system.UInt32, /) -> typing.Optional[winrt.windows.media.core.VideoTrack]: ...
    def get_many(self, start_index: winrt.system.UInt32, items: winrt.system.Array[winrt.windows.media.core.VideoTrack], /) -> winrt.system.UInt32: ...
    def index_of(self, value: typing.Optional[winrt.windows.media.core.VideoTrack], /) -> typing.Tuple[bool, winrt.system.UInt32]: ...
    def add_selected_index_changed(self, handler: winrt.windows.foundation.TypedEventHandler[winrt.windows.media.core.ISingleSelectMediaTrackList, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_selected_index_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def size(self) -> winrt.system.UInt32: ...
    @_property
    def selected_index(self) -> winrt.system.Int32: ...
    @selected_index.setter
    def selected_index(self, value: winrt.system.Int32) -> None: ...

@typing.final
class MediaPlayer(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlayer: ...
    def __new__(cls: typing.Type[MediaPlayer]) -> MediaPlayer:...
    def add_audio_effect(self, activatable_class_id: str, effect_optional: bool, configuration: typing.Optional[winrt.windows.foundation.collections.IPropertySet], /) -> None: ...
    def add_video_effect(self, activatable_class_id: str, effect_optional: bool, effect_configuration: typing.Optional[winrt.windows.foundation.collections.IPropertySet], /) -> None: ...
    def close(self) -> None: ...
    def copy_frame_to_stereoscopic_video_surfaces(self, destination_left_eye: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], destination_right_eye: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], /) -> None: ...
    @typing.overload
    def copy_frame_to_video_surface(self, destination: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], /) -> None: ...
    @typing.overload
    def copy_frame_to_video_surface(self, destination: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], target_rectangle: winrt.windows.foundation.Rect, /) -> None: ...
    def get_as_casting_source(self) -> typing.Optional[winrt.windows.media.casting.CastingSource]: ...
    def get_surface(self, compositor: typing.Optional[winrt.windows.ui.composition.Compositor], /) -> typing.Optional[MediaPlayerSurface]: ...
    def pause(self) -> None: ...
    def play(self) -> None: ...
    def remove_all_effects(self) -> None: ...
    @typing.overload
    def render_subtitles_to_surface(self, destination: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], /) -> bool: ...
    @typing.overload
    def render_subtitles_to_surface(self, destination: typing.Optional[winrt.windows.graphics.directx.direct3d11.IDirect3DSurface], target_rectangle: winrt.windows.foundation.Rect, /) -> bool: ...
    def set_file_source(self, file: typing.Optional[winrt.windows.storage.IStorageFile], /) -> None: ...
    def set_media_source(self, source: typing.Optional[winrt.windows.media.core.IMediaSource], /) -> None: ...
    def set_stream_source(self, stream: typing.Optional[winrt.windows.storage.streams.IRandomAccessStream], /) -> None: ...
    def set_surface_size(self, size: winrt.windows.foundation.Size, /) -> None: ...
    def set_uri_source(self, value: typing.Optional[winrt.windows.foundation.Uri], /) -> None: ...
    def step_backward_one_frame(self) -> None: ...
    def step_forward_one_frame(self) -> None: ...
    def add_buffering_ended(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffering_ended(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_buffering_started(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_buffering_started(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_current_state_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_current_state_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_media_ended(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_media_ended(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_media_failed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, MediaPlayerFailedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_media_failed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_media_opened(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_media_opened(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_media_player_rate_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, MediaPlayerRateChangedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_media_player_rate_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_playback_media_marker_reached(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, PlaybackMediaMarkerReachedEventArgs], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_playback_media_marker_reached(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_seek_completed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_seek_completed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_volume_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_volume_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_is_muted_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_is_muted_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_source_changed(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_source_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_video_frame_available(self, value: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_video_frame_available(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    def add_subtitle_frame_changed(self, handler: winrt.windows.foundation.TypedEventHandler[MediaPlayer, winrt.system.Object], /) -> winrt.windows.foundation.EventRegistrationToken: ...
    def remove_subtitle_frame_changed(self, token: winrt.windows.foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def volume(self) -> winrt.system.Double: ...
    @volume.setter
    def volume(self, value: winrt.system.Double) -> None: ...
    @_property
    def position(self) -> datetime.timedelta: ...
    @position.setter
    def position(self, value: datetime.timedelta) -> None: ...
    @_property
    def playback_rate(self) -> winrt.system.Double: ...
    @playback_rate.setter
    def playback_rate(self, value: winrt.system.Double) -> None: ...
    @_property
    def is_looping_enabled(self) -> bool: ...
    @is_looping_enabled.setter
    def is_looping_enabled(self, value: bool) -> None: ...
    @_property
    def is_muted(self) -> bool: ...
    @is_muted.setter
    def is_muted(self, value: bool) -> None: ...
    @_property
    def auto_play(self) -> bool: ...
    @auto_play.setter
    def auto_play(self, value: bool) -> None: ...
    @_property
    def current_state(self) -> MediaPlayerState: ...
    @_property
    def natural_duration(self) -> datetime.timedelta: ...
    @_property
    def playback_media_markers(self) -> typing.Optional[PlaybackMediaMarkerSequence]: ...
    @_property
    def is_protected(self) -> bool: ...
    @_property
    def buffering_progress(self) -> winrt.system.Double: ...
    @_property
    def can_pause(self) -> bool: ...
    @_property
    def can_seek(self) -> bool: ...
    @_property
    def audio_device_type(self) -> MediaPlayerAudioDeviceType: ...
    @audio_device_type.setter
    def audio_device_type(self, value: MediaPlayerAudioDeviceType) -> None: ...
    @_property
    def audio_category(self) -> MediaPlayerAudioCategory: ...
    @audio_category.setter
    def audio_category(self, value: MediaPlayerAudioCategory) -> None: ...
    @_property
    def system_media_transport_controls(self) -> typing.Optional[winrt.windows.media.SystemMediaTransportControls]: ...
    @_property
    def timeline_controller_position_offset(self) -> datetime.timedelta: ...
    @timeline_controller_position_offset.setter
    def timeline_controller_position_offset(self, value: datetime.timedelta) -> None: ...
    @_property
    def timeline_controller(self) -> typing.Optional[winrt.windows.media.MediaTimelineController]: ...
    @timeline_controller.setter
    def timeline_controller(self, value: typing.Optional[winrt.windows.media.MediaTimelineController]) -> None: ...
    @_property
    def stereoscopic_video_render_mode(self) -> StereoscopicVideoRenderMode: ...
    @stereoscopic_video_render_mode.setter
    def stereoscopic_video_render_mode(self, value: StereoscopicVideoRenderMode) -> None: ...
    @_property
    def real_time_playback(self) -> bool: ...
    @real_time_playback.setter
    def real_time_playback(self, value: bool) -> None: ...
    @_property
    def audio_device(self) -> typing.Optional[winrt.windows.devices.enumeration.DeviceInformation]: ...
    @audio_device.setter
    def audio_device(self, value: typing.Optional[winrt.windows.devices.enumeration.DeviceInformation]) -> None: ...
    @_property
    def audio_balance(self) -> winrt.system.Double: ...
    @audio_balance.setter
    def audio_balance(self, value: winrt.system.Double) -> None: ...
    @_property
    def command_manager(self) -> typing.Optional[MediaPlaybackCommandManager]: ...
    @_property
    def break_manager(self) -> typing.Optional[MediaBreakManager]: ...
    @_property
    def playback_session(self) -> typing.Optional[MediaPlaybackSession]: ...
    @_property
    def is_video_frame_server_enabled(self) -> bool: ...
    @is_video_frame_server_enabled.setter
    def is_video_frame_server_enabled(self, value: bool) -> None: ...
    @_property
    def audio_state_monitor(self) -> typing.Optional[winrt.windows.media.audio.AudioStateMonitor]: ...
    @_property
    def protection_manager(self) -> typing.Optional[winrt.windows.media.protection.MediaProtectionManager]: ...
    @protection_manager.setter
    def protection_manager(self, value: typing.Optional[winrt.windows.media.protection.MediaProtectionManager]) -> None: ...
    @_property
    def source(self) -> typing.Optional[IMediaPlaybackSource]: ...
    @source.setter
    def source(self, value: typing.Optional[IMediaPlaybackSource]) -> None: ...

@typing.final
class MediaPlayerDataReceivedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlayerDataReceivedEventArgs: ...
    @_property
    def data(self) -> typing.Optional[winrt.windows.foundation.collections.ValueSet]: ...

@typing.final
class MediaPlayerFailedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlayerFailedEventArgs: ...
    @_property
    def error(self) -> MediaPlayerError: ...
    @_property
    def error_message(self) -> str: ...
    @_property
    def extended_error_code(self) -> winrt.windows.foundation.HResult: ...

@typing.final
class MediaPlayerRateChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlayerRateChangedEventArgs: ...
    @_property
    def new_rate(self) -> winrt.system.Double: ...

@typing.final
class MediaPlayerSurface(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> MediaPlayerSurface: ...
    def close(self) -> None: ...
    @_property
    def composition_surface(self) -> typing.Optional[winrt.windows.ui.composition.ICompositionSurface]: ...
    @_property
    def compositor(self) -> typing.Optional[winrt.windows.ui.composition.Compositor]: ...
    @_property
    def media_player(self) -> typing.Optional[MediaPlayer]: ...

@typing.final
class PlaybackMediaMarker(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> PlaybackMediaMarker: ...
    @typing.overload
    def __new__(cls: typing.Type[PlaybackMediaMarker], value: datetime.timedelta) -> PlaybackMediaMarker:...
    @typing.overload
    def __new__(cls: typing.Type[PlaybackMediaMarker], value: datetime.timedelta, media_market_type: str, text: str) -> PlaybackMediaMarker:...
    @_property
    def media_marker_type(self) -> str: ...
    @_property
    def text(self) -> str: ...
    @_property
    def time(self) -> datetime.timedelta: ...

@typing.final
class PlaybackMediaMarkerReachedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> PlaybackMediaMarkerReachedEventArgs: ...
    @_property
    def playback_media_marker(self) -> typing.Optional[PlaybackMediaMarker]: ...

@typing.final
class PlaybackMediaMarkerSequence(winrt.system.Object):
    def __iter__(self) -> winrt.windows.foundation.collections.IIterator[PlaybackMediaMarker]: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> PlaybackMediaMarkerSequence: ...
    def clear(self) -> None: ...
    def first(self) -> typing.Optional[winrt.windows.foundation.collections.IIterator[PlaybackMediaMarker]]: ...
    def insert(self, value: typing.Optional[PlaybackMediaMarker], /) -> None: ...
    @_property
    def size(self) -> winrt.system.UInt32: ...

@typing.final
class TimedMetadataPresentationModeChangedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> TimedMetadataPresentationModeChangedEventArgs: ...
    @_property
    def new_presentation_mode(self) -> TimedMetadataTrackPresentationMode: ...
    @_property
    def old_presentation_mode(self) -> TimedMetadataTrackPresentationMode: ...
    @_property
    def track(self) -> typing.Optional[winrt.windows.media.core.TimedMetadataTrack]: ...

@typing.final
class IMediaEnginePlaybackSource(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IMediaEnginePlaybackSource: ...
    def set_playback_source(self, source: typing.Optional[IMediaPlaybackSource], /) -> None: ...
    @_property
    def current_item(self) -> typing.Optional[MediaPlaybackItem]: ...

@typing.final
class IMediaPlaybackSource(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> IMediaPlaybackSource: ...

