alexballas / go2tv

Cast media files to UPnP/DLNA Media Renderers and Smart TVs.
MIT License
514 stars 52 forks source link

Always Wating for status #68

Closed mostcute closed 1 year ago

mostcute commented 1 year ago

i use go2tv to play the video to my JMGO-N1 Ultra Projector using

./go2tv -v 1.mkv -t http://192.168.123.34:49152/description.xml

image

every thing is ok,the video playing well and i can use keyboard to control the volume,but the status is always waiting for statusnot Playing

mostcute commented 1 year ago

i use the master branch to build

mostcute commented 1 year ago

git branch -vv

main 86a7b6c
mostcute commented 1 year ago

i check the code,find the callback handler will change the status state, maybe this is the devices's problem that did'nt call the callback function to update the state?

alexballas commented 1 year ago

Hello, thanks for raising this. That is correct. It's the device that is responsible to provide an event URL for Go2TV to subscribe to and receive all notifications from that device. The GUI mode provides an "Export Debug Logs" option which would be useful to check. Would it be possible to try to play you file though the GUI mode and then export the logs and paste them here?

mostcute commented 1 year ago

debug.log

here, i use the gui play the video and test the function mute, volume add/dec drag the progress

mostcute commented 1 year ago

debug2.log

more log,i click the play button,it will become pause button seconds later, but if i click the pause buttun, it won't be play button again.

which means i can't replay the paused video unless i click stop button

alexballas commented 1 year ago

more log,i click the play button,it will become pause button seconds later, but if i click the pause buttun, it won't be play button again.

which means i can't replay the paused video unless i click stop button

Yes, this is because there is no callback from the device so the application is re-enabling the buttons after a few seconds. However this auto-enable functionality is not perfect and I'll try to improve it in the next release. I had a quick look at the logs but I dont see any apparent errors. The device just refuses to cooperate. Do you happen to have a smart tv or other device to test it too?

mostcute commented 1 year ago

i play the video to a JMGO-N1 Ultra Projector and XIAO MI TV none of them send callback

and i try to send a mp3 to my Intelligent speaker,but it say not support the media type, is there any func in the lib support to query which media type the device support?

maybe parseProtocolInfo? i will try it to find my speaker support which Protocol

alexballas commented 1 year ago

Just a note. I pushed a commit to the devel branch https://github.com/alexballas/go2tv/commit/fee939d417c9ca65c02134cd01ec3453c6e7dc16 to fix the auto-enabling in the GUI mode.

So about the not-support media type. Go2TV will request from the device all the support file types. If the filetype does not match the file type of the file it will fail. Could you please send the debug logs for your "Intelligent speaker" ? The logs should have the list of all the support file types as presented by your device. Maybe there is a bug in the way Go2TV parses that list.

Also let me know if the latest commit in the devel branch fixes the auto-enabling in the GUI mode.

Thank you!

mostcute commented 1 year ago

debug3 is the speaker and debug4 is the Projector ,

It seems that my speaker does not support any format of media, but it's too strange to support DLNA

debug4.log

debug3.log

mostcute commented 1 year ago

i tested the latest dev branch and the state will change auto between play and pause, but i think 5s maybe too long,

mostcute commented 1 year ago

When I pause and play using the device's remote control, the status of the GUI still cannot be synchronized due to no callback. But this is no longer something that this software can solve

alexballas commented 1 year ago

I might drop the delay to 3 seconds. Btw you can try to compile a version of Go2TV where parseProtocolInfo always returns nil. So in theory you could try to play some mp3s to your speaker without this limitation

mostcute commented 1 year ago

yes ,that works! the speaker can play the mp3 and mp4

alexballas commented 1 year ago

Does the callback functionality work for the smart speaker?

mostcute commented 1 year ago

yes ,the speaker seems call the callback because the button change state immediately

alexballas commented 1 year ago

Closing as there is nothing further to do here. Some improvements around Protocol info parsing will be included in the upcoming release.