Skip to content

Commit

Permalink
feat: media seek
Browse files Browse the repository at this point in the history
  • Loading branch information
cdnninja committed Dec 5, 2024
1 parent 2d0330a commit 733537d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/yoto/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ async def async_play_media(
player_id=self.player.id, cardid=cardid, chapter=chapterid, trackkey=trackid
)

async def async_media_seek(self, position: float) -> None:
"""Send seek command."""
#self._remote.cmus.seek(position)

async def async_set_volume_level(self, volume: float) -> None:
await self.coordinator.async_set_volume(self.player.id, volume)

Expand Down Expand Up @@ -237,6 +241,7 @@ def supported_features(self) -> MediaPlayerEntityFeature:
| MediaPlayerEntityFeature.BROWSE_MEDIA
| MediaPlayerEntityFeature.PREVIOUS_TRACK
| MediaPlayerEntityFeature.NEXT_TRACK
| MediaPlayerEntityFeature.SEEK
)

@property
Expand Down

0 comments on commit 733537d

Please sign in to comment.