enen92 / script.tubecast

A castv1 implementation for Kodi and Youtube
MIT License
111 stars 31 forks source link

Cast icon does not appear in Android #25

Open andreskru opened 4 years ago

andreskru commented 4 years ago

Hi. Cast icon does not appear on YouTube app on Android. I can see SSDP packages on network but icon still does not appear. Also device-desc.xml looks good.

`

1 0 http://192.168.1.11:8008 urn:schemas-upnp-org:device:dail:1 Kodi (LibreELEC) Kodi Tubecast uuid:007d00ac-8b1f-52e0-80d0-4e4b736ae194 ` Any idea? Thanks
andreskru commented 4 years ago

Hi, just adding more info I can see some request between PC and Addon

REQUEST GET /apps/YouTube HTTP/1.1 Host: 192.168.1.3:8008 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36 Accept-Encoding: gzip, deflate RESPONSE

`HTTP/1.0 200 OK Date: Fri, 27 Dec 2019 17:47:44 GMT Server: WSGIServer/0.1 Python/2.7.16 Content-Length: 214 Access-Control-Expose-Headers: Location Content-Type: application/xml Cache-Control: no-cache, must-revalidate, no-store Access-Control-Allow-Method: GET, POST, DELETE, OPTIONS

YouTube stopped ` There you can see state=stopped Is this ok? Thanks
andreskru commented 4 years ago

Adding more info

Using tcpdump can see an empty response with only HTTP 200 when doing:

`GET /ssdp/device-desc.xml HTTP/1.1 Host: 192.168.1.6:8008 Connection: keep-alive Origin: package:com.google.android.youtube User-Agent: com.google.android.youtube/14.50.53(Linux; U; Android 7.0; es_US; Redmi Note 4 Build/NRD90M) gzip Accept-Encoding: gzip, deflate

HTTP/1.0 200 OK `

enen92 commented 4 years ago

Can you simulate the same request via curl or python-requests?

andreskru commented 4 years ago

Hi, Doing it manually from a PC using telnet it is working fine

`[krugean@COKRUGEAN ~]$ telnet 192.168.1.3 8008 Trying 192.168.1.3... Connected to 192.168.1.3. Escape character is '^]'. GET /ssdp/device-desc.xml HTTP/1.1 Host: 192.168.1.6:8008 Connection: keep-alive Origin: package:com.google.android.youtube User-Agent: com.google.android.youtube/14.50.53(Linux; U; Android 7.0; es_US; Redmi Note 4 Build/NRD90M) gzip Accept-Encoding: gzip, deflate

HTTP/1.0 200 OK Date: Fri, 27 Dec 2019 22:27:12 GMT Server: WSGIServer/0.1 Python/2.7.16 Application-Url: http://192.168.1.6:8008/apps Content-Length: 547 Access-Control-Expose-Headers: Location Content-Type: application/xml Access-Control-Allow-Method: GET, POST, DELETE, OPTIONS

<?xml version="1.0" encoding="utf-8"?>

1 0 http://192.168.1.6:8008 urn:schemas-upnp-org:device:dail:1 comedor Kodi Tubecast uuid:1a0c27eb-5399-57d5-92bb-641865a0866b ` But, i can see something wrong on: ` http://192.168.1.6:8008` That IP is not the current kodi IP. Current IP is 192.168.1.3 Let me know if more info is needed. Thanks
andreskru commented 4 years ago

Sorry, I close it by mistake

siku2 commented 4 years ago

The base url is based on the HOST header... I don't understand why it would differ from the actual ip address unless there's some routing going on. Are you sure that Kodi is in the same network as your phone?

This might be fixed by using the actual socket address from the Chromecast server instead of echoing the HOST header. But that's just a long shot.

viseniv commented 9 months ago

also on ios kodi is not shown on youtube app pairing code works and then nothing loads. when i close youtube app and reopen nothing appears. I use win 11 for kodi