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
Add Authorization header to media player requests #94
Conversation
When opening Media Player in HA we weren't passing Authorization data in requests for thumbnails and video itself, so requests couldn't be completed successfully.
Thank you for your code. |
FYI: This fix somehow breaks the ability to see thumbs and view/play videos. Reverting to views.py from 0.3.9. fixes this back to work for me. |
Do you mean thumb and video in Media section? |
Which version of ha? |
I have the same error 500 and no file playing problem in HA 2022.9.6 As @dieideeistgut pointed, the problem is solved by restoring views.py from v0.3.9 |
Tested now with my 2022.9.7 and I have no problems. |
I think this may not be directly related to yi-hack. It could as well be some reverse-proxy config. In my case i have HA behind a traefik proxy. So authentication params may not be routed to HA the way HA expect these. Just a thought. Will run some tests over the weekend. |
Sorry, I was on vacation. I just updated to HA 2022.10.0 and have the same problem. The camera is a Yi dome camera 1080p running https://github.com/roleoroleo/yi-hack-MStar
Hmm, that may be my case as well, I run HA on my Kubernetes cluster behind traefik, will look into that |
Looking at the logs, I get this
The HTTPBasicAuth is an object intended to be passed as See https://requests.readthedocs.io/en/latest/user/authentication/ and https://docs.aiohttp.org/en/stable/client_reference.html#basic-api
I don't know how any of this worked in the first place, will open a PR with the change I made |
When opening Media Player in HA we weren't passing Authorization data in requests for thumbnails and video itself, so requests couldn't be completed successfully.