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

Casting to Chromecast and basic auth/session is not working #273

Open
trollkarlen opened this issue May 4, 2017 · 4 comments
Open

Casting to Chromecast and basic auth/session is not working #273

trollkarlen opened this issue May 4, 2017 · 4 comments

Comments

@trollkarlen
Copy link

Description

Briefly describe the issue.
Enable web UI with username and password, and then try to cast from the web player after login.
It fails.

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

Enable web UI
Set user and password
Open homepage and login
Play video and then cast it
It fails
Results

Expected

Same as without basic auth

Actual

Error output

VIDEOJS: Session initialized: 8a8e4f94-ff55-43a4-ac0d-110d49e2a138 source : http://192.168.0.173:8080/vfs/.....mkv type : video/mp4
cast_sender.js:88 VIDEOJS: Cast Error: {"code":"session_error","description":"LOAD_FAILED","details":{"type":"LOAD_FAILED"}}

Additional Information

Chrome
It works if i turn off basic auth

It can be due to the Headers "Access-Control-Allow-Origin:*" and more from here:
https://www.wowza.com/docs/how-to-stream-from-an-android-device-to-the-google-chromecast-device

Is there anyway to send the basicauth or session header with the cast_sender script to the chromecast so it can use it when talking to the webserver ?

/T

@jez500
Copy link
Collaborator

jez500 commented May 6, 2017

I am pretty sure I know why this fails but unsure of a good way to fix it. Chromecast connects directly to the stream url and thus needs the user/pass embedded in the url passed to the chromecast eg. http://user:pass@kodi/path/to/video.mp4.

As the auth is handled by the browser, chorus doesn't store these creds, the only way I can see this working is by having this also stored in the settings so chorus could correctly build the url.

Will need some more thought, and open to ideas for better solutions.

@trollkarlen
Copy link
Author

I tested with a hack and hardcoded the user/pass on the url like you described, but it seems chromecast or someone in between removes it. So it wont work :(

But i guess basic auth is not very good without https(TLS) anyway.

In my case I will have an apache proxy between internet and chorus2. Its handling the TLS part but maybe i will try to disable the basic auth in the chorus2, and let apache handle that too.
But i still need to send the session_id in the url, back to apache somhow.

I will try to figure this out, but it will most probably be an apache proxy settings combined with support in chorus2. So it sends the sessionId in the url back when trying to access from chromecast.
http://session_id/vfs:///path/to/video.mp4
and gets revritten in the apache proxy to the right path:
http://vfs:///path/to/video.mp4

Do you have a better suggestion ?

/T

@justinthielman
Copy link

I am having similar issues with Chromecast, has any solution been identified?

@trollkarlen
Copy link
Author

trollkarlen commented Oct 26, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants