iantrich / podcast-card

🎧 Podcast Player Card
MIT License
22 stars 3 forks source link

Rewind 30s Button #10

Open SurreyMichael opened 4 years ago

SurreyMichael commented 4 years ago

It would be really useful to be able to add a 'rewind 30 seconds' button to a lovelace card in Home Assistant.

Ideally something that works through mini-media-player. This already shows a progress bar which does allow scrubbing through a podcast, but is clumsy to use especially on mobile rather than desktop.

Describe alternatives you've considered Learn mindfulness so that I concentrate better during podcasts and don't miss the interesting bits.

iantrich commented 4 years ago

I have a partial solution more or less ready to go which allows you to pass down the configuration for the mini-media-player so that you can do this

type: 'custom:podcast-card'
entity: sensor.gpodder
name: Ian's Podcasts
show_player: true
custom_player: true
player_config:
    shortcuts:
    buttons:
        - type: script
        id: skip
        icon: mdi:rewind-30
        data: media_player.bedroom
        interval: -30
        - type: script
        id: skip
        icon: mdi:fast-forward-30
        data: media_player.bedroom
        interval: 30

Then setup your script as described here: http://community.home-assistant.io/t/lovelace-mini-media-player/68459/1218

The only limitation with this is that you'll have to hardcode the media_player that the script calls. I'll look into providing some variables possibly to work around that in another release and will push this out after I get home and test it a bit.

SurreyMichael commented 4 years ago

Ian,

I used the link to learn how to set up a rewind button on a mini-media-player card - and set up the script - and it works a treat.

It will be nice to have the button on your podcast card if possible, but having the two cards next to each other is a work around.

Many thanks!
Michael

On 4 Feb 2020, at 18:53, Ian Richardson notifications@github.com wrote:

I have a partial solution more or less ready to go which allows you to pass down the configuration for the mini-media-player so that you can do this

type: 'custom:podcast-card' entity: sensor.gpodder name: Ian's Podcasts show_player: true custom_player: true player_config: shortcuts: buttons:

  • type: script id: skip icon: mdi:rewind-30 data: media_player.bedroom interval: -30
  • type: script id: skip icon: mdi:fast-forward-30 data: media_player.bedroom interval: 30 Then setup your script as described here: community.home-assistant.io/t/lovelace-mini-media-player/68459/1218

The only limitation with this is that you'll have to hardcode the media_player that the script calls. I'll look into providing some variables possibly to work around that in another release and will push this out after I get home and test it a bit.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iantrich/podcast-card/issues/10?email_source=notifications&email_token=AN3A5SOKUNAHNLWQJEZ254DRBG2UBA5CNFSM4KPWNSXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKYYSXQ#issuecomment-582060382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN3A5SLUR2QEBQLVFNM4EALRBG2UBANCNFSM4KPWNSXA.

iantrich commented 4 years ago

@SurreyMichael I plan to add this to the card itself. Just need to test it a bit.