• DUDU OS
  • Autoplay YouTube music

Hi,
I'm listening YouTube music while driving, i think it's quite popular.
Is it possible to make it play music when i start my car. Technically OS can send like a "play" signal to the app when waking up from hibernation.
I added it to the wiget on main screen, so it's loaded and up after boot. But i have to press "play" every time.

I think this method could work with any othe music app like Spotify, or maybe any else.

    Artem_R34

    You can use the nokill and tasks feature for the music app to play on startup.

    They should be located in the following settings areas, but let me know if not and I’ll double check.

    I also have Spotify to open up on startup

    Nokill
    Setttings | vehicle | Startup setttings

    This may not be required, and may not be applicable if you you have the head unit to shutdown fully rather than sleep, it also depends on how the app works, Spotify for example saves the time and song currently playing when closed so not needed in the nokill for my purposes.

    Nokill will prevent the app from closing fully when vehicle is turned off and in sleep mode, this should keep the last track and where it ended for when you turn the vehicle back on.

    Select the YouTube music app in the nokill list

    Tasks
    Settings | Other | Tasks

    With sleep mode enabled, tracks may continue to play (whilst no sound) until the head unit goes into deep sleep.

    So I have set two tasks, one to pause music when vehicle is turned off and then to play music when vehicle it’s turned back on.

    With the tasks, you click on the + icon and then go through the options to setup, depending on if you have sleep or full shutdown set, select the appropriate trigger, some are not compatible with sleep mode which is indicated on the trigger, I believe it’s ignition on and ignition off for sleep mode.

    Next select what you want to happen, there’s an option to play, pause, skip etc

    Then it’s trial and error with the timing for the play trigger as it depends on how long it takes for the music app to open, best way is to set it at 4 or 5 secs, turn off the car and back on to see if it works

    Just go back to tasks, long press the saved one and hit edit to amend the timings.

    I have a shortcut set on my iPhone so that my hotspot is activated when connected to power, this for me ensures I am connected to the internet on boot up too

    Hope this helps

    Finally managed to test this solution and seems the task is able to send play only to music widget, not the system wide play.

    I'm able to start YT music playing by pressing "next" on the steering wheel but it's not responding to the automation task.

    I found thet YT music supports remote command. So the app that emulate system "play" signal putted to task could solve the problem.


    I found what was my mistake.
    I should select music widget for a wiget, and then select YouTube music in wiget settings.

    I just added YT app to wiget before, thets why it wasn't working.

    I can't seem to get this to work. I have the music widget as one of the three panels on the minimalist display. Spotify is set up as the music app within the music widget. I have my HU set to sleep rather than boot each time.

    Using Tasks, I have tried System Boot, Launcher Start, and Screen On as the trigger. Delay of 5 seconds. Action is Music Play. No luck getting it to work. The Spotify app is running, and it plays fine by tapping the play button from within the widget.

      hrtloop

      To ensure everything works correctly, switch off the minimalist mode first, go to the settings, and check that your default music app is set to Spotify under the HOME area. (That may not be necessary, but just mimicking my setup). After confirming this, you can switch back to minimalist mode

      Next, navigate to Vehicle > Startup and add Spotify to the list of apps that launch on startup.

      Now, ensure the following:
      1. Set Spotify as your default music app.
      2. Add Spotify to the startup apps list.
      3. Create a task with the following details:
      • Trigger: Ignition On
      • Action: Music Play
      • Delay: 5 seconds

      Once done, turn off the ignition. After the screen turns off, wait 5-10 seconds, then turn it back on.

      When the head unit powers up, Spotify should briefly flash up and return to the background. A few seconds later, the music play task should activate.

      If this still doesn’t work, double-check if you’re using offline music or if you’re connected to Wi-Fi.

      7 days later

      Thanks. After posting it began working, but since then it only works intermittently. I'm not quite sure what's causing the behavior.

      I have my HU set to sleep when the vehicle powers off, and spotify is in my startuo apps. I've noticed that often after starting I will see the Spotify widget as expected (as one of three panels in minimalist mode), the song I was previously playing will be displayed, but hitting play does nothing. I can fix this by starting the Spotify app manually. After doing so the widget works again.

      The fact that this happens only about 1 out of 5 times is confusing.