question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support play/pause on media already playing

See original GitHub issue

Hello,

is it possible to support play and pause command on current playing media without launching a new video?

Something like this:

client.connect(host, function() {
    // some method to load current player
    client.loadCurrentPlayer(function(err, player) {
       player.pause()
       // ...
       player.play()
    })
})

or directly operating on client object (like stop/volume/mute/unmute action):

client.connect(host, function() {
    client.pause()
    // ...
    client.play()
})

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
EricHiercommented, Jun 2, 2021

Okay. 😃 I highly appreciate your help - so awesome! ^^ I am not that experienced with this module and you helped me to get a realistic evaluation of the issue. 😃

0reactions
pedromsilvaptcommented, May 31, 2021

Yes I suppose. That particular error seems in my view to be triggered by the status reponse message, which does not contain the mediaSessionId that the DefaultMediaReceiver needs to call the pause method. I’ve never worked with the Spotify App, so I can’t be of much help with that. Sorry 😢

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tap to turn on/play/pause media player - Configuration
Hi all, I am looking for a way to, as a tap_action in lovelace: If the media player is off, turn it on...
Read more >
Play/Pause and stop media keys not working
- If the service is already started, then click on Restart to restart the service. - Relaunch the Spotify/VLC and see if the...
Read more >
Android Media Player play/pause Button - Stack Overflow
Show activity on this post. very simple solution. If mediaplayer is playing, display play button and pause the mediaplayer. If not playing, do...
Read more >
Responding to media buttons - Android Developers
Media buttons are hardware buttons found on Android devices and other peripheral devices, for example, the pause/play button on a Bluetooth ...
Read more >
WebOS TV integration media_player: Button PLAY/PAUSE do ...
If I use the "webostv.command" service with "command: media.controls/play", playback will start. Another solution was to use the community ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found