Pause action has no effect
Following up on #43, the pause action has no effect on my HT-A9 device.
This thread will gather investigation.
Hello, fyi I pushed some changes in the develop branch to make Debug Log exporting easier and avoid all the hassle with Wireshark. As soon as you perform all your tests you can go to the settings tab and click on the "Export Debug Logs" button.
Ah great thank you, I'll have a look then :)
Hello,
I'm back here after a long pause (pun intended), but I redeveloped all the upnp mediarenderer in a language i'm more familiar with (aka NodeJS). And figured out that my device has no Pause or Seek function implemented (UPNP error 701, see specs here).
I tried with a TV I have and it worked much better. I think I'll just complain to Sony's support to understand why they didn't implemented such simple feature :+1:
This is indeed strange! Hopefully you can still pause with Sony's remote control. Thanks for checking this out! FYI, in the upcoming v1.14.0 I'm implementing gapless playback. This is a UPNP feature that I never took the time to implement into my app before. Hopefully this is something that your Sony supports.
No I can't even pause with the remote 🙃
How did you implement it? with NextTransportUri?
How did you implement it? with NextTransportUri?
Correct. I'm using NextTransportURI and also made it configurable from the settings tab if the device does not support it. Currently there are some font glitches in the UI that prevent me from releasing this new version but you can find the latest changes in the "devel" branch.
So I was wrong, Sony did well the implementation I didn't thought that the limitation is that I had to input the correct DLNA flags so it can work (choosing the seek mode seems to be important).
I open-sourced the first draft of my library if you want to see, I added a helper to pick the correct flags for DLNA so it works well: https://github.com/Mikescops/node-upnp-client/blob/main/src/utils/dlna.ts
I took a look at your code and it seems you implemented well.
Thanks for checking this out. These are the flags I use https://github.com/alexballas/go2tv/blob/main/utils/dlnatools.go#L48-L53 To better understand what it's going on with Go2TV since your implementation work fine is to check the debug logs. Would it be possible to try to "pause" from inside Go2TV and then navigate to the Settings tab and export the debug logs?
Apologies, I misread the above comment. So the seek flag is the one that is important. hm
So I tried the latest release of your app, 2 things I noticed:
- after pressing play, the media launches for 1 second and then it goes to "pause", maybe there is something wrong with how you handle the state (so in the end I click twice play for the media to start)
- clicking on pause works as expected, but the pause button stays gray and there is no way to click play again
Strange, I didn't really touch any of the play/pause logic with the latest releases.
after pressing play, the media launches for 1 second and then it goes to "pause", maybe there is something wrong with how you handle the state (so in the end I click twice play for the media to start)
This is weird, I never experienced this behavior with any of the media renderers
clicking on pause works as expected, but the pause button stays gray and there is no way to click play again
So this happens because every time you click on a button I explicitly disable it to avoid some race conditions ( I'll improve it in the upcoming release since you raised it). What happens then, is that device sends back a callback PAUSE message which then explicitly enables the button again. So I kinda depend on those callbacks for now. So your devices does not send the callback messages properly.
What I would suggest is to try to restart your speakers or power the off for a bit and see if the issue persists when you start them up again. I've seen many cases where devices just panic after a lot of weird testing and bad usage of their UPNP capabilties.
Right me too, I have seen this. I also looked at the behavior of the Sony Music app, and it's fun because they are super flexible about either they could subscribe or not to the events, they don't care if the message was received or not, etc... The eventing is also best effort, so it can takes time to get any changes from your device.
One thing I noticed on some other renderer is that they abuse the "get" endpoints, to get the player position or media info, that way they are sure about the race conditions.
In the end events are more for catching if you do change with the remote controller of your device.
Spamming calls is something that sometimes can't be avoided. I do it for the volume control and the new gapless functionality. What I will do is add a timer to the buttons. If they dont get enabled after X time, I'll explicitly enable them. I'd like to avoid changing the logic just for the few media renderers that don't handle stuff correctly. Let me know if the device restart changed anything.
I need to get back to work, but I'll try later.
Sure yeah I get the logic. For the gapless I'm using the events for now, I think it's enough because people don't usually spam the next button.