mas94uk / upnptube Goto Github PK
View Code? Open in Web Editor NEWCast from YouTube app to DLNA/UPNP renderers
License: GNU General Public License v3.0
Cast from YouTube app to DLNA/UPNP renderers
License: GNU General Public License v3.0
When trying to cast from the youtube app to my symfonisk frame I get this error with a random video using the docker installation:
upnp-tube | [yt-cast-receiver] Listening on port 3004
upnp-tube | [yt-cast-receiver.YouTubeApp] Launching...
upnp-tube | [yt-cast-receiver.YouTubeApp] Generated screen Id: hcf4qvbnu8qrll36fqfcikp9lp
upnp-tube | [yt-cast-receiver.YouTubeApp] Obtained lounge token: AGdO5p9Ohwcp2bs17PIi35agjZEPdikqwDsY3MqdJE7Lq12Pf6GU4RMosm7Cp_OFgBW47BIpy4xEL_MkDtEqzxOk4m-a51s7mSvJT44MK8H9q65onyhoor8
upnp-tube | [yt-cast-receiver.YouTubeApp] Initiate binding...
upnp-tube | [yt-cast-receiver.YouTubeApp] Processing initial bind data...
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #0 - c received with the following data:
upnp-tube | [ 'F7C44A1B09FF27B0', '', 8 ]
upnp-tube | [yt-cast-receiver.YouTubeApp] Setting SID to F7C44A1B09FF27B0
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #1 - S received with the following data (gsessionid):
upnp-tube | TjacGNCzljedHuF00g9E8B5MRMotJfdG
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #2 - loungeStatus received but not going to be handled. Skipping...
upnp-tube | Unhandled data:
upnp-tube | {
upnp-tube | queueId: 'RQgnjDM7pgUnROMqxy_ZZ4uXwMY_Y',
upnp-tube | devices: '[{"app":"yt-cast-receiver","capabilities":"que,atp,mus","clientName":"unknown","experiments":"","name":"YouTube Cast Receiver","theme":"cl","id":"c8277ac4-ke86-4f8b-8fe2-1236bef43397","type":"LOUNGE_SCREEN","hasCc":"true","receiverIdentityMatchStatus":"IS_RECEIVER"}]',
upnp-tube | connectionEventDetails: '{"deviceId":"c8277ac4-ke86-4f8b-8fe2-1236bef43397"}'
upnp-tube | }
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #3 - getNowPlaying received. Report 'now playing'...
upnp-tube | [yt-cast-receiver.YouTubeApp] Posting bind data:
upnp-tube | { count: '1', ofs: '1', req0__sc: 'noop' }
upnp-tube | [yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 1)
upnp-tube | [yt-cast-receiver.YouTubeApp] Registering pairing code with the following data:
upnp-tube | URLSearchParams {
upnp-tube | 'access_type' => 'permanent',
upnp-tube | 'app' => 'yt-cast-receiver',
upnp-tube | 'pairing_code' => 'b5920a62-bf1c-4856-afc7-17b6201ac878',
upnp-tube | 'screen_id' => 'hcf4qvbnu8qrll36fqfcikp9lp',
upnp-tube | 'screen_name' => 'YouTube Cast Receiver',
upnp-tube | 'device_id' => '69bba860-25a0-431d-b9c2-02a44c003446' }
upnp-tube | [yt-cast-receiver.YouTubeApp] Registered pairing code: b5920a62-bf1c-4856-afc7-17b6201ac878
upnp-tube | [yt-cast-receiver.CommandListener] Started
upnp-tube | [yt-cast-receiver.CommandListener] Listening to: https://www.youtube.com/api/lounge/bc/bind?AID=3&CI=0&CVER=1&RID=rpc&SID=F7C44A1B09FF27B0&TYPE=xmlhttp&VER=8&app=yt-cast-receiver&capabilities=que%2Catp%2Cmus&device=LOUNGE_SCREEN&gsessionid=TjacGNCzljedHuF00g9E8B5MRMotJfdG&id=c8277ac4-ke86-4f8b-8fe2-1236bef43397&loungeIdToken=AGdO5p9Ohwcp2bs17PIi35agjZEPdikqwDsY3MqdJE7Lq12Pf6GU4RMosm7Cp_OFgBW47BIpy4xEL_MkDtEqzxOk4m-a51s7mSvJT44MK8H9q65onyhoor8&mdxVersion=2&name=YouTube%20Cast%20Receiver&t=1&theme=cl&v=2&zx=xxxxxxxxxxxx
upnp-tube | [yt-cast-receiver.YouTubeApp] Launched
upnp-tube | dial: returning pid 3ee5f0ec-0c5a-4af1-855c-ce490bf33eae
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #4 - noop received but not going to be handled. Skipping...
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #5 - loungeStatus received but not going to be handled. Skipping...
upnp-tube | Unhandled data:
upnp-tube | {
upnp-tube | queueId: 'RQgnjDM7pgUnROMqxy_ZZ4uXwMY_Y',
upnp-tube | devices: '[{"app":"yt-cast-receiver","capabilities":"que,atp,mus","clientName":"unknown","experiments":"","name":"YouTube Cast Receiver","theme":"cl","id":"c8277ac4-ke86-4f8b-8fe2-1236bef43397","type":"LOUNGE_SCREEN","hasCc":"true","receiverIdentityMatchStatus":"IS_RECEIVER"},{"app":"android-phone-19.12.36","capabilities":"que,dsdtr,atp,mus","clientName":"android","experiments":"","userAvatarUri":"https://yt3.ggpht.com/yti/ANjgQV_xRSqJlR4npof2giBPBJVKAa2z_jUoZyqpkn1OWAI=s240","type":"REMOTE_CONTROL","localChannelEncryptionKey":"h8eeAXctgDe4mkP2zX8geh9gGyW5vyjgKdIXU6d9L74","pairingType":"dial","deviceContext":"{\\"user_agent\\":\\"com.google.android.youtube\\\\/19.12.36(Linux; U; Android 14; de_DE; Pixel 7 Pro Build\\\\/AP1A.240405.002)\\",\\"window_width_points\\":411,\\"window_height_points\\":826,\\"os_name\\":\\"Android\\",\\"ms\\":\\"CtkDmsA_ATEaPwF_uwiQNYhpOv6jcbeR4akuaWVv6pf0FCxeGJzQvfsfIBjssO-mGmzlFHbGvetmlJxXgqPpFsQlOF0ZzLcNSBKQAwFQ_CACkP7m6vsPOw9l6eGGKQyzIV90gRIeV2D583G-HeXS4Jedadg8MzRVYwFLACw2_tXfSeUzRZQehpDBURe1rljF5agCGR2LrxxMUkQYf2SjndozwDAZlYpMcDRyAk6ZxfnlX7kxxUOPFlZtUxOj1S5fIN7S8K9w8Kg1WoeIkFOObhH25OtPKcZlFMEyf1bSbiXdVU5HZ4ruwb2wg6cUOgpOfb4Q3_nUSvmA5La04AwU4CRVni8AW7-5S2K2zSPebg_9XiqT7jxPCViDtKdTNtFBS_ZhzVbGUw742uS0yatVWs5kNxAcpcznbe48OotZM2tRjonMLdAFr-yS_q2d1sx8LFtpfnd6Jxv1bEPHMReRcp7OX0t6EDLK2okBdQ5uhBi1MYSUasvxeWwLlvoCVDaAlfH9J4s9JaC1wF53OSP1rNxRJMM0c7eLSyDtW3f2tM7iLhOn2dm7loi_kvk7zG0OYqIAemXHpjg5QQ99U853Pzzww3NzCg7Xn94l5kQeJJjHbxSyTxf9NMmC60QgBA\\",\\"advertising_id\\":\\"a82b2a72-c3bd-4732-8778-607906fabc0e\\",\\"limit_ad_tracking\\":false}","name":"GOOGLE Pixel 7 Pro","obfuscatedGaiaId":"104550512507233797602","theme":"cl","id":"ftqqn23tins8v47ope9gridgq0","user":"Eric","receiverIdentityMatchStatus":"DOES_NOT_MATCH_RECEIVER"}]',
upnp-tube | connectionEventDetails: '{"ui":"true","hasInitialPlayback":"true","deviceId":"ftqqn23tins8v47ope9gridgq0"}'
upnp-tube | }
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #6 - remoteConnected received with the following client data:
upnp-tube | {
upnp-tube | app: 'android-phone-19.12.36',
upnp-tube | capabilities: 'que,dsdtr,atp,mus',
upnp-tube | clientName: 'android',
upnp-tube | experiments: '',
upnp-tube | type: 'REMOTE_CONTROL',
upnp-tube | pairingType: 'dial',
upnp-tube | ui: 'true',
upnp-tube | deviceContext: '{"user_agent":"com.google.android.youtube\\/19.12.36(Linux; U; Android 14; de_DE; Pixel 7 Pro Build\\/AP1A.240405.002)","window_width_points":411,"window_height_points":826,"os_name":"Android","ms":"CtkDmsA_ATEaPwF_uwiQNYhpOv6jcbeR4akuaWVv6pf0FCxeGJzQvfsfIBjssO-mGmzlFHbGvetmlJxXgqPpFsQlOF0ZzLcNSBKQAwFQ_CACkP7m6vsPOw9l6eGGKQyzIV90gRIeV2D583G-HeXS4Jedadg8MzRVYwFLACw2_tXfSeUzRZQehpDBURe1rljF5agCGR2LrxxMUkQYf2SjndozwDAZlYpMcDRyAk6ZxfnlX7kxxUOPFlZtUxOj1S5fIN7S8K9w8Kg1WoeIkFOObhH25OtPKcZlFMEyf1bSbiXdVU5HZ4ruwb2wg6cUOgpOfb4Q3_nUSvmA5La04AwU4CRVni8AW7-5S2K2zSPebg_9XiqT7jxPCViDtKdTNtFBS_ZhzVbGUw742uS0yatVWs5kNxAcpcznbe48OotZM2tRjonMLdAFr-yS_q2d1sx8LFtpfnd6Jxv1bEPHMReRcp7OX0t6EDLK2okBdQ5uhBi1MYSUasvxeWwLlvoCVDaAlfH9J4s9JaC1wF53OSP1rNxRJMM0c7eLSyDtW3f2tM7iLhOn2dm7loi_kvk7zG0OYqIAemXHpjg5QQ99U853Pzzww3NzCg7Xn94l5kQeJJjHbxSyTxf9NMmC60QgBA","advertising_id":"a82b2a72-c3bd-4732-8778-607906fabc0e","limit_ad_tracking":false}',
upnp-tube | name: 'GOOGLE Pixel 7 Pro',
upnp-tube | theme: 'cl',
upnp-tube | id: 'ftqqn23tins8v47ope9gridgq0',
upnp-tube | device: '{"app":"android-phone-19.12.36","pairingType":"dial","capabilities":"que,dsdtr,atp,mus","clientName":"android","deviceContext":"{\\"user_agent\\":\\"com.google.android.youtube\\\\/19.12.36(Linux; U; Android 14; de_DE; Pixel 7 Pro Build\\\\/AP1A.240405.002)\\",\\"window_width_points\\":411,\\"window_height_points\\":826,\\"os_name\\":\\"Android\\",\\"ms\\":\\"CtkDmsA_ATEaPwF_uwiQNYhpOv6jcbeR4akuaWVv6pf0FCxeGJzQvfsfIBjssO-mGmzlFHbGvetmlJxXgqPpFsQlOF0ZzLcNSBKQAwFQ_CACkP7m6vsPOw9l6eGGKQyzIV90gRIeV2D583G-HeXS4Jedadg8MzRVYwFLACw2_tXfSeUzRZQehpDBURe1rljF5agCGR2LrxxMUkQYf2SjndozwDAZlYpMcDRyAk6ZxfnlX7kxxUOPFlZtUxOj1S5fIN7S8K9w8Kg1WoeIkFOObhH25OtPKcZlFMEyf1bSbiXdVU5HZ4ruwb2wg6cUOgpOfb4Q3_nUSvmA5La04AwU4CRVni8AW7-5S2K2zSPebg_9XiqT7jxPCViDtKdTNtFBS_ZhzVbGUw742uS0yatVWs5kNxAcpcznbe48OotZM2tRjonMLdAFr-yS_q2d1sx8LFtpfnd6Jxv1bEPHMReRcp7OX0t6EDLK2okBdQ5uhBi1MYSUasvxeWwLlvoCVDaAlfH9J4s9JaC1wF53OSP1rNxRJMM0c7eLSyDtW3f2tM7iLhOn2dm7loi_kvk7zG0OYqIAemXHpjg5QQ99U853Pzzww3NzCg7Xn94l5kQeJJjHbxSyTxf9NMmC60QgBA\\",\\"advertising_id\\":\\"a82b2a72-c3bd-4732-8778-607906fabc0e\\",\\"limit_ad_tracking\\":false}","experiments":"","name":"GOOGLE Pixel 7 Pro","theme":"cl","id":"ftqqn23tins8v47ope9gridgq0","type":"REMOTE_CONTROL","receiverIdentityMatchStatus":"DOES_NOT_MATCH_RECEIVER"}',
upnp-tube | receiverIdentityMatchStatus: 'DOES_NOT_MATCH_RECEIVER'
upnp-tube | }
upnp-tube | [yt-cast-receiver.YouTubeApp] Posting bind data:
upnp-tube | {
upnp-tube | count: '1',
upnp-tube | ofs: '2',
upnp-tube | req0__sc: 'onAutoplayModeChanged',
upnp-tube | req0_autoplayMode: 'ENABLED'
upnp-tube | }
upnp-tube | [yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 2)
upnp-tube | [yt-cast-receiver.YouTubeApp] Refresh autoplay Up Next
upnp-tube | [yt-cast-receiver.YouTubeApp] Posting bind data:
upnp-tube | { count: '1', ofs: '3', req0__sc: 'autoplayUpNext' }
upnp-tube | [yt-cast-receiver.YouTubeApp] postBind() completed (ofs: 3)
upnp-tube | Connected to GOOGLE Pixel 7 Pro
upnp-tube | [object Object]
upnp-tube | [yt-cast-receiver.YouTubeApp] Command #7 - setPlaylist received with the following data:
upnp-tube | {
upnp-tube | ctt: 'APmki7TfhYCSuROdfCSbvCBQ3Jy3QSOlmKzFEZN1e4th32FLkrpOj5qFlf5AoAQZYaq1ebGMGKnMA58pSmUUqXXiq0U81V5ZEybzmPXZhcIeNDUofO8-1c6nEe3jOY-jN50JDQ2Y_gFM',
upnp-tube | sourceDeviceType: 'REMOTE_CONTROL',
upnp-tube | videoId: 'uRG37eNYi2k',
upnp-tube | playerParams: '',
upnp-tube | params: '',
upnp-tube | currentIndex: '0',
upnp-tube | listId: 'RQgnjDM7pgUnROMqxy_ZZ4uXwMY_Y',
upnp-tube | currentTime: '1750',
upnp-tube | eventDetails: '{"videoId":"uRG37eNYi2k","eventType":"VIDEO_ADDED","userAvatarUri":"https://yt3.ggpht.com/yti/ANjgQV_xRSqJlR4npof2giBPBJVKAa2z_jUoZyqpkn1OWAI=s240","user":"Eric"}',
upnp-tube | clickTrackingParams: 'CAAQhGciEwjtgpHnkLCFAxVsHAYAHZBoCL5I6Zbimt797Yi5AVoPRkV3aGF0X3RvX3dhdGNomgECCDE=',
upnp-tube | audioOnly: 'false',
upnp-tube | prioritizeMobileSenderPlaybackStateOnConnection: 'true',
upnp-tube | videoIds: 'uRG37eNYi2k',
upnp-tube | csn: 'TKMF8A'
upnp-tube | }
upnp-tube | [yt-cast-receiver.YouTubeApp] Requesting player to play video ID uRG37eNYi2k at position 1750s
upnp-tube | [yt-cast-receiver.YouTubeApp] Reporting change in player state...
upnp-tube | [๐ 192.168.178.196 - SYMFONISK Picture frame - RINCON_542A1B5239EE01400]: getPosition
upnp-tube | [๐ 192.168.178.196 - SYMFONISK Picture frame - RINCON_542A1B5239EE01400]: getDuration
upnp-tube | [๐ 192.168.178.196 - SYMFONISK Picture frame - RINCON_542A1B5239EE01400]: Play uRG37eNYi2k at position 1750s
upnp-tube | /tmp/upnpTube/node_modules/upnp-client-ts/dist/main.js:826
upnp-tube | if (error instanceof (0, $893004f96e9f65ff$export$a9a483eb6d8951f9) && error.extra.errorCode) throw new (0, $893004f96e9f65ff$export$f19ee4bfd5d67d71)(error.extra.errorCode);
upnp-tube | ^
upnp-tube |
upnp-tube | TypeError: Cannot read properties of undefined (reading 'errorCode')
upnp-tube | at /tmp/upnpTube/node_modules/upnp-client-ts/dist/main.js:826:100
upnp-tube | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
upnp-tube | at async $8c0f11aae7c8eb13$export$4ac5edbbf5e258df.getPosition (/tmp/upnpTube/node_modules/upnp-client-ts/dist/main.js:847:30)
upnp-tube |
upnp-tube | Node.js v21.7.2
Sorry took me a long time to finally get around pushing my fork.
Anways here it is:
https://github.com/dgalli1/ytm-mpd
In this mpd version seeking seems to work, and the playlist is more stable aswell. As i did this over 2 months ago i have no clue what i changed.
But it mostly has to do white requesting the next song once it's finished.
https://github.com/dgalli1/ytm-mpd/blob/a27715e5f9618da454f53c25f45f879e4e4b159f/renderer.js#L46
Following the instructions I've created a Dockerfile for testing this project
FROM alpine:3.17
RUN apk add --no-cache \
git \
npm \
yt-dlp
RUN mkdir -p /tmp/upnpTube \
&& cd /tmp/upnpTube \
&& npm install https://github.com/mas94uk/upnpTube \
&& npm link
ENTRYPOINT [ "upnpTube" ]
I also created a ubuntu version to make sure this isn't a alpine issue:
FROM ubuntu:rolling
RUN apt update && apt install --no-install-recommends -y \
git \
npm \
yt-dlp
RUN mkdir -p /tmp/upnpTube \
&& cd /tmp/upnpTube \
&& npm install https://github.com/mas94uk/upnpTube \
&& npm link
ENTRYPOINT [ "upnpTube" ]
Sadly the build fails with the following error:
...
44 timing command:link Completed in 98ms
45 verbose stack TypeError: Cannot destructure property 'name' of '.for' as it is undefined.
45 verbose stack at [diffTrees] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:336:20)
45 verbose stack at Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:157:27)
45 verbose stack at async Link.linkPkg (/usr/lib/node_modules/npm/lib/commands/link.js:146:5)
45 verbose stack at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:133:5)
46 verbose cwd /tmp/upnpTube
47 verbose Linux 5.4.0-135-generic
48 verbose node v19.3.0
49 verbose npm v9.1.2
50 error Cannot destructure property 'name' of '.for' as it is undefined.
I've never done anything with npm or js so I'm not sure what to do here.
I've been trying to get this running under windows 10, and have successfully installed npm and nodejs natively. I've successfully followed the commands up to "npm link". It fails saying that "Cannot destructure property 'name' of '.for' as it is undefined."
here is the output from cmd.
S:\My Applications\upnptube>npm install https://github.com/mas94uk/upnpTube
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
added 168 packages in 14s
10 packages are looking for funding
run `npm fund` for details
S:\My Applications\upnptube>npm link
npm ERR! Cannot destructure property 'name' of '.for' as it is undefined.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Brian\AppData\Local\npm-cache\_logs\2023-03-04T02_42_56_419Z-debug-0.log
2023-03-04T02_42_56_419Z-debug-0.log
is it possible
to make this run under windows? I'm attaching the npm debug log. Any advice to make this work? Thanks
It would be nice if we could add a whole playlist to a DLNA Render.
This would make it easy to allow next and Previous to work directly from the player without adding anything.
But not every UPNP Device supports this, so it would probably have to be activatable/deactivatable.
root@raspberrypi:/# git clone [email protected]:mas94uk/upnpTube.git
Cloning into 'upnpTube'...
The authenticity of host 'github.com (140.82.121.3)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
While trying to cast from youtube app on phone. I get this:
Connected to Phone
[object Object]
[yt-cast-receiver.YouTubeApp] Command #7 - setPlaylist received with the following data:
{
ctt: 'APmki7Qd8zMFAQjKvM689uWBanoFPAMXHfSF4h9FT_DycM1T7FRVSRXlDsc9jkZaE20qzg3R2By6R_LFl2OI_JRzIp-qGeE9TbvfCKEvV7_b60fQCLit9HqL9T6NV2AZWxHrCKKXPBu8',
sourceDeviceType: 'REMOTE_CONTROL',
videoId: 'LXb3EKWsInQ',
playerParams: 'YADIAQCQAgE=',
params: 'qgMKdGVzdCB2aWRlb7oDCgiH9_H78u6zoAu6AwsIqbb78sSLiKSaAboDCgjYuOuOmtCSsx66AwsIi4_3mKftm7zCAboDCwiygoKh-6Wb4cUBugMKCPjg9Z7t04KOI7oDCwiUprj_75yz3rQBugMLCPrl2Kn83u7IvAG6AwsIkMuEjevxwqvAAboDCgj6_cDVzdKax2K6AwoI7sG1mOGTv-x_ugMKCJm2idy6xuSJLroDCwirm--h-eWky7ABugMLCJ_U4uLJyYPI2AG6AwsIwM-f1Kvc6YP7AboDCgiut5Wy4_G4zQ26AwsIuvDnn9Su-9zXAboDCgjzyNrmgv307yW6AwoIna2NlpTAztZ1ugMLCOmX85rz4N22uQG6AwoI07DFw6epyL4FugMLCOvrp4fGsO7L6AG6AwoImKmH9IPtpKQeugMKCMW5krbs1aTcI7oDCgiCqpzp8-Dt5Wi6AwoI75DF8tKUsZlMugMLCPuN4vSfv6WAzAG6AwsI4YDAqq7E0r3YAboDCgj9i7fchIGGhHO6AwoItd2dl6Knj9sBugMLCJLklfnR-6Xz2gG6AwsIr7m63ITe1qiUAboDCgiT0_Sx2aqfrUm6AwoIgKvS7bOyhotn8gMFDSGWPj8=',
currentIndex: '0',
listId: 'RQ3UXfZm75nwvmi4wHxuYjOcHKZD4',
currentTime: '0',
eventDetails: '{"videoId":"LXb3EKWsInQ","eventType":"VIDEO_ADDED","userAvatarUri":"https://yt3.ggpht.com/yti/AHXOFjUhKYVkUodD2sXd3edffcFK2pF6faW9oozkcw=s240","user":"Guy"}',
clickTrackingParams: '',
audioOnly: 'false',
prioritizeMobileSenderPlaybackStateOnConnection: 'true',
videoIds: 'LXb3EKWsInQ',
csn: 'tyoRlz9ZLXoSlKAMI9g77Q=='
}
[yt-cast-receiver.YouTubeApp] Requesting player to play video ID LXb3EKWsInQ at position 0s
[yt-cast-receiver.YouTubeApp] Reporting change in player state...
[๐ Living Room (Denon Denon AVR-X3400H)]: getPosition
[๐ Living Room (Denon Denon AVR-X3400H)]: getDuration
[๐ Living Room (Denon Denon AVR-X3400H)]: Play LXb3EKWsInQ at position 0s
[๐ Living Room (Denon Denon AVR-X3400H)]: getPosition error:
Error: Service urn:upnp-org:serviceId:AVTransport not provided by device
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:63:17
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:38:7
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 'ENOSERVICE'
}
[๐ Living Room (Denon Denon AVR-X3400H)]: getDuration error:
Error: Service urn:upnp-org:serviceId:AVTransport not provided by device
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:63:17
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:38:7
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 'ENOSERVICE'
}
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
Error: Service urn:upnp-org:serviceId:AVTransport not provided by device
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:63:17
at /home/user/src/upnpTube/node_modules/upnp-device-client/index.js:38:7
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
code: 'ENOSERVICE'
}
Node.js v19.7.0`
Maintainer has now accepted the pull request, so my branch with the fix is no longer needed.
Go back to the main project.
I figured out how to make youtube-music work with yt-cast-receiver.
But there are some issues.
Youtube Music doesn't support atp (automaticly play the next song once one finished)
We would have to notified when the upnp renderer stopped playing so that we can send the next song to it by calling
https://github.com/patrickkfkan/yt-cast-receiver/blob/f228b5e3c06bef233fcca00bbaaf01003852d4ed/lib/player.js#L75
I believe this is not necessary for default youtube implementation, but I didn't test it yet.
If this is only necessary for yotube-music, we would have to sniff the client from the initial bind request.
package-lock.json should be committed in a node project.
Also i would recommend to add a mention of the used node version. ( node -v > .nvmrc)
When you're starting yt-dlp via exec it sometimes fails when the video id starts with "-" -> yt-dlp will interpret this as a new command. the videoId should be escaped with ""
`(node:31596) UnhandledPromiseRejectionWarning: Error: Command failed: youtube-dl -f bestaudio[ext=m4a] --get-url -86Z9tV_FWs
Usage: youtube-dl [OPTIONS] URL [URL...]
youtube-dl: error: no such option: -8
`
Various things:
[Resource explaining the protocol](https://sethlopez.me/article/writing-a-upnp-control-point-in-javascript-part-two/
Possibly there are better SSDP modules, or perhaps add ability to listen to annoucements/goodbyes to the existing module.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.