Chromecast won't play HLS stream - http-live-streaming

I am running a local server on iOS application and trying to stream the phone screen.
So the app makes this HLS(http://myipaddress:port/hls.m3u8)and updates it. I can play that on Chrome browser without any issue.
I have also set the CORS headers thus there is no error in the Chromecast remote debugger.
Somehow it doesn't play and it stuck there.
When I checked the response tab, it is empty.
Chromecast remote debugger
Http response header

Related

Chromecast debug- can cast but cannot inspect

I have a gen3 chromecast device (whitelisted) and have had no issues inspecting traffic using chrome://inspect in the past. Now all of a sudden I just cannot seem to debug the CC device.
When I “chrome://inspect” I can see the device (not by its name that I have setup. It just says Chromecast) but when I start playing I don’t see the inspect option to start inspecting
I have tried the following:
Updated chrome
Re-booted the CC device
Re-booted wifi router
Tried it on a different TV
Also when I try to adb connect it throws an error saying that the device rejected connection. What does this mean and how do I resolve this?
I was having the same issue, there are a few things you need to make sure are set up correctly.
For the Chromecast:
Make sure the Chromecast is registered to your account on https://cast.google.com/publish/#/overview
Double-check the serial as it can mix O and 0, 1 and l, etc.
(Not sure if 100% it's necessary) Enabled "send statistics to Google" in the settings.
Once the device is "Ready For Testing" reboot it.
For the app:
The app must be registered to the same account as the device.
If you don't have an app (e.g. just want to test casting from your website), you need to create one. You can make it a "Styled Media Receiver" so you don't need to host JS anywhere. It's basically the same as the default receiver.
Make sure your app is published. Once it is, reboot the Chromecast.
The app must already be running before you can inspect it.
To make sure the issue is not coming from your website, you can use https://casttool.appspot.com/cactool/ (replace the appID with yours).
Start casting, then head to chrome://inspect/#devices and the "inspect" button should hopefully be there.

RUn RTSP Live streaming in all browsers using angular js plugin

I have RTSP URL coming from back end and I have to run rtsp live streaming in my web GUI written in angular js.Currently i am using VXG player plugin to run that RTSP URL but this player is only supported in Chrome.Is there any solution to run that rtsp URL in all browsers
E.x: Chrome, Mozilla, IE, Safari, Microsoft Edge?
Thanks in Advance.
Rtsp is not a supported protocol by most browsers. If you need it to work on all browsers, you must use a protocol that works on all browsers. Like http.
Since RTSP is not supported directly by the browser it needs some back end server which captures the stream using web sockets so it is not like normal http where we need to wait for response web sockets is two-way duplex communication.And again in browser it can play only mp4 videos so there should be player which ever the format the stream is and convert it browser understandable format.
some url which will be helpful understand this concept
https://streamedian.com/docs/#description
And another using node js which uses websocket and jsmpeg player you can implement rtsp streaming in browser using Angular JS
https://www.npmjs.com/package/node-rtsp-stream
https://github.com/phoboslab/jsmpeg -- jsmpeg player
and server side you should install ffmpeg. so ffmpeg converts your stream.
Note If try to implement Node Js on please install the ffmpeg in the server side

gatt.disconnect() is initiated host but not by the app

I've been breaking my head with this issue....
i send a gatt.write command to my remote device, sometimes getting response and sometimes not because the gatt disconnects at all times from my app! (when using the nrf app for writing this value it doesnt disconnect)
when exploring the issue with WireShark using btsnoop_hci.log
I see that the host is initiating disconnect, but my app is not sending!!! went over with debugger on every possible disconnect.
I'm attaching the log output:

Whitelisted chromecast works with default tictactoe app ID but not mine

I am trying to get the tic tac toe demo from github working on my Chromecast after changing only the app id of the clients. With the default app id, I have been able to launch and play the game with an android client and a mac client.
I have:
Added my Chromecast device on the developer console (it has a green status indicator)
Set (via the Android Chromecast app) the Chromecast to send the device serial number
Verified that the serial number is correct
Verified with both the Android and Windows Chromecast apps that the serial# setting is retained
Power cycled the Chromecast
Setup an app id in the developer console (status is a grey circle labeled 'Unpublished')
Entered an internet accessible (not local) URL for the app id
Installed the receiver app at the above url and verified I can access it from a browser on the same network as the Chromecast
Also tried a local IP address (192.168.x.x) which I understand is supported as well
Modified the web client ttt.js file to use my app id (and verified app id is correct)
Modified the android client (GameActivity.java) to use my app id (and verified app id)
Did a git diff to make sure that I didn't inadvertently change anything else
Verified that my local copy of the source is the latest from git
When running the android client I can connect to my Chromecast but the Chromecast home screen shows "Brain Freeze", "We're sorry, but something could not load", "Activity aborted".
The logcat console in eclipse for the android device reports, "ConnectionResultCallback. Unable to launch the game. statusCode: 2002".
The web client on the Mac results in the same messages on the Chromecast and
'"reason":"CANCELLED","type":"LAUNCH_ERROR"'
on the web page output.
Is there a way to get more information from the Chromecast to indicate what is going wrong with the launch?
Follow Up
It turns out that the issue was in my network setup and not in my chromecast setup. After sniffing the network traffic with wireshark, I could see that the ARP request to retrieve the MAC address of my server was not getting a response. I am running my server on Virtualbox with a bridged adapter but needed to turn on promiscuous mode (allow all). Now the chromecast successfully launches the receiver app and I can play the tic tac toe game when using an HTTP based URL. (I need to fix the certificate for HTTPS).
Thanks Les, for the effort.
Did you verify that [x] send my serial # to Google has been checked (using the setup app)?
Also, did you wait 15 minutes and then restart your device (power cycle)?

Setting up a websocket capable application on an azure ubuntu vm

Okay, so I have created an ubuntu vm in the azure cloud, I have successfully launched nodejs, redis, socket.io, Express and all the components for a game I am writing.
I have setup azure endpoints on internal and external port 8080, and use app.listen(8080) in my js code.
When I browser to http://< app-name >.cloudapp.net:8080/ I can view the result of my nodejs application fine, it displays the html, css etc.
However when it attempts to start a socket connection (using socket.io) I get only this (on my chrome dev console under websockets):
HeadersPreviewResponseWebSocket Frames
Request URL:ws://<app-name>.cloudapp.net:8080/socket.io/1/websocket/13510496541533398587
Request Method:GET
Status Code:101 Switching Protocols
Request Headersview source
Connection:Upgrade
Host:<app-name>.cloudapp.net:8080
Origin:http://<app-name>.cloudapp.net:8080
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:y5vueHE66phl70gle7KCtw==
Sec-WebSocket-Version:13
Upgrade:websocket
(Key3):00:00:00:00:00:00:00:00
Response Headersview source
Connection:Upgrade
Sec-WebSocket-Accept:dn+2lA6sMIXHLEmDS/Q4j/IIwxI=
Upgrade:websocket
(Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
It will also crash the nodejs app on azure when i try send anything using socket.emit() on the client (browser); in my azure ssh, it just says 'DEBUG: Program node app.js exited with code null' which isn't particularly helpful.
So it obviously isn't connecting properly? I have also tried in my nodejs listening on port 80, but then I don't even get the standard webpage (html,css,etc).
From what I have read online, it is very possible to get sockets working providing your not using the web role (which I assume the vm is not).
Any idea how I can get this to work? (and preferably on port 80)?
Edit: starting to wonder if this has nothing todo with sockets, realized I get the same switching protocol message, on my home vm (where it is working). Spin off question: How can I view crash details for a nodejs program on a ubunu azure vm?
There is a time out of around 60s on the Windows Azure loadbalancer.
Does it work if you send a message back to the client just after the websocket connection is established?
If it is the case you will have to implement some keep a live message send every minutes.

Resources