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

Play media over browser_mod does not work because of mixed content HTTP/HTTPS #301

Closed
4 tasks done
rchovan opened this issue Mar 2, 2022 · 5 comments
Closed
4 tasks done

Comments

@rchovan
Copy link

rchovan commented Mar 2, 2022

My Home Assistant version: 2022.2.9, plugin installed over HACS.

What I am doing:
Play media over browser_mod does not work because of mixed content. HTTP connection is upgraded to HTTPS, but lot of stream servers does not use HTTPS.

What I expected to happen:
Play URL stream

What happened instead:
Nothing, but error is logged in console.

Minimal steps to reproduce:
Play URL HTTP stream on HA where you are connected over HTTPS.
Example code from developer tools > services

# The least amount of code or steps possible to reproduce my error
service: media_player.play_media
data:
  media_content_type: music
  media_content_id: http://live.slovakradio.sk:8000/Slovensko_128.mp3
target:
  device_id: 803097b77317c14289294dfd2eaad0ec
# Put your code/steps here

Error messages from the browser console:

// Select everything from the browser console and copy it
Mixed Content: The page at 'https://<redacted>/lovelace-music/0' was loaded over HTTPS, but requested an insecure element 'http://live.slovakradio.sk:8000/Slovensko_128.mp3'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html
2browser_mod.js:145 Uncaught (in promise) DOMException: The play() request was interrupted by a new load request. https://goo.gl/LdLk22
player_play @ browser_mod.js:145
play @ browser_mod.js:145
msg_callback @ browser_mod.js:145
_connection.subscribeMessage.type @ browser_mod.js:145
_handleMessage @ core.30819411.js:1
live.slovakradio.sk:8000/Slovensko_128.mp3:1          Failed to load resource: net::ERR_CONNECTION_CLOSED
/lovelace-music/0:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
DevTools failed to load source map: Could not load content for chrome-extension://hmigninkgibhdckiaphhmbgcghochdjc/contentScript.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
// Paste it here

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

@stale
Copy link

stale bot commented May 1, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 1, 2022
@rchovan
Copy link
Author

rchovan commented May 1, 2022

Hi, any news or progress ? Or do you know any workaround ?

@stale stale bot removed the stale label May 1, 2022
@stale
Copy link

stale bot commented Jul 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 2, 2022
@rchovan
Copy link
Author

rchovan commented Jul 2, 2022

Any progress?

@stale stale bot removed the stale label Jul 2, 2022
@thomasloven
Copy link
Owner

Closed because of Browser Mod 2.0 release.
Please see #354.

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

No branches or pull requests

2 participants