KoljaWindeler / ytube_music_player

YouTube music player for homeassistant
336 stars 53 forks source link

Skip Track Using Remote #343

Closed pyrometheous closed 4 months ago

pyrometheous commented 4 months ago

I just set this up, and I love it so far, but I did run into an issue. I'm using an Nvidia Shield TV as the media player, and I've found that I can't skip ahead or to a previous track using the buttons on my remote (Harmony Hub Elite).

pyrometheous commented 4 months ago

I was playing around with adb, and I noticed that if I have it enabled on the shield, and use this script, it'll cast the playlist and the remote controls it. Couldn't get it to work with SmartTube though, so that's unfortunate. But I thought I'd drop this code block for reference. Hopefully this is helpful.

service: androidtv.adb_command
metadata: {}
data:
  command: >-
    adb shell am start -a android.intent.action.VIEW -d
    "https://www.youtube.com/watch?v=6hCqRb8Dtvo&list=RDEMb1vAi4rwXXeDlr7NZ68C_w"
target:
  device_id: **********
KoljaWindeler commented 4 months ago

well there are very fundamentally different ways how the playback works .. running the youtube app on you shield will leave the app in control of the playlist and thus you can use the navigation keys.

The homeassistant mediaplayer is (at least for the cast devices that I'm using) a lot simpler. It can only send one URL at the time .. so the mediaplayer can't use navigation keys .. I don't thing that we can change that.