After update to 20210620-2
(and volumio 3.074
) it seems to work in ~10% cases.
Most of the time it’s still “connecting with volumio” and on the logs I see
[yt-cast-receiver.YouTubeApp] stop() ignored - called with different pid.
[yt-cast-receiver.YouTubeApp] Launching...
[yt-cast-receiver.YouTubeApp] Generated screen Id: 14mfjd52mmrdfqbc3ach9jq5kc
[yt-cast-receiver.YouTubeApp] Obtained lounge token: AGdO5p-YS_eaing09eTTzzpkt9cbPfPGE9RJNySvOd0yP343QoBPe6yvRtCCc4-4cGw6Q9sq0gXQKmioEY2Af4tlugkXPwV-oTd5eiQsw9TAB-6_iRzdztI
[yt-cast-receiver.YouTubeApp] Initiate binding...
[yt-cast-receiver.YouTubeApp] Processing initial bind data...
[yt-cast-receiver.YouTubeApp] Command #0 - c received with the following data:
[ 'CA0A6B2FE6AFEE82', '', 8 ]
[yt-cast-receiver.YouTubeApp] Setting SID to CA0A6B2FE6AFEE82
[yt-cast-receiver.YouTubeApp] Command #1 - S received with the following data (gsessionid):
HzKMtrrbkHXmqS2GXjxLiwDvRhggQVEy
[yt-cast-receiver.YouTubeApp] Command #2 - loungeStatus received but not going to be handled. Skipping...
Unhandled data:
{
devices: '[{"app":"yt-cast-receiver","capabilities":"que,atp,mus","clientName":"unknown","experiments":"","name":"YouTube Cast Receiver","id":"c8277ac4-ke86-4f8b-8fe2-1236bef43397","type":"LOUNGE_SCREEN","hasCc":"true","receiverIdentityMatchStatus":"IS_RECEIVER"}]',
connectionEventDetails: '{"deviceId":"c8277ac4-ke86-4f8b-8fe2-1236bef43397"}'
}
[yt-cast-receiver.YouTubeApp] Command #3 - getNowPlaying received. Report 'now playing'...
[yt-cast-receiver.YouTubeApp] Posting bind data:
{ count: '1', ofs: '1', req0__sc: 'noop' }
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 1)
[yt-cast-receiver.YouTubeApp] Registering pairing code with the following data:
URLSearchParams {
'access_type' => 'permanent',
'app' => 'yt-cast-receiver',
'pairing_code' => '0e33658a-14a9-42ed-9d5d-c05a0ca5090e',
'screen_id' => '14mfjd52mmrdfqbc3ach9jq5kc',
'screen_name' => 'YouTube Cast Receiver' }
[yt-cast-receiver.YouTubeApp] Registered pairing code: 0e33658a-14a9-42ed-9d5d-c05a0ca5090e
[yt-cast-receiver.CommandListener] Started
[yt-cast-receiver.CommandListener] Listening to: https://www.youtube.com/api/lounge/bc/bind?AID=3&CI=0&CVER=1&RID=rpc&SID=CA0A6B2FE6AFEE82&TYPE=xmlhttp&VER=8&app=yt-cast-receiver&capabilities=que%2Catp%2Cmus&device=LOUNGE_SCREEN&gsessionid=HzKMtrrbkHXmqS2GXjxLiwDvRhggQVEy&id=c8277ac4-ke86-4f8b-8fe2-1236bef43397&loungeIdToken=AGdO5p-YS_eaing09eTTzzpkt9cbPfPGE9RJNySvOd0yP343QoBPe6yvRtCCc4-4cGw6Q9sq0gXQKmioEY2Af4tlugkXPwV-oTd5eiQsw9TAB-6_iRzdztI&mdxVersion=2&name=YouTube%20Cast%20Receiver&t=1&theme=cl&v=2&zx=xxxxxxxxxxxx
[yt-cast-receiver.YouTubeApp] Launched
dial: returning pid 10622eba-75ad-42b3-bf60-6d8206678569
[yt-cast-receiver.YouTubeApp] Command #5 - loungeStatus received but not going to be handled. Skipping...
Unhandled data:
{
devices: '[{"app":"yt-cast-receiver","capabilities":"que,atp,mus","clientName":"unknown","experiments":"","name":"YouTube Cast Receiver","id":"c8277ac4-ke86-4f8b-8fe2-1236bef43397","type":"LOUNGE_SCREEN","hasCc":"true","receiverIdentityMatchStatus":"IS_RECEIVER"},{"app":"youtube-desktop","capabilities":"que,mus","clientName":"web","experiments":"","userAvatarUri":"https://yt3.ggpht.com/yti/ANoDKi57LF-NNrV8y4wTjR4NtOzILudUPtzZq25KDg\\u003ds240","type":"REMOTE_CONTROL","localChannelEncryptionKey":"hVJZYZ9qzjwRoaNThPTL3LklYCgKGtMvaXI8mIOt2gY","pairingType":"unknown","name":"Desktop","obfuscatedGaiaId":"107185610102114055140","id":"ea29dced-9e96-4687-adda-70502b371149","user":"Piotr","receiverIdentityMatchStatus":"DOES_NOT_MATCH_RECEIVER"}]',
connectionEventDetails: '{"ui":"true","hasInitialPlayback":"true","deviceId":"ea29dced-9e96-4687-adda-70502b371149"}'
}
[yt-cast-receiver.YouTubeApp] Command #6 - remoteConnected received with the following client data:
{
app: 'youtube-desktop',
pairingType: 'unknown',
capabilities: 'que,mus',
ui: 'true',
clientName: 'web',
experiments: '',
name: 'Desktop',
id: 'ea29dced-9e96-4687-adda-70502b371149',
type: 'REMOTE_CONTROL',
device: '{"app":"youtube-desktop","pairingType":"unknown","capabilities":"que,mus","clientName":"web","experiments":"","name":"Desktop","id":"ea29dced-9e96-4687-adda-70502b371149","type":"REMOTE_CONTROL","receiverIdentityMatchStatus":"DOES_NOT_MATCH_RECEIVER"}',
receiverIdentityMatchStatus: 'DOES_NOT_MATCH_RECEIVER'
}
[yt-cast-receiver.YouTubeApp] Client does not have autoplay capability. Autoplay support disabled.
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '2',
req0__sc: 'onAutoplayModeChanged',
req0_autoplayMode: 'UNSUPPORTED'
}
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 2)
[yt-cast-receiver.YouTubeApp] Refresh autoplay Up Next
[yt-cast-receiver.YouTubeApp] Posting bind data:
{ count: '1', ofs: '3', req0__sc: 'autoplayUpNext' }
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 3)
info: [ytcr] ***** Connected *****
info: CoreCommandRouter::getUIConfigOnPlugin
[yt-cast-receiver.YouTubeApp] Command #7 - setPlaylist received with the following data:
{
listId: 'RQZyz9pzbWk-xEHDAjaLfNz83csUU',
currentTime: '11',
ctt: 'APmki7QWdSajgT1hr8uHv2YT6nOKJnaxAmPD69sLQ0L6wfniEhVcW6SqWCSKjAx1gjYhpjVdpWWRwv0fmHiDi8K4J2zWw3uaBAAejSsC2Wb9Et-a_OPUwNkeaX0jP7MYBob7qxyVGvEc',
eventDetails: '{"eventType":"PLAYLIST_SET","userAvatarUri":"https://yt3.ggpht.com/yti/ANoDKi57LF-NNrV8y4wTjR4NtOzILudUPtzZq25KDg\\u003ds240","user":"Piotr","videoIds":["cRlV0DGOVsM"]}',
sourceDeviceType: 'REMOTE_CONTROL',
clickTrackingParams: 'CAAQu2kiEwjq2aq9sqzxAhUEHbIKHWmqBa4=',
videoId: 'cRlV0DGOVsM',
videoIds: 'cRlV0DGOVsM',
currentIndex: '0'
}
[yt-cast-receiver.YouTubeApp] Requesting player to play video ID cRlV0DGOVsM at position 11s
[yt-cast-receiver.YouTubeApp] Reporting change in player state...
info: CoreCommandRouter::volumioGetState
[MPDPlayer] Play cRlV0DGOVsM at position 11s
[MPDPlayer] is asleep - returning stopped status
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '4',
req0__sc: 'onStateChange',
req0_currentTime: '0',
req0_duration: '0',
req0_cpn: 'foo',
req0_loadedTime: '0',
req0_state: '3',
req0_seekableStartTime: '0',
req0_seekableEndTime: '0'
}
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 4)
[MPDPlayer] An error occurred while loading track:
MinigetError: Status code: 404
at ClientRequest. (/data/plugins/music_service/ytcr/node_modules/miniget/dist/index.js:210:27)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at HTTPParser.execute ()
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23) {
statusCode: 404
}
Error: Status code: 404
at ClientRequest. (/data/plugins/music_service/ytcr/node_modules/miniget/dist/index.js:210:27)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at HTTPParser.execute ()
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
[yt-cast-receiver.YouTubeApp] Command #8 - getVolume received. Reporting volume...
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '5',
req0__sc: 'onVolumeChanged',
req0_volume: '0',
req0_muted: 'false'
}
info: Ignoring MPD Status Update
info: Ignoring MPD Status Update
error: Upnp client error: Error: This socket has been ended by the other party
[MPDPlayer.MPDEventListener] Event received for subsystem 'playlist'
[MPDPlayer.MPDEventListener] Calling handler.handle()...
[MPDPlayer.MPDEventHandler] Number of callbacks for subsystem playlist: 0
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 5)
[yt-cast-receiver.YouTubeApp] Command #9 - getSubtitlesTrack received but not going to be handled. Skipping...
[yt-cast-receiver.YouTubeApp] Keeping alive...
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '6',
req0__sc: 'nowPlaying',
req0_currentTime: '0',
req0_duration: '0',
req0_cpn: 'foo',
req0_loadedTime: '0',
req0_state: '3',
req0_seekableStartTime: '0',
req0_seekableEndTime: '0',
req0_listId: 'RQZyz9pzbWk-xEHDAjaLfNz83csUU',
req0_videoId: 'cRlV0DGOVsM',
req0_currentIndex: '0'
}
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 6)
[yt-cast-receiver.YouTubeApp] Keeping alive...
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '7',
req0__sc: 'nowPlaying',
req0_currentTime: '0',
req0_duration: '0',
req0_cpn: 'foo',
req0_loadedTime: '0',
req0_state: '3',
req0_seekableStartTime: '0',
req0_seekableEndTime: '0',
req0_listId: 'RQZyz9pzbWk-xEHDAjaLfNz83csUU',
req0_videoId: 'cRlV0DGOVsM',
req0_currentIndex: '0'
}
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 7)
[yt-cast-receiver.YouTubeApp] Keeping alive...
[yt-cast-receiver.YouTubeApp] Posting bind data:
{
count: '1',
ofs: '8',
req0__sc: 'nowPlaying',
req0_currentTime: '0',
req0_duration: '0',
req0_cpn: 'foo',
req0_loadedTime: '0',
req0_state: '3',
req0_seekableStartTime: '0',
req0_seekableEndTime: '0',
req0_listId: 'RQZyz9pzbWk-xEHDAjaLfNz83csUU',
req0_videoId: 'cRlV0DGOVsM',
req0_currentIndex: '0'
}
[yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 8)
and of course youtube is not played…