{"_id":"@amilajack/castv2-client","_rev":"4-c47df07ab6d778da4210e0ed77f4dcc4","name":"@amilajack/castv2-client","dist-tags":{"latest":"0.0.1","next":"0.0.2-2"},"versions":{"0.0.0":{"name":"@amilajack/castv2-client","version":"0.0.0","description":"A Chromecast client based on the new (CASTV2) protocol","author":{"name":"thibauts"},"license":"MIT","main":"index.js","dependencies":{"castv2":"~0.1.4","chromecast-scanner":"^0.5.0","debug":"^2.2.0"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","array-find":"^1.0.0","babel-jest":"^23.4.2","cross-env":"^5.2.0","dns-txt":"^2.0.2","eslint":"^5.5.0","eslint-config-bliss":"^2.2.0","jest":"^23.5.0","mocha":"^3.2.0","multicast-dns":"^6.1.0","synp":"^1.3.1","util":"^0.10.3"},"scripts":{"build":"cross-env NODE_ENV=production rm -rf lib && babel src --out-dir lib","lint":"eslint .","preversion":"yarn update-pkg-lock && yarn test","test":"jest .","update-pkg-lock":"rm package-lock.json && synp --source-file yarn.lock"},"repository":{"type":"git","url":"git://github.com/thibauts/node-castv2-client.git"},"keywords":["chromecast","castv2"],"jest":{"testEnvironment":"node"},"resolutions":{"babel-core":"7.0.0-bridge.0"},"gitHead":"817659f5c2075a99de12573547d6c0f5ec5faf53","bugs":{"url":"https://github.com/thibauts/node-castv2-client/issues"},"homepage":"https://github.com/thibauts/node-castv2-client#readme","_id":"@amilajack/castv2-client@0.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"dist":{"integrity":"sha512-GksRdFZp3FVNVsqa7QvN1+pETeekid8YOG1sZ/PXv1JCBXZwU9S7Qg4RV5FJVIXEtoq14Yvlyqyqrjo18e72Uw==","shasum":"f686abeca7ce4843a66b478032372701b884082a","tarball":"https://registry.npmjs.org/@amilajack/castv2-client/-/castv2-client-0.0.0.tgz","fileCount":15,"unpackedSize":32454,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbjO5hCRA9TVsSAnZWagAAaW8P/3Q7IXqJaermOpyfvMXr\nEr1zZLV+kfNBlGE5B7Ci5DoSNQwL4LBL5MXvhxNnmN2/myz426hOJLeSdZ3k\nJpWuASF1KWJDCf6kcRuxEONPfT2cpEMsVxMrSlwdUlWt+olJJU50vygkRE+2\nOVvL4NDyp22HXelgjCxc6IHXxctAfna6Xp1auCoZsqJrWjKDKzsfSitUciB2\nV8JNc2BCgA11+HKAJJYG5xzfCwyo0douwRO/vXSljev2P07FhSx8oStviZF2\nml8KXVUvyAPGBM0v5TJtxWvLFEInXslNxvf7d/Z8yBvw1X9dh2lS0NGMIXGF\nuOxxusgPUobRUUWzfy2+IPZzCyj2+KZ5dPQwRSJfx9p93cEpqKqOaX/tiBea\n1kOBP1ZDvlImTb/IJYliJcsq5a60AWFoU4qP29yqqLhBGRWQ5v7RgVkkdJt4\nSgX2kBSDkzLaLc49EIRuVvbnYgC+4eppFRuy6oWPHEhjLm1Gq809Kgy8gxAF\n7t5wQu6kY9GM9UYhjW8T3kWnmPMFM/AiNonkxcEkwjH6zTCOfnpw2clVigwd\nX0nSHiyyIjPnNF3V+kLaVVUQWx898GKX0e5u2CsqkDGEHES37+lKSsujsZT3\ndulDqlD+zuaqC7OLv9EAGBk4xyF9ovoQ7pzu1QI3rNzjNqNk1/LN9lLdBUoe\ngBda\r\n=yhvi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDf/JyLMiuSRo2ORaS9g5+2O0olL0Clnx2BVPxKnvKK/QIhAIbVE+9ZLvGqvcYnpdowz7Z4dCwV6lciIGN2LvZbMVOt"}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/castv2-client_0.0.0_1535962721185_0.7415260876373133"},"_hasShrinkwrap":false},"0.0.1":{"name":"@amilajack/castv2-client","version":"0.0.1","description":"A Chromecast client based on the new (CASTV2) protocol","author":{"name":"thibauts"},"license":"MIT","main":"lib/index.js","dependencies":{"castv2":"~0.1.9","chromecast-scanner":"^0.5.0","debug":"^3.1.0"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","babel-jest":"^23.4.2","cross-env":"^5.2.0","eslint":"^5.5.0","eslint-config-bliss":"^2.3.0","jest":"^23.5.0","synp":"^1.3.1","util":"^0.11.0"},"scripts":{"build":"cross-env NODE_ENV=production rm -rf lib && babel src --out-dir lib","lint":"eslint .","preversion":"yarn update-pkg-lock && yarn test","test":"jest . --runInBand","update-pkg-lock":"rm package-lock.json && synp --source-file yarn.lock"},"repository":{"type":"git","url":"git://github.com/thibauts/node-castv2-client.git"},"keywords":["chromecast","castv2"],"jest":{"testEnvironment":"node"},"resolutions":{"babel-core":"7.0.0-bridge.0"},"gitHead":"bc3971bd3fdd71ff226bfec545b67612f93f9cbd","bugs":{"url":"https://github.com/thibauts/node-castv2-client/issues"},"homepage":"https://github.com/thibauts/node-castv2-client#readme","_id":"@amilajack/castv2-client@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"dist":{"integrity":"sha512-FSQVi9MLt+0XMACnj9CsOykZ07Ho4jrU2kDiV2emf1TqFCrafTU7yxXRz7vfnR4B9gkYhjmLr729zavQX2vdBg==","shasum":"4ebf9d316db8c76da2fb4b449a5ba5b0562a3c5a","tarball":"https://registry.npmjs.org/@amilajack/castv2-client/-/castv2-client-0.0.1.tgz","fileCount":14,"unpackedSize":31546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbsoeNCRA9TVsSAnZWagAABB8QAJHagoubQ3Zi+QyrM0ZY\nJcu3H2vFXxq4C+nP5lFhv0VkDDzwTMlx9OHZ3q4csV3kki1SFdmyCZtcOQK9\nqAxMUVmCjQyUJybLkeWHMxFPkBb47egEk1aBKe9QRhogNa05P1HNKsohuK9I\nQCsM4zVVScYZUdeH4jjRahZGLhLtA3jxTALYH6tLTxbamSt7/s0DZ5rpWFVB\nIecfr9o6QjHRZqpXfq+Lgz7mcInRm1ym/S9ltZV1lxt+epVU9iC7eTwW4pux\nvOFrzzCn84XDTUbdTLvjX+od4zeZnr+x28EInzTeDi0T7iayJisCaMNqDcbU\nmgeKeHqq9QkYVOR15yeAPExt9u1MJD5sYkrK20lncLGUtIp+9T6ekzkXlJN+\ncdI72ZB7Ff3ATvHwaO6RkUpRu8upJf5L+mPS751ku1kDVCoFkdZXwW5Dhkcw\nozGTAqfKOhZ2WthY+3K8EH4rHGvpN7675Jp+XgOjOYgbP0ONerx1g3z/TQDf\npUn3ErKZpTSbeV4mXtzjEG1WeeYBWkSnBrlhLEDxAvyVbZHfV0CMxHk99hmO\nbgn5e03J62ycZw7EXZDWCkym3rT8lHlhtOWzyKS8JwJiGpW00tOBkJSkiEhp\n55TmZUTAKT54UFc2dnT9qmxHbMNUEEX6rHA6nfvg6hRtVy86/PfOiX644PXO\ngq9N\r\n=2ldO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCj87Kz4VS+np1sI1FZUk+K9mafElZc9S4K+ucmLVIC9QIgd6XSp3mNP9dBO/7Ti6MKhFJ1VLTKmUSt8k9yOIAiTsM="}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/castv2-client_0.0.1_1538426765034_0.2498749014219921"},"_hasShrinkwrap":false},"0.0.2-0":{"name":"@amilajack/castv2-client","version":"0.0.2-0","description":"A Chromecast client based on the new (CASTV2) protocol","author":{"name":"amilajack"},"license":"MIT","main":"lib/index.js","dependencies":{"castv2":"~0.1.9","chromecast-scanner":"^0.5.0","debug":"^4.1.1"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/preset-env":"^7.3.4","@babel/preset-typescript":"^7.3.3","@types/debug":"^4.1.2","@types/node":"^11.11.3","@typescript-eslint/eslint-plugin":"^1.4.2","@typescript-eslint/parser":"^1.4.2","babel-core":"^7.0.0-bridge.0","babel-jest":"^24.5.0","cross-env":"^5.2.0","eslint":"^5.15.2","eslint-config-bliss":"^3.3.0","eslint-import-resolver-typescript":"^1.1.1","jest":"^24.5.0","synp":"^1.4.0","typedoc":"^0.14.2","typescript":"^3.3.3333","util":"^0.11.1"},"scripts":{"build":"cross-env NODE_ENV=production babel src --out-dir dist --extensions \".ts\" --source-maps inline","docs":"rm -rf docs && typedoc ./src --out docs","lint":"eslint --ext .ts --ext .js .","test":"yarn ts && yarn lint && yarn build && yarn spec","ts":"tsc","ts:dec":"yarn ts --declaration"},"repository":{"type":"git","url":"git://github.com/thibauts/node-castv2-client.git"},"keywords":["chromecast","chrome","cast","castv2"],"resolutions":{"babel-core":"7.0.0-bridge.0"},"babel":{"presets":[["@babel/preset-env",{"targets":{"node":10}}],["@babel/preset-typescript",{"allExtensions":true}]]},"eslintConfig":{"extends":["plugin:@typescript-eslint/recommended","prettier","prettier/@typescript-eslint"],"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint","prettier"],"settings":{"import/resolver":{"typescript":{}}}},"jest":{"testEnvironment":"node"},"renovate":{"extends":["bliss"]},"readmeFilename":"README.md","readme":"# castv2-client\n\n> ## 🛠 Status: In Development\n>\n> castv2-client is currently in development. It's on the fast track to a 1.0 release, so we encourage you to use it and give us your feedback, but there are things that haven't been finalized yet and you can expect some changes.\n\n[![Build Status](https://dev.azure.com/amilajack/amilajack/_apis/build/status/amilajack.castv2-client?branchName=master)](https://dev.azure.com/amilajack/amilajack/_build/latest?definitionId=10&branchName=master)\n[![Dependency Status](https://img.shields.io/david/amilajack/castv2-client.svg)](https://david-dm.org/amilajack/castv2-client)\n\n## Goals\n\n- [ ] Migrate this repo to a monorepo architecture\n- [ ] Migrate all external dependencies to be in-house dependencies\n- [ ] Add support for [airplay](https://en.wikipedia.org/wiki/AirPlay), [upnp](https://en.wikipedia.org/wiki/Universal_Plug_and_Play)\n- [ ] Support latest version of all supported protocols\n- [ ] All tests passing\n\n### A Chromecast client based on the new (CASTV2) protocol\n\nThis module implements a Chromecast client over the new (CASTV2) protocol. A sender app for the `DefaultMediaReceiver` application is provided, as well as an `Application` base class and implementations of the basic protocols (see the `controllers` directory) that should make implementing custom senders a breeze.\n\nThis implementation tries to stay close and true to the protocol. For details about protocol internals please see [https://github.com/thibauts/node-castv2](https://github.com/thibauts/node-castv2#protocol-description).\n\nFor advanced use, like using [subtitles](https://github.com/thibauts/node-castv2-client/wiki/How-to-use-subtitles-with-the-DefaultMediaReceiver-app) with the DefaultMediaReceiver check the [wiki](https://github.com/thibauts/node-castv2-client/wiki).\n\n## Installation\n\n```bash\n$ npm install @amilajack/castv2-client\n```\n\nOn windows, to avoid native modules dependencies, use\n\n```bash\n$ npm install @amilajack/castv2-client --no-optional\n```\n\n## Examples\n\n### Launching a stream on the device\n\n```javascript\nimport { Client } from 'castv2-client';\nimport { DefaultMediaReceiver } from 'castv2-client';\nimport mdns from 'mdns';\n\nconst browser = mdns.createBrowser(mdns.tcp('googlecast'));\n\nbrowser.on('serviceUp', service => {\n  console.log(\n    'found device \"%s\" at %s:%d',\n    service.name,\n    service.addresses[0],\n    service.port\n  );\n  ondeviceup(service.addresses[0]);\n  browser.stop();\n});\n\nbrowser.start();\n\nfunction ondeviceup(host) {\n  const client = new Client();\n\n  client.connect(host, () => {\n    console.log('connected, launching app ...');\n\n    client.launch(DefaultMediaReceiver, (err, player) => {\n      const media = {\n        // Here you can plug an URL to any mp4, webm, mp3 or jpg file with the proper contentType.\n        contentId:\n          'http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4',\n        contentType: 'video/mp4',\n        streamType: 'BUFFERED', // or LIVE\n\n        // Title and cover displayed while buffering\n        metadata: {\n          type: 0,\n          metadataType: 0,\n          title: 'Big Buck Bunny',\n          images: [\n            {\n              url:\n                'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg'\n            }\n          ]\n        }\n      };\n\n      player.on('status', status => {\n        console.log('status broadcast playerState=%s', status.playerState);\n      });\n\n      console.log(\n        'app \"%s\" launched, loading media %s ...',\n        player.session.displayName,\n        media.contentId\n      );\n\n      player.load(media, { autoplay: true }, (err, status) => {\n        console.log('media loaded playerState=%s', status.playerState);\n\n        // Seek to 2 minutes after 15 seconds playing.\n        setTimeout(() => {\n          player.seek(2 * 60, (err, status) => {\n            //\n          });\n        }, 15000);\n      });\n    });\n  });\n\n  client.on('error', err => {\n    console.log('Error: %s', err.message);\n    client.close();\n  });\n}\n```\n\n### Other examples\n\nCheck the `examples` directory.\n","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 - present Amila Welihinda <amilajack@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"@amilajack/castv2-client@0.0.2-0","dist":{"shasum":"0ce12a4f277dacb4044179c406938625986471a1","integrity":"sha512-rduAqhqDMdgyM3/AXIWVsJADCPO7soDKiW3nWBF2GlNmNtfQjfhN1Bao7VBZdt9zLpw5/8l/Ty6KdN48NYZZNg==","tarball":"https://registry.npmjs.org/@amilajack/castv2-client/-/castv2-client-0.0.2-0.tgz","fileCount":4,"unpackedSize":7534,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcl+IECRA9TVsSAnZWagAAyh4P/Aiho5g8Ja17zsDXmOfe\nOHwvPhC4m3gOGl6xECyn2zEBN+ZV64S0e+b+asQFVwX7r3+qWFcy2Iq0+mYK\nstB60KuW8PQFTNpRRawRR+0Rymkhdfp2ZviK6pAITdj41v1M9KwJAyG0KIGQ\n95wDpoiGwm+QqyNTt9ooje/eGM4MUB4eeqa0DDuxUvhihzi+bw5HUcwVvzDR\nsiUmFwNPtON2zZt3ItdcovL57rLza+5SxY4nHhzoHwkh74WKIeUgvVuTxcSH\n0ftSDg3kdsHqVfBionyJn8xDHYdMyAXGeRij/Jts4+14aWrDS6pZlzqnV01O\nvL5OiZutEJsPWWFZ0PredXrl+7DdLfGmqdl25FQl5CYSXQmXif5jU5V+TR6e\n1zJQWFb09i/Ul5fUwUBSth4ZuYzS952F9/iv8xPKOxEfi3cCMMRKVJwRCCAa\nxeRJlqmjtIq0cgAbXkqxL1tRRZS59kqUoffod/JiI6wD09tiUOIgCVfGyDZJ\nWqz3kRWQDhOQ96FwjwnLHG7MaRp9cDuhvD6sp6ZjQWAZdHoxex7AR0N87Gbv\n6CskD1UgngbYARS+Cc0iLTUqcpqrjvOYq69H7l5TRbrG/gbG2Z5x0Jeb2JtC\nW87FjsXRAIrHN55ylwTYjCaMcO7GqoKjzgYxwGLaS3kgG+NVsSvzL0tqsuMO\necJE\r\n=gCWe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7mXrprrpTsNYC7VJE+IvHzM6nwRPQ7XMO4t5FXdvtqAiAZWAd9Jhx/l7z5ckAgpHcTfCl/4tcFzjz8wk53t38w9w=="}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/castv2-client_0.0.2-0_1553457666981_0.6476096997385283"},"_hasShrinkwrap":false},"0.0.2-2":{"name":"@amilajack/castv2-client","version":"0.0.2-2","description":"A Chromecast client based on the new (CASTV2) protocol","author":{"name":"amilajack"},"license":"MIT","main":"dist/index.js","dependencies":{"castv2":"~0.1.9","chromecast-scanner":"^0.5.0","debug":"^4.1.1"},"devDependencies":{"@babel/cli":"^7.5.5","@babel/core":"^7.5.5","@babel/preset-env":"^7.5.5","@babel/preset-typescript":"^7.3.3","@types/debug":"^4.1.5","@types/node":"^12.7.3","@typescript-eslint/eslint-plugin":"^2.0.0","@typescript-eslint/parser":"^2.0.0","babel-core":"^7.0.0-bridge.0","babel-jest":"^24.9.0","cross-env":"^5.2.0","eslint":"^6.3.0","eslint-config-bliss":"^4.3.0","eslint-import-resolver-typescript":"^1.1.1","jest":"^24.9.0","synp":"^1.7.0","typedoc":"^0.15.0","typescript":"^3.6.2","util":"^0.12.1"},"scripts":{"build":"cross-env NODE_ENV=production babel src --out-dir dist --extensions \".ts\" --source-maps inline","docs":"rm -rf docs && typedoc ./src --out docs","lint":"eslint --ext .ts --ext .js .","spec":"jest","test":"yarn build","ts":"tsc","ts:dec":"yarn ts --declaration","version":"yarn build"},"types":"./dist/index.d.ts","repository":{"type":"git","url":"git://github.com/thibauts/node-castv2-client.git"},"keywords":["chromecast","chrome","cast","castv2"],"resolutions":{"babel-core":"7.0.0-bridge.0"},"babel":{"presets":[["@babel/preset-env",{"targets":{"node":10}}],["@babel/preset-typescript",{"allExtensions":true}]]},"eslintConfig":{"extends":["plugin:@typescript-eslint/recommended","prettier","prettier/@typescript-eslint"],"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint","prettier"],"settings":{"import/resolver":{"typescript":{}}}},"jest":{"testEnvironment":"node"},"renovate":{"extends":["bliss"]},"readmeFilename":"README.md","readme":"# castv2-client\n\n> ## 🛠 Status: In Development\n>\n> castv2-client is currently in development. It's on the fast track to a 1.0 release, so we encourage you to use it and give us your feedback, but there are things that haven't been finalized yet and you can expect some changes.\n\n[![Build Status](https://dev.azure.com/amilajack/amilajack/_apis/build/status/amilajack.castv2-client?branchName=master)](https://dev.azure.com/amilajack/amilajack/_build/latest?definitionId=10&branchName=master)\n[![Dependency Status](https://img.shields.io/david/amilajack/castv2-client.svg)](https://david-dm.org/amilajack/castv2-client)\n\n## Goals\n\n- [ ] Migrate this repo to a monorepo architecture\n- [ ] Migrate all external dependencies to be in-house dependencies\n- [ ] Add support for [airplay](https://en.wikipedia.org/wiki/AirPlay), [upnp](https://en.wikipedia.org/wiki/Universal_Plug_and_Play)\n- [ ] Support latest version of all supported protocols\n- [ ] All tests passing\n\n### A Chromecast client based on the new (CASTV2) protocol\n\nThis module implements a Chromecast client over the new (CASTV2) protocol. A sender app for the `DefaultMediaReceiver` application is provided, as well as an `Application` base class and implementations of the basic protocols (see the `controllers` directory) that should make implementing custom senders a breeze.\n\nThis implementation tries to stay close and true to the protocol. For details about protocol internals please see [https://github.com/thibauts/node-castv2](https://github.com/thibauts/node-castv2#protocol-description).\n\nFor advanced use, like using [subtitles](https://github.com/thibauts/node-castv2-client/wiki/How-to-use-subtitles-with-the-DefaultMediaReceiver-app) with the DefaultMediaReceiver check the [wiki](https://github.com/thibauts/node-castv2-client/wiki).\n\n## Installation\n\n```bash\n$ npm install @amilajack/castv2-client\n```\n\nOn windows, to avoid native modules dependencies, use\n\n```bash\n$ npm install @amilajack/castv2-client --no-optional\n```\n\n## Examples\n\n### Launching a stream on the device\n\n```javascript\nimport { Client } from 'castv2-client';\nimport { DefaultMediaReceiver } from 'castv2-client';\nimport mdns from 'mdns';\n\nconst browser = mdns.createBrowser(mdns.tcp('googlecast'));\n\nbrowser.on('serviceUp', service => {\n  console.log(\n    'found device \"%s\" at %s:%d',\n    service.name,\n    service.addresses[0],\n    service.port\n  );\n  ondeviceup(service.addresses[0]);\n  browser.stop();\n});\n\nbrowser.start();\n\nfunction ondeviceup(host) {\n  const client = new Client();\n\n  client.connect(host, () => {\n    console.log('connected, launching app ...');\n\n    client.launch(DefaultMediaReceiver, (err, player) => {\n      const media = {\n        // Here you can plug an URL to any mp4, webm, mp3 or jpg file with the proper contentType.\n        contentId:\n          'http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4',\n        contentType: 'video/mp4',\n        streamType: 'BUFFERED', // or LIVE\n\n        // Title and cover displayed while buffering\n        metadata: {\n          type: 0,\n          metadataType: 0,\n          title: 'Big Buck Bunny',\n          images: [\n            {\n              url:\n                'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/BigBuckBunny.jpg'\n            }\n          ]\n        }\n      };\n\n      player.on('status', status => {\n        console.log('status broadcast playerState=%s', status.playerState);\n      });\n\n      console.log(\n        'app \"%s\" launched, loading media %s ...',\n        player.session.displayName,\n        media.contentId\n      );\n\n      player.load(media, { autoplay: true }, (err, status) => {\n        console.log('media loaded playerState=%s', status.playerState);\n\n        // Seek to 2 minutes after 15 seconds playing.\n        setTimeout(() => {\n          player.seek(2 * 60, (err, status) => {\n            //\n          });\n        }, 15000);\n      });\n    });\n  });\n\n  client.on('error', err => {\n    console.log('Error: %s', err.message);\n    client.close();\n  });\n}\n```\n\n### Other examples\n\nCheck the `examples` directory.\n","licenseText":"The MIT License (MIT)\n\nCopyright (c) 2014 - present Amila Welihinda <amilajack@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","_id":"@amilajack/castv2-client@0.0.2-2","dist":{"shasum":"9c0739a0bf7a6901ff9ed281ad5d62cea8d6f581","integrity":"sha512-kslQPmyeddCFlOFQYEZt3GIfc0+t3WgJVJE96G15/PcDMLJPze9NjmdKcpTowsdlfOnTP4ETs6OWHhPuGZjTgw==","tarball":"https://registry.npmjs.org/@amilajack/castv2-client/-/castv2-client-0.0.2-2.tgz","fileCount":20,"unpackedSize":108854,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaqySCRA9TVsSAnZWagAAXu4P/0EdBQtGsOM3cs20Hmev\neH87sezK4ArgZunqwDyWpjDhDORNZaLREyeCRu/ojhXZEb5swFhwpKXFFHLn\nd7VmxuVUfifUHZPrc7nQZFAha56yDUKQcaBFqT1MdT3GawZwA7cYh13q8QF4\n1sd4FvOMJQgKXnAukBYppKg1fZVa19YfQNCZsyGYw01moVCIr1o9mI5iFSsR\nSlnFm4gGMPaopQ38h7khkAVyvGe29VHhlVJAJRci2lrgtyAfKHB2JGdzdLn6\nyNu+W64mVrw7g4ARhbVBqKeLHPSB9DoxBT91puksQRibA9GXxtH3VzybPX7e\n7a4qclpctA7hjzXzBxK38y1+RWLjKm4oNztBKE+v8q4g5XbmfdcHhwZ0encW\ney56AOAKhbW5ZLtcYFt0gbddrI+RqueTHh8uq5mcF+1e9yuwMOIXaIishTuI\nyGMc83rnRsYTLcG55XoHt7HVTL0HMQBERUkNbljguhPNbwOkcPa177dRlmhF\nM1BGpFbgAGykvVek1bmeKswBFhwd6o7d5sfUEaV3QqCEHCKDFfzhjbyjprd8\nVUhXKtM5ffLiUlaQBI4ppgukeYZ+puiSlCG3hcp4N86TrY1jxjsq6Vy8Cs3N\nAOqGhu49UIh4kEc/aOKYdb+o7GaSkRnAK84JI7uM610VqbK4p97m8s3JO4gV\nRybo\r\n=kpEh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRHa8lRfT5m7xXdVQ1crYxNuI2vRr0gaHWsT5/l7ZqpAIhAIhmP+Q+DEZus/sxKDCQj/R1agETC2KCOqV00R4dHjB/"}]},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"_npmUser":{"name":"amilajack","email":"amilajack@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/castv2-client_0.0.2-2_1567272081783_0.808199751140056"},"_hasShrinkwrap":false}},"time":{"created":"2018-09-03T08:18:41.021Z","0.0.0":"2018-09-03T08:18:41.334Z","modified":"2022-04-04T13:48:42.595Z","0.0.1":"2018-10-01T20:46:05.186Z","0.0.2-0":"2019-03-24T20:01:07.096Z","0.0.2-2":"2019-08-31T17:21:21.889Z"},"maintainers":[{"name":"amilajack","email":"amilajack@gmail.com"}],"description":"A Chromecast client based on the new (CASTV2) protocol","homepage":"https://github.com/thibauts/node-castv2-client#readme","keywords":["chromecast","castv2"],"repository":{"type":"git","url":"git://github.com/thibauts/node-castv2-client.git"},"author":{"name":"thibauts"},"bugs":{"url":"https://github.com/thibauts/node-castv2-client/issues"},"license":"MIT","readme":"","readmeFilename":""}