Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pause action has no effect #46

Open
Mikescops opened this issue Jun 13, 2022 · 14 comments
Open

Pause action has no effect #46

Mikescops opened this issue Jun 13, 2022 · 14 comments
Labels
bug Something isn't working unconfirmed

Comments

@Mikescops
Copy link
Contributor

Following up on #43, the pause action has no effect on my HT-A9 device.

This thread will gather investigation.

@alexballas alexballas added the bug Something isn't working label Jul 2, 2022
@alexballas
Copy link
Owner

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.

@Mikescops
Copy link
Contributor Author

Ah great thank you, I'll have a look then :)

@Mikescops
Copy link
Contributor Author

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 👍

@alexballas
Copy link
Owner

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.

@Mikescops
Copy link
Contributor Author

No I can't even pause with the remote 🙃

How did you implement it? with NextTransportUri?

@alexballas
Copy link
Owner

alexballas commented Jan 24, 2023

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.

@Mikescops
Copy link
Contributor Author

Mikescops commented Jan 25, 2023

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.

@alexballas alexballas reopened this Jan 25, 2023
@alexballas
Copy link
Owner

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?

@alexballas
Copy link
Owner

Apologies, I misread the above comment. So the seek flag is the one that is important. hm

@Mikescops
Copy link
Contributor Author

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

@alexballas
Copy link
Owner

alexballas commented Jan 25, 2023

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.

@Mikescops
Copy link
Contributor Author

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.

@alexballas
Copy link
Owner

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.

@Mikescops
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
None yet
Development

No branches or pull requests

2 participants