// ignore_for_file: implementation_imports, constant_identifier_names import 'dart:async'; // This is a stub class that provides the same method signatures as the original // implementation, ensuring web builds compile without requiring changes elsewhere. class SMTCWindows { SMTCWindows({ SMTCConfig? config, PlaybackTimeline? timeline, MusicMetadata? metadata, PlaybackStatus? status, bool? shuffleEnabled, RepeatMode? repeatMode, bool? enabled, }); static Future initialize() async {} late final Stream buttonPressStream; Future updateConfig(SMTCConfig config) async {} Future updateTimeline(PlaybackTimeline timeline) async {} Future updateMetadata(MusicMetadata metadata) async {} Future clearMetadata() async {} Future dispose() async {} Future disableSmtc() async {} Future enableSmtc() async {} Future setPlaybackStatus(PlaybackStatus status) async {} Future setIsPlayEnabled(bool enabled) async {} Future setIsPauseEnabled(bool enabled) async {} Future setIsStopEnabled(bool enabled) async {} Future setIsNextEnabled(bool enabled) async {} Future setIsPrevEnabled(bool enabled) async {} Future setIsFastForwardEnabled(bool enabled) async {} Future setIsRewindEnabled(bool enabled) async {} Future setTimeline(PlaybackTimeline timeline) async {} Future setTitle(String title) async {} Future setArtist(String artist) async {} Future setAlbum(String album) async {} Future setAlbumArtist(String albumArtist) async {} Future setThumbnail(String thumbnail) async {} Future setPosition(Duration position) async {} Future setStartTime(Duration startTime) async {} Future setEndTime(Duration endTime) async {} Future setMaxSeekTime(Duration maxSeekTime) async {} Future setMinSeekTime(Duration minSeekTime) async {} Future setShuffleEnabled(bool enabled) async {} Future setRepeatMode(RepeatMode repeatMode) async {} } class MusicMetadata { final String? title; final String? artist; final String? album; final String? albumArtist; final String? thumbnail; const MusicMetadata({ this.title, this.artist, this.album, this.albumArtist, this.thumbnail, }); } enum PlaybackStatus { closed, changing, stopped, playing, paused, ; } enum PressedButton { play, pause, next, previous, fastForward, rewind, stop, record, channelUp, channelDown; static PressedButton fromString(String button) { switch (button) { case 'play': return PressedButton.play; case 'pause': return PressedButton.pause; case 'next': return PressedButton.next; case 'previous': return PressedButton.previous; case 'fast_forward': return PressedButton.fastForward; case 'rewind': return PressedButton.rewind; case 'stop': return PressedButton.stop; case 'record': return PressedButton.record; case 'channel_up': return PressedButton.channelUp; case 'channel_down': return PressedButton.channelDown; default: throw Exception('Unknown button: $button'); } } } class PlaybackTimeline { final int startTimeMs; final int endTimeMs; final int positionMs; final int? minSeekTimeMs; final int? maxSeekTimeMs; const PlaybackTimeline({ required this.startTimeMs, required this.endTimeMs, required this.positionMs, this.minSeekTimeMs, this.maxSeekTimeMs, }); } class SMTCConfig { final bool playEnabled; final bool pauseEnabled; final bool stopEnabled; final bool nextEnabled; final bool prevEnabled; final bool fastForwardEnabled; final bool rewindEnabled; const SMTCConfig({ required this.playEnabled, required this.pauseEnabled, required this.stopEnabled, required this.nextEnabled, required this.prevEnabled, required this.fastForwardEnabled, required this.rewindEnabled, }); } enum RepeatMode { none, track, list; static RepeatMode fromString(String value) { switch (value) { case 'none': return none; case 'track': return track; case 'list': return list; default: throw Exception('Unknown repeat mode: $value'); } } String get asString => toString().split('.').last; }