{"_id":"@adaptr/web-sdk","_rev":"64-1a908f2670df8e27ba5964c21be2f7df","name":"@adaptr/web-sdk","dist-tags":{"beta":"1.0.11-beta.81.8b8bf1a1.0","latest":"1.0.14","prerelease":"1.2.1-beta.44.4bbbb09c.0"},"versions":{"1.0.1":{"name":"@adaptr/web-sdk","version":"1.0.1","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.1","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"6d0a7ff8201f293dde7ded45b5cbc5c4b66892ad","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.1.tgz","fileCount":27,"integrity":"sha512-v3r01XuXGg9xLWC3yZvk8ENIoQmHkAD42d2EgRlEioB39DwUSqMHG4Zxk2oHdyHDy8h1UaavZk5NpHbXsl3yew==","signatures":[{"sig":"MEYCIQDVge5ORo7Uxornc26+Xr5ofHvKeovTlDsVA3F+dZT6CAIhAMnhRi1lJ/NfIFVQ30MKP7TRisMKFUff/TEOnm8WacgE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7FKfCRA9TVsSAnZWagAAht4P/RA8deCdAR6Ie1BO9jSt\n/MMigeeBNtKsgIY6X3Fnjpz15+LZ4Lh0r+Z4PhFSrj/eMEg0swFU99R7rHWo\ntDzD6ura9df+dkYG6h4Ckf08/q3yVhgtJ4uriCkjtItrRGwQFdbcwmOpq+Xa\nUEKV1+9Yot12eszZR2mjUuuRc4g0RhZgZmqknBTq3AtvvKJEzXHHSCUARuhS\nU3rGtfta7fXXCN1KwEMuyzHNrRg7NUDNhRZKEMwQmlrD+co5ZYzoshgyl6bQ\nJByF0yUrRRIR7zTu4oy13ZX/2/5ep8HNLmqNmo6JuyJm4wiwNEdPQbBW1LN6\n6uQv8EBq1E9qmMN8xRzD9kNK1OpinmPW9BttNfiyVbapDBnjtKZ06mXUQaeV\ny4UV+6F4qJvmpi4eWWNq8ddhm+5dg1sEAkFiys1klXtWKLFfIGimid0e9X5Z\nM7Sm9JuzFvtpDnRJgJW3Jx5f4HqtVNhGM7mECyYkl1STzcD4PYIEtFGhxgso\n17M6ccY282GVHjgjEfGCj4whRWXSXCwfAgusEcjY15KjDPwACCyNvwIKExWj\nCwKmhYPWF6Q+K2WtfXFNTySBbep1ckWsg5DMKIHJ95NLt6PB6WSQg7rEnUns\nUlw7qgCJHd646XX5aYAJDoacgIOcqkwv6h2ClD1zxc2DySfd62YIJLe3nqBe\n9Scf\r\n=Fqro\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"94bcf19ec7e429148ee077311ab52ebde86092b1","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.1_1626100383002_0.4412688133983034","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@adaptr/web-sdk","version":"1.0.2","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.2","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"60198247a88adc680f705e2f1efd9647ba321867","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.2.tgz","fileCount":27,"integrity":"sha512-9/MaMnaqiNX+dVBX1XBZRNMn1t9bUBS68AfiFb/pXjzOcA5AdR0uppA3YJC+3sRuJlnyAgWNAZh6Cja52brzvA==","signatures":[{"sig":"MEYCIQCgQoHzAiyDENExjWUdo6CYl2V9iKhDAc4HZnvckGP7/gIhALZejkXM5sQyFWA3pO5CBB0as82RTUtyqEoQuOkMntE9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7FXVCRA9TVsSAnZWagAAy/kP/1l3fCaJM2oJOiijNQCm\nbOFaS69MulNe/4onOf0kgmFC5bQOlk2XHV/vKuA3qdm+wXJKct0oT9MB15lY\nhhHEOYVAH66rAeroaAfFNqxJKZXipYlYWA7X/bk5nkxPVl00wm36p4a+96Mm\nzO1D2j/Xj3mdQhQKhIpoz7SiEBaHIJGFFqniQkW5PhRtMkOomeHd/kpwNlLP\nwwd8acU32mitXVzfm43P2R5FAl6oQUmQZ13JJjPKyEooWy8WhKRzIGQ/dGDd\nMMJm/Rkv2CEPHckmFIhNvwUzPje+HYeyjsd+Zgrb/cIPYD9WZh1jUNbezjBS\n/eBE9ahep6Ng61F5jRXBJDdVZ4Yv5apSkssPMgGxoJdXRMhpfGOUHLEFchgi\nFxOSD5WgtZD310gdSu8T+Xr6qigqCxBOQvf7BeeVgY/LMUA6o+AgO0UdA62r\nwI4yjmJ3sZKEB9IKbStfdO85puOTLKynyXhRcIfrOm3pDyMH44VVHXGwETTg\nU54g7XbWYHlsTM5AMfO+Ckwgq3F++AHgBCTHdAZuk6OcRQ4+Y9HaN75ygnnP\n7wfm/I1TzDJXLPpTv88r061tsHWgL2+PDuBPJOaUf5RID9S0fH/7OaTnhROP\nufL9IoRnngGn+4zY24l/haMK3fZzeBiMD4wyjK2Hbr87b91TdcBmIYbBRmoK\nt/Z7\r\n=Pj+b\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9657e9b64efeb1669e40fc34e9a7bf8cbd95e050","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.2_1626101204763_0.477434559288473","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@adaptr/web-sdk","version":"1.0.3","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.3","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"bbafd0f2723f38f65fa1d16ef367230b70148ebc","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.3.tgz","fileCount":27,"integrity":"sha512-SVxIFBxoV13LsZ6ZspswaD8Ifs9CdSeSzDqMjUGqOSVFti008mJ07KYtPnxaBwpOtDeZFEjSf0FeYsw8i7Ze9Q==","signatures":[{"sig":"MEUCIQDUWfsxaIA2Tw0YR4Qw2c+zfa2OcWa3XA7PQ3hht7PqsQIgDBvNWg0fCWkbj5nGY8pjv177AmEtSl5LBAzcsjuJZ0A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7FiDCRA9TVsSAnZWagAAUogP/j5zVcYs7NEwiHAgQAk7\nko4BpZgDQKYZmGJMc8RZ8lVMYuNRc33XXAt0ieiRmpVav2YyIHuXlaLBqffb\nYvMtKskzk9RLS2XELQgcGgzgIFGFETjlY/4O5xfv8SK/9JVLXq/oRqvtYgy3\neRmcMBqbuuKT331B+OGgTxts228rfQOpmytoz71Yt1xWFL98ube94zIbdx52\nR27g9ZW/42zIk7wZlVvXEPWRvYvwm8MT5R7/IagEN36L0X1qqR2TVMioBPu+\n8gpk3JZgbYCiVTWSYljsI0cqnXMk5r6Wvk3wbEutEac8Dwus5Zd84UXcY4GB\nxO0cPbSoWyAYdo315pRTf0F7Rm+C9sSCzgYclrYthHwt2Qhvcki8drkjgbux\nAY6aQzh8lYaxD7/9Zzly2wy/UC6tnvVDmpwyaRquZY8soYcdZ62PeRg/gpe9\n3mdl+kLlSaioiU8KhbOKeusaz76vGCU6YpMOIVwhD38kbP3W/+haxLb3I1BB\nMd7Ld4YINd9/OCrpKOU9IqlArtov6v2MN8zI7kYdnqiD+U8vqF7jB4TlqSS7\nqlp1fO9Whh87/Ckpql3Glw5F40+i5U9gwipg3+4FEqB3fDXfO/qj/Kl7pV1Q\nvpJjXLZs/vPBmaqgfPg5Fnd+iQV2uBssXMHsCe37RAur45ENkMTuhwyJ+Gtr\nSBqZ\r\n=hBOB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9f2e4e5e04d0896bc0ca57630104745ce00c1886","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.3_1626101890497_0.154756615563729","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@adaptr/web-sdk","version":"1.0.4","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.4","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"030ea1a0e1fc4756ed97dc2f92e906f745f51c07","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.4.tgz","fileCount":27,"integrity":"sha512-wLICa/u/3tLs6SUrHw+EPzmPbLRWbJ9Bi9h4cazC1kVaQPr1kuLnXKopsCQCwJgEudRKLIR8u5vt/HYxI3M9bw==","signatures":[{"sig":"MEYCIQD1II/fJvcG15VtD8AGzHChyaZdVuE3kwnuHkzH1e5IWQIhAJnA3OdvFIIA6KcAvy1tgiKFM0mUdkMrOxNlW/Ved4aq","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7FuLCRA9TVsSAnZWagAAoJwP+QGvhHJa26kkMuwtc7Gi\npjRqgfoTDFIC2oR8QPaO1VzeiqZ5zB+bf/3apiB7su+lWgfJ9FVRMY0vIpn/\nSy2HoHGg4EHIJVst9fxrmlYLO44gTKgUSCgR/Fid4s4zsLlWP7psTSOLgqEx\n3NqGnUGI8TEEjDZMkHAwiPSbu1i4IBI+xUUMBULwoiXkIU7GNNK7Gj5eBchh\nw2EyqSH/EsaCK7dbWjmVi2DnZdlbH8MmSvQ9HBIFz9qy5byM8Jr/u1Q9FR74\naPQ3aKTgOxPqaWAl6zDOcRkgKqyMucHqNtgrNZ02rgTv/n5N7zlJI/RmZLlu\nyg+jxZF8JlX3YZHaCenaqoqwC1JGSOeEcdnfs6PXUBXVB3uYgKtL7vbNfv2I\nwhChvwSCBDJzksz8fiFhKuYuoDWRqVZtQ369pz8ypxs50PQk8fE+O+y8eYQU\nKPmVbfEYf12IqwWu760lnhxuVW/wpqAMGLkgd4IBhZFsL4WepT++1XQALPby\nE3jQrr+SEpKMR6eEb3/Q8IqohdiAGNQsarrvl58PuG19MNmVWN1MC5yD9Z/+\na/q3Ti+CJsc2jNQNNnZTOGz4EsoqFR0G7/fqDg3Aow3ZknRJr+zCE1cSBKMe\nunK+1DaPK3nXMbb1vIIsPb/PISM8PVLCKAoe7suoWZn2tIV2YWhEqVzL0Zb9\nne5m\r\n=RIL0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e6ab0302a53d6fd53e5aca686cee10139bbd4c20","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.4_1626102666797_0.04442643021970727","host":"s3://npm-registry-packages"}},"1.0.5-beta.47.9ff952f1.0":{"name":"@adaptr/web-sdk","version":"1.0.5-beta.47.9ff952f1.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.5-beta.47.9ff952f1.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"d9f3222bb9b4c52f436ba8a73b844738ede93355","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.5-beta.47.9ff952f1.0.tgz","fileCount":27,"integrity":"sha512-6E4LylMyiSVSiljrdAJSCqhkHKnIMyvm5y1YLMcTdnMf5gv7uQzEtB/sUiB7aoy/rhgg4X+RWmtadNhSNYnSWg==","signatures":[{"sig":"MEYCIQCR0Mnuduh8HIdbrVBXYDX7lf+WVLTr/C0QSvcqgeElwgIhAPdl/n3BKkM9jb+a6Rm6LEgKFwByQPMR8SY94xaiKyWI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7aSfCRA9TVsSAnZWagAAImgP/R40v9Y4/JMMxQg+ClJP\nuP8c8+1d5Uq0p+WF23/WcXFWsY8gvIHbctqoAVviMBQA4/Wso0bi/HE1yBib\nMDVCWgohP1l35tyju56qg6HBvLhjrwyBnG/A2nM1nyXgrW6sVEbI0h7HcVl0\npmNHdAeFurngImhQk2CZV5v0SJrB3KHliKJBfKOnFbgGzUY7+HTqpEAhkTU3\nLlkv9RlTBmvMX4AkxWVbQAgqHTfVEhF/+ItohHI51Dg83V5Q1Oyk3kGdoXip\nNwk8wG8y+Pbyqp4IfWs1QKma07Dz7GWcJ0eaOTfu990nCAUWtS4BgqxZnyco\nr7ddTxHymVrpvhNlXr8z0a62Tev+eXLmF4EGaPIstD4yRYl90mnzvuQSe/KM\n3VeuWcpSxVMkHouOnpNBsfsx47GDEz+qn3HQ7zyE8oe42zyDKyvWb2uSilLx\n7O7BTZFsmZOD4Aq2bQuBkjkaYAdlIQK2nWhaPKto1BtaN19h4stAK6puvdns\nC9qVJFhOMijQ/ffQydb4H6TfJagtms6XRhynuMKnkXIa/juH30GYVo74LLcf\nsWj+icfCWWf6p4X5IrtfNj4YzBgu0z/mzY/j91onimZeVOYtBqyNn1ajemxG\nJ69c7a7o3xmjtJKgiO2LPKiv0HqXeFrnDFN+0sEkWuiOvWjzir0napT2yeG0\nHSdi\r\n=CQo5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(\n    `This station has a total of ${results.total} tracks. The first 10 are:`,\n    results.audioFiles\n  );\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"86e3df577f5c1365587a0052eba6a58adcfc0179","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.5-beta.47.9ff952f1.0_1626186910695_0.6427703028393594","host":"s3://npm-registry-packages"}},"1.0.5-beta.48.c3894321.0":{"name":"@adaptr/web-sdk","version":"1.0.5-beta.48.c3894321.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.5-beta.48.c3894321.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"cef14963119bf9a6b1119e851271e4a769b990fa","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.5-beta.48.c3894321.0.tgz","fileCount":27,"integrity":"sha512-C0kHA4vz25V/ZbjJC9jrGHsQx5meuFLMvcxwqSv/WVGVaAFpd6osKQd8HCCRozvUn8VkBW0dJawp9bk5MNQ7sg==","signatures":[{"sig":"MEUCIDEUD5feqnPJrcWO1T06VtPEntaBh0Dq8TEuVY6CjT6oAiEA3Zf+j0w831AnL/zR4jkiG/OqF+Ah0UJc8rrnLk1S8xg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7aX9CRA9TVsSAnZWagAANcwP/3/YrFeEhmSKPvVAS799\n88o8rNzIw0PXcsl1j3u6Mris3lmULJ+tlEAfw3UMQO7GclrZw8uZagRjZTOb\na7jJHMuqYGAkUKIgeAJQoxXdueRytrcY0CL0w+mHd1uU1OF2G5hgpQSfPBE6\nFAmz2LmP/nvM5z58gr0WOJ5RJVfmVDoL2MSPauJKIYCNq9X451WyzOViJafM\nesl+PWqYcEe2UNJqS0NqHB+0bsIrnv77Z/8Ui7TD7xVB1vGtp2tLjpo9WdTS\nLDFLQ6osXjyAkRV0b393HPO9vCCnj7vHvLlyAR35OYCuIYRD9FqzncmmueKC\nES7/0GCR95D9UhB0UxLUifWFb3/oujFErOqrbqi2FVrC9ZN3zTAiPRemMHu4\nyUab5I67CRBks0wbVk3PipRpAdbxOt1+TDlM+X8dCYf9qs0G5dyVAPZBP0PJ\n+ZfUvCOURdiROliHoXUKmeGrrd5XW+yBkdVGVOvHwkYo6HyuzaT1NcalMNjd\nuMBIAhx/9GQbGv8m+N7adVczm/jFtSJ05RPbXYG19vYNIb5IM1c+vBA7QILy\ncojis4kKVNGo2psAuA586+LXpXr0aLS5N5jw2e9sFVolDq2JdVVEA7gQbwEf\nJf3UaUIpbcL4k/X8iCd4GU/Q8gst8LUO4xib5hdKiqgE5egRB/ma3HrpMucy\n5o3U\r\n=4lT4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(\n    `This station has a total of ${results.total} tracks. The first 10 are:`,\n    results.audioFiles\n  );\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"7a2013e4695e994b751ce6472aa1c96d40562915","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.5-beta.48.c3894321.0_1626187260870_0.12820425490493714","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@adaptr/web-sdk","version":"1.0.5","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.5","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"754dc604ba2b298faaf9590bd1a8c6bcdcedb831","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.5.tgz","fileCount":27,"integrity":"sha512-KMW3SvFgbPwSTgvXf5pnNGWm9mXiJXxkmWTb9FSmtDazAFkOCQ4Y2rNoOR/t0wDIRfNRdrNU1gWNwrnJSmElUQ==","signatures":[{"sig":"MEYCIQDioHcPiAx6bpCWSJ/Oh2oJm/0/ENsepvgiwOYuSpiAogIhAKRx3ZQGhuV8sy89GiCAyO5zBhWFWo3tAqOUhcAQYbWG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299635,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7bA9CRA9TVsSAnZWagAAfh4P/1pzpwT+phL9MXF+KR/0\nFhNqOwG5Lt9xruuda86nFoxz5RoW38S9aEMpyeNNSGORDCWBP+hnZ/lGyB8h\nSYS/4wp69jZLtlKY/wAWfY6RxMnqleFTSzTkx+l1D7aOOgTpy+qkoQtePg1C\n3PziezEO1kcHbRtbQnUgJEXYLOA5FehIJpaoVkvM0FwMuiu958OZLazBsuU1\npsRiJRa+HNnIVQb/LFBOiPtPvo9ZkxD5/wHYmgJJYOHpgTpSv79yLb8UH5fK\nxhvnbT8/3rycjpaeyNGFLJg+Qstc6XibJLI5Yva/3RNiu/o3lsknU+MQVC/C\nd3nzm74fECmAyIF73Nje1f3AfftJJimgrhKCWXX0SYK301+9RF5YmsvxDCwn\nlgQ0MAAughdRhlLvBuUbXBT9fn/sryWxgR0LBUPP8BWccFjEOHqasUYX9L0H\nUrl/jp42nPkcvzyYarJTJ7lCnHSVA6CZTkYtN7dRozL9xt1hwxIRDp1GLWvi\nhfATdmnQkEtaejjU1CjVLYD6GI+VH5dUWuwxzkSMqS8K/VSrizRHZSTksr51\nQZPlw3AYqacKXSL52ZBpP0su9lWNeLyNBTwemejxF1hWnRlp3csuOxKU0vAK\ninQcAZQYixDYe62Xhc2Fn0LL36DHUbJnn0taygFvTEQj6uvYxOc7sH1OOaod\nxiMX\r\n=DkzJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"86b75a03643129b3e5e02b6b7613e5725b864f5a","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest --coverage","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.5_1626189884889_0.1492820792592846","host":"s3://npm-registry-packages"}},"1.0.6-beta.52.cac8f1fc.0":{"name":"@adaptr/web-sdk","version":"1.0.6-beta.52.cac8f1fc.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.6-beta.52.cac8f1fc.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"9eec6a6f98798b74265e0c9a94e18efc0cc5ae76","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.6-beta.52.cac8f1fc.0.tgz","fileCount":27,"integrity":"sha512-GC9cJRIbIYa2cA/cDROwBWpfj/YcEmmzXwf+SYuX1L8VKwXmCKp22unrOpyZoMnLPVg5pyokajxPzvbz6PgBaQ==","signatures":[{"sig":"MEUCIQDWiwJlyUS6B184KCCGHyX6zaRKynFDSToJca8ReO7UPAIgRubEJlXLn9JJHwg5vAkrBdHibrixY5mBwXjCaH2UWG4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7cymCRA9TVsSAnZWagAAxV0P/1UZFgsSYaN9tvphmKZC\nm1xPnhj9YIHRBqmgTXTCxUKwNwdGN2/XBzyWeH6jWxY5NPMshvuLJElCidX2\n1GEwuzKLi4ZA1/HcanBEFS6Ye9VhYq9/+B1kPggMK9VkdT2oBh98Hi71I5v/\n03TD3a+4lINHIlTEh9enaTAlOREjbKgRzPIb+EJ4+YOsJBu5uJBZJ6gfl3Py\nCQkhZ8g2hIVOAIG7504mLiaILY6abdYmbB+UfH1Sn9opsXgkT/Q27OW1zrRq\nPqryihk4y22VvGBi2skmnHVRWdzZXklXDlEcxBih7FlDITdoTJqq85hRp1Kh\nZgd+sYMUQ/2pWaWTKZcJQv0ULSdcbeXFPHGlYnd30B5esDbqEH5ygPSTySwL\nsUL+p0w4CKdmBhKAqMAEv0LPYPTobWDwCYBLIrgiNtCNl2ZibH/5PDFDCMC2\ndCSKOl2KK7RCEXcs6qWT23IQxFsd1dM+sXkNezdoPkzrnSPvGMrqYzHU48I6\n0lr2E9U8PekSzV0gfAKG4CpCoien7yakmL1fbdXYm6rypqk46+Tme9fwOdv/\nno/SCvM6roA+7KpUZsIH9SWleVmJWeI/GRVcQTxgT7UityObQ0pz+owtGPYV\nWPrAvC8j/9Y2e52+R6ulEpPYn+4jeTsFi/kFBW5SqZQugbfUOtFV7zecHgIl\nlPc6\r\n=kQ7K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(\n    `This station has a total of ${results.total} tracks. The first 10 are:`,\n    results.audioFiles\n  );\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"c4346ab6480598be3cbe365dc34d34e237c512e6","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.18.1","description":"## Introduction","directories":{},"_nodeVersion":"16.4.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.6-beta.52.cac8f1fc.0_1626197158101_0.34520685521785355","host":"s3://npm-registry-packages"}},"1.0.6-beta.53.bf254f9c.0":{"name":"@adaptr/web-sdk","version":"1.0.6-beta.53.bf254f9c.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.6-beta.53.bf254f9c.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"4af03dc8450dff71b80a5f2d27a0ba8a508719f1","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.6-beta.53.bf254f9c.0.tgz","fileCount":27,"integrity":"sha512-azAuCFZbIAYM3JBmd4iQcw1r3ThGvp9a38/Rdw89CfBbN6IS+4yuTZdy+gzvkjPseCrqdtHWtui2v7b3YxGdYg==","signatures":[{"sig":"MEYCIQCp0fDOkIBgemoZhjpO8fv+FrC7UpUa7w3PAqb9J+LNsgIhAOYq+SZHpBd5m1RW90hjq2UMEkw20laAq3RR1guiMD2D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8CfsCRA9TVsSAnZWagAAquMP/jxiVkHe0X+Y06iLPD3A\nsuPTZT/AVCLHa1hFF2ngqhoPs4T0x1+Mt2itFNpXbwnjZ1L70tTmLf+ODAje\nvM8o77M700W2KbyTNo6lZ0c6w62EeECzjSq71F+R/UupZaTSOSeYxNB9XTwa\nbpqHzNCMbEKU9vb6ivup+Xc53WO4ZeQb7NhWojVuonA7gmEHuTygP10OFxdh\n46WDH0v5pkCMN5ezKxhm+FScmUd9W0iLugiztYXZ/fPqB5C4QVcYP2OMD0u9\nEU1wTdkj2KU+yLOP+JTyLQvIAoyDvOXkz5AUU0vS5sjYqifRT2zCLDrAp+Et\ni+fBju7A07m1+Sq9BPwgUBAWsHlZX6H0KYLW57kE8IN/qkGf9ah6d8efZ/ra\nmbVDITRLO+9bQl+7MJJ2V9IYEYWRm+LjVdZ3pB/nD4Wf20mZjO4bxB9HSNhp\ne+Obz2VqfZInl8+UWpglB/4XwXehyhrAo9VvvllER8VkvreUTzfj/Vn3R1/e\njfvUb6ztY50DU31sEYUG7gXA/HiAnx5BJzUETMT0M4n3gB5F8xRI+/uFm7uT\nDsDx+NzlvISCBh792UY7hvCqnqjKJOwJQXwvzcG2KGd/cAjIDavYQaa2H+g1\nXRgxBHVMhuNKYzr+qJ6gZPlgfAQP/FMXJblOfJ1LQe5wUcxuKxAdXTvmQ8KX\n5oNQ\r\n=nxni\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(\n    `This station has a total of ${results.total} tracks. The first 10 are:`,\n    results.audioFiles\n  );\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"aed2ebf2cb9bd4426f49d3bbe8a79ad2442a8499","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.6-beta.53.bf254f9c.0_1626351596346_0.4563651096768544","host":"s3://npm-registry-packages"}},"1.0.6-beta.54.4f313168.0":{"name":"@adaptr/web-sdk","version":"1.0.6-beta.54.4f313168.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.6-beta.54.4f313168.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"220d5a963e00d77e54d0d5ec339159a5226ef5d4","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.6-beta.54.4f313168.0.tgz","fileCount":27,"integrity":"sha512-91WdwuB6xD0AuzmG4MGB7bKQ2vJ7t2YX3biFI1yGu3lYh79sMLhgti4x6BavU91MO75+YvfZFLge4G7a0su8Dw==","signatures":[{"sig":"MEUCIQDaVQFIRlxUYRkLRVuObGVT0qyw00TtrWKZ8RP4El/LFAIgHwnZp60CEsxmePBUqS6urk0Zg9T2sBLkgaCi3mZrCr4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299632,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8ChFCRA9TVsSAnZWagAAuxgP/j8lyvQILdIGiBSCBPwt\nlTSURaJzVFQUD7eznZ/qz5G9wSFJNaXTOlS+G59KXZAPTuSuqf/gPaoQV11L\n0hjn9BuHJQnf38XwGjpSEq0iRnjvF6aiPPXDXfPI7jzuklV3VAi6rv3Ii3JT\nuRGwOshk5vcAu2XZjjl3Pb9D2n/nRzJtHdqknaM4teYyi6wlt8oGw/cfAX84\nIS5CXlGGug7u4zDeCwtvjuiE3sei15SaStdCWSWG87/OuLz5kQuu0CdvVd7d\nXVa3674ruuLoihDULJiAHtJJ4huWU/pU5XCGQxXctBNUIQmLzM9KXuvcyJUI\nAjLW8z/PO2gLAtjeiXN+83FsCukIUHSJ/ZFs6uFUtj+jNbKuRZmuCP/vVZaC\na5jVOP8rbcViRZpMDGkrUv2xjIInUmC2g4iVrTdHPzer49xPsaOOxxBudop/\njgrXArbVsw6+bXlvtsfRp06UnSWM2yrbpxs7R8VWrmMjqPJnjsJjTq+3uh2s\naIEVaEvOeZb2tfYKvPWnPa3DjA0k1BqWpRS+BHWg/WEQrVxPHcTest6MrLoq\nnnW4DRp7N1iawpNi2DanSY7/xbDPGLZ7NDUnVPTw5iw+uKyWBdoeOVZEd+F1\nbT30x2QKoCIavjWM95OF2qAR0xtjs42h5DHszdbSt4bsk3JjALW6qXxhwjuu\nas4a\r\n=8yrH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(\n    `This station has a total of ${results.total} tracks. The first 10 are:`,\n    results.audioFiles\n  );\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"17d5032f9e1004a136201b94b7c9db0cd3e047cd","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.6-beta.54.4f313168.0_1626351684850_0.0689282314893469","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@adaptr/web-sdk","version":"1.0.6","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.6","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"3c6ec7dcfac16393599063537bf5ec767da13803","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.6.tgz","fileCount":27,"integrity":"sha512-aXeSmdb2l5o2GWCnrjev6L91GhWsimUqRm1BKGHZeLmQ2IC5xJ9sXHalp5byVKmsCGmfotTa+JMyxj/yPdlRoQ==","signatures":[{"sig":"MEQCIEHVQsEYKTVExOFutNkPMWw7xL/MpZMeG+firLoL90BOAiAenNvgUpevDCFOi4rHEAnBJFnJVFSu5p4A3/agbHkPGg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":299613,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8HF3CRA9TVsSAnZWagAA53QP/1wEHHdKp+UPDHa4CY7l\nBfnj9imrhJp2k/c0vI7fsHQkBGkE5z2hHrGfh9o3dSsdbo63M9OnYw8gYmI0\nO4Qx27/pwz6DRNF28eqJCceXG9PUg/0/po2yS8AB+/CCz8bvG+mznRgRqvL+\nxzLqcW7CsHcGf3DTjpLNB9BMcuRkgkK45TzPPfFaPcd2newfdEvSRDf/kE4J\nA2cR86DAgIjZ+Z4fnvpS7BJYi8K55JjCKBYxupBI1BgVc+K1Pt7BRhL/Fdvf\nWm/N0TIaQVwW2c92oBVe0oyKmI7nymGN2v+SXbxjrYBUSqIwIdyeHoI4KxSu\nODGJng4JJPFyn6c8PnZBVmomtVyBSK8gvzS3J111WXezy4A+w5JgYiuN7u1N\nlG6d82Hb5gORcKd9RAp8rUmi6AlrWuK5G6AEhkFJxtbXdUpyhORhxqvgOEWs\nYVZQpcCZCPaDg2tF1udBZPoxMU3OOyHMyAqTJ1tAlLVq3YERN7T5rGxQ+51t\nOaDFxqOqw4KizEIlEbr2eBbRJ0erQPhzsBaABSSZUJzy9UJWtLcUoEHfwJYr\nciy6ltQHwNEbYDFJdv8KdH74tPSojUwwM8rMR3kpnJBLfBn1lT0WkwkJ9Mrg\nVIonFL0wRe/9sUhkriLJ67RNryVV90M9NQiKa5KuNGJ/gS5bTKZYU++MiJWN\n3/IV\r\n=zzcH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"504211f78592cc32bc6ed6698da701046f68ec34","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.6_1626370423133_0.029227957599061716","host":"s3://npm-registry-packages"}},"1.0.7-beta.59.071f5af3.0":{"name":"@adaptr/web-sdk","version":"1.0.7-beta.59.071f5af3.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.7-beta.59.071f5af3.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"2c8b122e84c541e2c2046228b6dcf3ea383b4e22","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.7-beta.59.071f5af3.0.tgz","fileCount":27,"integrity":"sha512-JcU+iVYwzE21TlFI+AFW73SGFnLMknrKZuBB63bwXluUv5EH1d2H+diQeP5F/Y0hXG+p5a6UgljGvtorxkYy9Q==","signatures":[{"sig":"MEUCIGESYDZm8p3e+1XdrkSrt3SZnryG2SG6EhbGXkTheNWLAiEAlY0i1hVF/Z1hpWfL4SgQfyq1FA0gjuCyyuOHs0mdgfk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":295269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8ZFaCRA9TVsSAnZWagAAirAP/iUiwdHJ3vNu3YrZfU46\nztQx6fn5zzSVl4BRx/XSjMxxNm2ymyS/3hmniXEAcP6oarw6jfmpgnbLOZ5+\nIXjXlNZ7vRydHOW8lW6tfWu2sUunEJL8pJAKRKiQ5U39Giy3B7Fw42fKZ4k+\n3nrcGTFjZopcQudMCNWQ1m8TxVvvcfS0al/j4qKieZTm/6YQgHCUDeMoJ5Ly\nCrp2oC+axkoB1RGBfhd8slbnrlxgKWZXQxwvZLPEcnt5ztk7UslYyElDlFDc\nzwD4ajWqBOxmls2k1Njg2bMRntv/AvOXdhLpd8RL1OJXYPVY/le3RpuQnMML\nb0b4nb1P8S0uVdB7syNXyUlw22RHqxvtB8UzRAVdaKJwn5w8FTHomUfOiVPz\ny2AKFc+GVfivsyq4SS2fqylmhPI/HaS0+vWVYmlEw7E/FgGzrHac/v1eUjME\nul+HxcfSovzrmUfdS8pgU0EWiuirKURungxuo6iTpES1OCMQNHmXkvq/xTaR\nzjJ3DwXYZUunZKF0y+NYnzwjig2+ZAR4W+ctU4SWLy5sVaSod6Wfrc7PZKIM\nKEHq+kHmA9zQtdu7pW4K1KFnS4W3NgFD6tltR5t/ypJMGWcI3TKbf3kbYplk\ni7P8njc8/kfuAAJ7SKf3W1wJWvGSgl6IAjPI7ghhE0hn/rRPaNxdbwk6s1Sb\ns/b1\r\n=di8G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true,\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(`This station has a total of ${results.total} tracks. The first 10 are:`, results.audioFiles);\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"72d165e52b5a954112668bf58c837a72ec36be45","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3","@feedfm/eslint-config":"0.0.1-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.7-beta.59.071f5af3.0_1626444122582_0.7186489316060358","host":"s3://npm-registry-packages"}},"1.0.7-beta.62.afe0c3ea.0":{"name":"@adaptr/web-sdk","version":"1.0.7-beta.62.afe0c3ea.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.7-beta.62.afe0c3ea.0","maintainers":[{"name":"eca246","email":"chris@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"}],"dist":{"shasum":"084a0335c582562a569d1c5591b7cd8c17efcb69","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.7-beta.62.afe0c3ea.0.tgz","fileCount":29,"integrity":"sha512-MWrgOcJUFDz8e/cIPzSqyM+8p+zZ5LepqBBc8pDLSLUytH8yFVDpxhuXLR3sSrz2mAEcsqA4mFfncyrSKzkedQ==","signatures":[{"sig":"MEYCIQCkXkAfxhTzWOeKSHe7cw+Og60fQqKH24MvKOfgeb6L+AIhALv5zwFdPrtYmFRJ/NOAotW6Cob+yg293AlNl7+SOus7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8ZjSCRA9TVsSAnZWagAAYaMP/1P40c5txKp5oZKryyNS\nN3xCxJPAK0u0c3pVSaGrYkfO7SzaoW0bvbfOMpAnj5XGTGTWelUiPrydyH1X\nQ0yIr2anRH1PODSp+gxaVL+mXlatuEa/UOCxJmronYzd+1Y3FuJuah+OkF1o\nyCdK4+iNZ1ULmbPJ3x2y6NI8jNpFjiWA03llB11ZB98OpNHCGTrmf7bPfHWW\nOvC01qRi7k+taf79PggxSeLW545XSecBruszmeOEZTCJQDFrmo6k8xMak/gJ\nFB6Fnni/mq2nHiU8ahJRNjXEYwghHrdkoHAaYH0RcteKl+lUX+PGp4WZDBC4\nkQXRVqq3IeQ1ORVyeQitFYlD/oHGec8xrNrtQe/NPdbzq10rV+20LnUAPhQ3\n71USo9KyvLmgB4sAp9MeIc+s0syp4+SAFBKzM4VvmOIfpZYh1URnyZU8mRQS\nVILmi2o7H+S/FclEY7+bvuoBW9tlRllxwMZMCYl6+L4/xT0+Q0VJm4SvgFa4\nK/uW8G/E8ijGOhe/oeyCnFb0ZOSW8Mhx6b7mmo44YiBxSal6Tnx08Y+j2ewg\nO857iXM9jLWOYuPIywGb3kEkj62KDwrgobFPSqFEcXXCc/1XLYHR7Ugw7VBQ\nK5j5XZBIBqpGaq0noOxnzSOlaLF+JJB9a8mhnXuEX6QDJGugDUQJpsyVYtRo\n6lsz\r\n=6Gym\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true,\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(`This station has a total of ${results.total} tracks. The first 10 are:`, results.audioFiles);\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"b65fb42d39d144500b0c350017faf5ad403376a8","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3","@feedfm/eslint-config":"0.0.1-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.7-beta.62.afe0c3ea.0_1626446034389_0.6198301594384483","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@adaptr/web-sdk","version":"1.0.7","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.7","maintainers":[{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"048b957d07559debc41f7abec42fa9bdb5704738","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.7.tgz","fileCount":29,"integrity":"sha512-lYlUh3g8851I59vYcg05ELsQWQjpbud8xmO4cQu2P6iL1X3QE5O/PQmirfsEO+YoMoPd++zw9bRhd2r9oVfTxA==","signatures":[{"sig":"MEQCICHzPtN/aDKN+BIeMMaLNRamquzc11mPnowFLLd+44DFAiBCa23s/KuFJZl+rfCg12q9eG3UXmKgC6IQyYF3tLgD8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+Z9rCRA9TVsSAnZWagAAi7sP/jQ7ADtqXjisaFKr3urc\nZgMesYqEkL18xcgNGDC/tR1fkDhQMQD0pcTxP/AnetHBY47HmdzUIH0Sx+An\nMJyhO/qTAmGz1nMy3LZNYIWb/Vm6DcLQsTZ6fxpfL6TGXusrovBsMxsY0EAy\nQLKsQAiO9nOnvcth9ZvzJSMCLqZbjTXc/lx+EjaXXxabJEGDXEic6tiLtRvN\naXqwN0AA8sfpL55+kJ0TAsPbTmO7JCEb2rjZ6/qv1vH6k6WdcMqmHRzFvFq1\nn5eLKT2nSe20uoFRR1b5NziVnnRfLwSwKuuU09NaG8en3BNCwNx3m6dflrsd\nq3T9WjJiQjYrAGN3Ll6hQ0baqlW8rTSkT3pc+qrSsuXDoqHKdiMTTJ3F2f2k\nd5xVO+s5nbet9n1146jIlYfskzVgZsjE/kortpwan6Pg0xm5gg9ZhCrfVd29\n7BZ6wTDqqooz3uFUKjfa4GXBi2ejdNZM8ht6o7e+mwicgMxIKMczs1s49o+Y\n05qlNai+uBNuWhpXARuRDwIK3xfNZyefHoGSX6/CKUrRQ79aW4rpuR0jVZ9a\nmYnCVKGgxc8bYrmsQQDKNjdlH3eXKNbrmNfTKKA5X+/2CvZqRqNYhrvU1Nkl\njCduqPENL/oYv4qePF8hj9v36IP9GHMUsk7ePyB8D9AyeHyxL1GI5stfJEa/\nvZzl\r\n=ZLtW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1ceac76b79269b16984f1a6e8557c0351426007a","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3","@feedfm/eslint-config":"0.0.1-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.7_1626972011326_0.2852368311464475","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@adaptr/web-sdk","version":"1.0.8","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.8","maintainers":[{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"56f5b07b4afac06cad3bd1228483f0cde76f7b48","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.8.tgz","fileCount":29,"integrity":"sha512-ODOPY6A3LXRgU/ZsfTUbPhfhg1utXA8X8wc1hVWOSNU+awqJos8ZBlD+D6VfbVRzWQGRechSJOuOUPaPkTvHTQ==","signatures":[{"sig":"MEQCIGZHXkjjg70xrZzwNuJnsAOcOIBy7oIMQzY4cz5psQFHAiBfCZUMquyEIPYVUXoAd1iEf3WVZzfJlilDg1p9Af9XXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1v18CRA9TVsSAnZWagAAfhUQAJkQO6C77EzFD6UBxjqm\n9E+xM1CNESPRVFchsrDXMT5uLVSS9sJdi52UeXHvmZGieT2vXeXeuYMpmtka\n0mK3mV/OQkmpECZzPv82sm4DjfccvJbttJB33stMfQL8cjC7HYvhq/4uEPWR\newFAOPK9M0w3cVBgpfplZ1joXHQGQAUXp7P0cKxoXst/HoyYpUEmBEn6/YC0\n9CiHS2gbkKSg6Ax5ukF1NMB1XDPsbhVvCxhZ6IJPDFGsabRvABJ8qab2KV6O\n61L9s5p9sS0wnFQroc8+APgxPnL8xNj6paGtCm3m4OBTX0gp+Krqq9j6lED6\n7AYmgqni32GGHqLfEXpMDHwaULhijeKgAH4/ihItoqOLyKOHhuw0PLL/7I37\nK7KlPFc1PrwMlliLPD/HSV+GCWj4ozdNbsJglPXg/3yyFf3aYBClHmJeZXCc\nSN7nAqKKGFvdRxlvWNv/V63xeICe4J0H7slC2tzfxkPVPqBu51YRNujvEQCa\nPgLDqUWlnupNUr6D2q1qdy9TEJiKAjnCT3SHQId8ADgNTunDcWJbzSmqjgb+\nY0Ul0jCzwkpPHAH0Rpyp3AOKsUXMr6Vny1S53EtPo/Jr553liqZEsJLHOtsL\nX6pqrKv8cPnJHbDh25oFIRPO7QIgqKaJTrnaW3y1XftbMADbd/7+YwrZmVkd\ngE8+\r\n=Fc9X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"9581a2dac1084a8ee3a1dc5bfae584e429c036fa","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"7.19.1","description":"## Introduction","directories":{},"_nodeVersion":"16.5.0","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3","@feedfm/eslint-config":"0.0.1-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.8_1626972480443_0.08880713345923508","host":"s3://npm-registry-packages"}},"1.0.9":{"name":"@adaptr/web-sdk","version":"1.0.9","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.9","maintainers":[{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"feedben","email":"ben@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"1495208d8ea3667d5ac9264f909182f969e999bc","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.9.tgz","fileCount":29,"integrity":"sha512-+1+njyICh7nl3ND95zMzqEzNSsXUdk8FMI2Nmk5U3jsYukgR3/hs6P7pLvxp2MVmbnAMgCbNwxPBUxGgSA6sOw==","signatures":[{"sig":"MEUCIEbJaBF0koWChenTzVM4WQuGQs3ziB3rLEnJUJlP6zfnAiEAsX8jhJ6S6+knbj0s6YjpBtFYV+ViEGIPMutqOjjQNSo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":296892,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaYrAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriYg/8CLK3OizUKfSaDk0pZ+52U791u61sqB+KtVXsiVtPpJ6KOsKP\r\nuFJ1yZtu6KNqiM3ixRlk5YMrTvP4IUaZ50hRyBeW0pG3Qu9/LFBfGNS5gVJ+\r\nQzaIc/xlS5EXszIUeb5dcJtBbzclmjrj7tSKx+1TKo+AAl7qWJCl9ZsGfwIC\r\n+xxv0oJBn/0yR1ZEXj9D8rUY5AUQgBlaC9h1eMCOdt2sXp1KcbD31bZ7pFtz\r\nwwRNYutDcKK8FoY+BPJSjq2RYQ2bx8YDdMSpsflvMs1jQBHVxRb+1OEAwBnC\r\ncx3u3ayg6FAk5GPVTrugZ+qW5w2XtoUsC4TBG25pfQbWzAwWEDQ5EnuwFZEB\r\n8xYP8IW81cGv9eURimaaQMrjH5wG93NRSfLG35jPySA9H4gi/9jmDI5PpSQv\r\nMeeDUlm8wF/1ADd9mUestD9UXW5qn1lVj0F533Jkp+K9SYE/ToMeeGB7v/K0\r\n87DZS9qhsa0uW0NXVH+aAAH3T7OWpZcbeGADjVfvo2dL5AnBnZlShcIxQ9v8\r\nuA6tr2b0dz4nz+NFK2iFzXvi3IcAdxhrFFewaWe89LsBqO8I/xpqfU7PEr5j\r\nthEWFi5P5lbOsTRUcavfkHWhY0N+u8+kpMjyu/DCgo5xKphUFD6DhQx2s2mO\r\nrVrMRpDFAU70efKRbFKVCSChj3ol3gbcELY=\r\n=S9R1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"b81803fa6cba3144a62bd90fed5c3bc1e78c092c","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"jest","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeNotExported --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.5.0","description":"## Introduction","directories":{},"_nodeVersion":"16.14.2","dependencies":{"@types/jest":"^26.0.23","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3","@feedfm/eslint-config":"0.0.1-beta.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^27.0.6","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^7.15.0","esbuild":"^0.8.12","ts-jest":"^27.0.3","typedoc":"^0.19.2","prettier":"^2.3.2","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^4.9.1","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^4.9.1"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.9_1651083967867_0.40888167999504055","host":"s3://npm-registry-packages"}},"1.0.11-beta.80.8bac3416.0":{"name":"@adaptr/web-sdk","version":"1.0.11-beta.80.8bac3416.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.11-beta.80.8bac3416.0","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"4abf75795b206d19fceeddc7af28a595fd4ac206","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.11-beta.80.8bac3416.0.tgz","fileCount":29,"integrity":"sha512-wnuZaCg4Lg+7PHrKsxzKFV3P/37kKeu/ddCXSEf4n6XjGEWkL0ZCz0c3yVJb597Jb0tZYbcmAXGsihuwzUgeSQ==","signatures":[{"sig":"MEQCIFflnojdPe6iXZtZW/31cxs+gKJYY4hc/VWUfi1QHDgSAiA5elCYcxZYbXKzVu+Q+3xNkjuKNu2CsxlkesyjnvJEqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310840},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true,\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(`This station has a total of ${results.total} tracks. The first 10 are:`, results.audioFiles);\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"c47c78d20424da9d21500d5c631739f9f1265616","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.11-beta.80.8bac3416.0_1696815112541_0.594003991159227","host":"s3://npm-registry-packages"}},"1.0.11-beta.81.8b8bf1a1.0":{"name":"@adaptr/web-sdk","version":"1.0.11-beta.81.8b8bf1a1.0","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.11-beta.81.8b8bf1a1.0","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"34721ceb9a1bbe35b12968556e30d6523b115299","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.11-beta.81.8b8bf1a1.0.tgz","fileCount":29,"integrity":"sha512-3f5893myeeX+fYAbKBijqC2Izg4Udl50DXUoaZnhS/gMZKaMmJ8nWZTGDE0HDtJ9pL1B/qABUrbJ0+pW2jt9NQ==","signatures":[{"sig":"MEQCIGvYfLZBWgevQpY+UJDTdgzyKs9WBiaReo3GRgDqMUGxAiBTE4JVD/APhCifKMn1/GFK9z8uFZFQMb4AkUJVFKPLMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310840},"main":"dist/index.js","types":"dist/index.d.ts","readme":"# Adaptr Music Player SDK for Javascript\n\n## Introduction\n\nThe Adaptr SDK for Javascript allows you to play commercial\nmusic published via the adaptr.com website.\n\nThis javascript library makes use of the `Audio` element and works with all browsers\nthat support it: Edge 17+, Firefox 61+, Chrome 51+, and Safari 11.1+.\n\n**NOTE** - we do NOT support mobile web browsers using our Javascript SDK. While the\nJavascript SDK may have some success on mobile web browsers, we do not officially support\nthese mobile web integrations due to frequent platform bugs and limitations.\nTo create the best user experience, we recommend understanding\nthese limitations prior to developing on mobile web. In general, Adaptr best practices\ndiscourage the use of our Javascript SDK on mobile web to ensure the applications you develop\nare optimized for the best possible user experience. We recommend building native mobile\napplications which can utilize our iOS SDK and Android SDK.\n\n## Installation\n\n### Via npm\n\nInstall via npm:\n\n```shell\nnpm install adaptr-music-player\n```\n\n### Use &lt;script&gt; tag\n\nThe `dist/adaptr-script.js` file in this package is suitable for including\ndirectly in an HTML page. This is a self-executing function that exposes a global\n`Adaptr` variable to your javascript. The file has no external dependencies.\n\n### CJS or ES Modules\n\nAlternatively, if you're using a bundler, add the following to your code:\n\n```javascript\nvar Adaptr = require('adaptr-music-player');\n```\n\nor\n\n```javascript\nimport Adaptr from 'adaptr-music-player';\n```\n\n## Usage\n\n[Full documentation](https://docs.adaptr.com/javascript/index.html) on all\nclasses and interfaces is available [here](https://docs.adaptr.com/javascript/index.html).\n\n### Concepts and Operation\n\nAll interaction is done through a `Adaptr.Player` instance.\nA _player_ instance must be initialized with a token/secret pair,\nwhich it presents to the adaptr servers to retrieve a list\nof available music _stations_. Those stations\nmap directly to _playlists_ that were created and published using\nthe [adaptr dashboard](https://adaptr.com/dashboard).\n\nThe player can be instructed to stream music from a given\nstation or the player can be used to list and search for individual\nsong tracks (referred to as _audio files_ in the SDK) in those\nstations. Lists of tracks can be handed to the player for\nqueued playback.\n\nDuring playback, the player emits numerous events to enable monitoring\nand rendering UI elements.\n\n### Initialization\n\nThe Adaptr.Player class retrieves music from the Adaptr servers and\nsends them to the browser for playback. Adaptr.Player exposes simple\n`play()`, `pause()`, and `skip()` methods to start, stop, and advance\nmusic playback. The player plays songs in sequence from either a\n`station` (which is what `playlists` published via the\n[Adaptr dashboard](https://adaptr.com/dashboard) are represented as),\nor from a local play queue containing individual songs selected from\nthose stations.\n\nThe SDK is initialized like so:\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\nplayer\n  .initialize()\n  .then(({ stations }) => {\n    // player successfully initialized.\n  })\n  .catch(() => {\n    // player unsuccessfully initialized, likely due to licensing\n    // restrictions. No music is available for playback.\n  });\n```\n\nThe player is initialized by passing it your `token` and `secret` credential\nvalues provided in the [Adaptr dashboard](https://adaptr.com/dashboard). For\ntest purposes, you can use `adaptr` as your token and secret.\n\nThe call to `initialize()` causes the player to contact the Adaptr servers,\nvalidate credentials, and retrieve the list of stations that is has\naccess to.\n\nThe player may not successfully initialize if the end user isn't in a\nlocation licensed to play the music for the given credentials, so it\nis important to handle this exception.\n\nIf you'd rather not use promises, the player emits events that can be\nlistened to via the `on()` method.\n\n```javascript\nlet player = new Adaptr.Player('adaptr', 'adaptr');\n\nplayer.on('stations', (stations) => {\n  // music is available for playback!\n});\n\nplayer.on('music-unavailable', () => {\n  // music is not available for playback\n});\n\nplayer.initialize();\n```\n\nFor a very simple example of the player in action, check out\n[this jsbin](https://jsbin.com/vetefamejo/1/edit?html,js,output).\n\n### Station playback\n\nA call to `playStation(stationName)` will begin immediate playback of\nmusic from the station with name `stationName`. An exception will be thrown\nif no station with the given name exists. The available station names can be\nfound in the `stations` array returned from the `initialize()` promise,\nthe `getStations()` method, or the `stations` event.\n\nThe following code renders an HTML list, where each item represents\none of the available stations. When an item is clicked on, playback of\nthe station begins.\n\n```html\n<ul id=\"station-list\"></ul>\n\n<script>\n  let stationList = document.getElementById('station-list');\n\n  let player = new Adaptr.Player('adaptr', 'adaptr');\n\n  player\n    .initialize()\n    .then(({ stations }) => {\n      let items = stations.map((station) => {\n        return '<li data-name=\"' + station.name + '\">' + station.name + '</li>';\n      });\n\n      stationList.innerHTML = items.join('');\n\n      document.getElementById('station-list').addEventListener(\n        'click',\n        (event) => {\n          if (event.target.dataset.name) {\n            player.playStation(event.target.dataset.name);\n          }\n        },\n        true,\n      );\n    })\n    .catch(() => {\n      stationlist.innerHTML = '<li>Sorry - no music for you!</li>';\n    });\n</script>\n```\n\nYou can run the above code in [this jsbin](https://jsbin.com/totadivalu/1/edit?html,js,output).\n\nWe can add some more interactivity with play/pause and skip buttons that\nare implemented with the `play()`, `pause()`, `skip()`, and `stop()` methods,\nand by watching the playback events triggered by the player:\n\n```html\n<button id=\"play-pause-button\" disabled>play</button>\n<button id=\"skip-button\" disabled>skip</button>\n<button id=\"stop-button\" disabled>stop</button>\n\n<script>\n  //\n  // ... initialization code from previous example\n  //\n\n  let playPauseButton = document.getElementById('play-pause-button');\n  let skipButton = document.getElementById('skip-button');\n  let stopButton = document.getElementById('stop-button');\n\n  playPauseButton.addEventListener('click', () => {\n    if (player.getCurrentState() === 'playing') {\n      player.pause();\n    } else {\n      player.play();\n    }\n  });\n\n  skipButton.addEventListener('click', () => {\n    player.skip();\n  });\n\n  stopButton.addEventListener('click', () => {\n    player.stop();\n  });\n\n  player.on('playing', () => {\n    playPauseButton.innerHTML = 'pause';\n    playPauseButton.disabled = false;\n    skipButton.disabled = false;\n    stopButton.disabled = false;\n  });\n\n  player.on('paused', () => {\n    playPauseButton.innerHTML = 'play';\n  });\n\n  player.on('idle paused', () => {\n    skipButton.disabled = true;\n  });\n\n  player.on('idle', () => {\n    stopButton.disabled = true;\n  });\n</script>\n```\n\nThe code above starts playback of a station when you click on it, and\nyou can pause, resume, and skip songs via the buttons. You can also\nstop playback of the current station with the stop button.\n\nCheck out [this jsbin](https://jsbin.com/tobapebezu/edit?html,js,output) to\nsee that code in action.\n\n### Discovering Individual Songs\n\nThe player can be used to discover individual tracks that can be added\nto a play queue and handed to the player for playback.\n\nTracks can be discovered by paginating through the available stations:\n\n```javascript\nlet station = player.getStations()[0];\n// search for the first 10 tracks in this station:\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  console.log(`This station has a total of ${results.total} tracks. The first 10 are:`, results.audioFiles);\n});\n```\n\nNote that page indices begin at '0'. See [this jsbin](https://jsbin.com/subazeyona/edit?html,js,output)\nfor example code that retrieves the contents of the demo music stations.\n\nTracks can also be discovered through search:\n\n```javascript\n  player.searchAudioFiles('time', { perPage: 10 });\n    .then((search) => {\n      console.log(`We found ${search.total} matching tracks. The first 10 are:`, search.results);\n    });\n```\n\nSee [this jsbin](https://jsbin.com/wavutoduzu/edit?html,js,output) for an example\nsearch script.\n\n### On-Demand Queued Playback\n\nThe `audioFile` entries returned through search and station fetching\ncan be queued in the player, so that they play as if they were\na station:\n\n```javascript\nlet station = player.getStations()[0];\n\nplayer.fetchAudioFilesInStation(station.name, 0, 10).then((results) => {\n  // play the 2nd and 5th song\n  player.playAudioFiles([results.audioFiles[1], results.audioFiles[4]]);\n});\n```\n\n[This jsbin](https://jsbin.com/rifipomisa/edit?html,js,output) queues up all the songs\nfrom the result of a search for playback.\n\nWhen all the songs in the queue have been played, the player will transition\nto the 'idle' state and emit a 'music-exhausted' event.\n\n### Initializing Audio on User Event\n\nModern web browsers require that audio playback be initialized in a user event\nhandler. This means that auto-play of music on page load isn't possible. This\nalso means, for the Adaptr player to work, you must call an Adaptr method from\nwithin a user-triggered event handler. Specifically, you must call `playStation()`,\n`playAudioFiles()` or `initializeAudio()` from that event handler. The `initializeAudio()`\nmethod doesn't start any music and it is safe to call multiple times without affecting\nplayback, so we recommend calling `initializeAudio()` from any available user-triggered\nevent handler on a page.\n\n## SDK Docs!\n\nThe full docs for the SDK are located [here](https://docs.adaptr.com/javascript/index.html).\n","gitHead":"148c6b92ab82c5d676c528371251c3ac829f241d","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.11-beta.81.8b8bf1a1.0_1696815160618_0.3208292518443565","host":"s3://npm-registry-packages"}},"1.0.11":{"name":"@adaptr/web-sdk","version":"1.0.11","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.11","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"bdb1642b8f5abae91a937886729848611c0b79e4","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.11.tgz","fileCount":29,"integrity":"sha512-kmbWRCv2EWXlVlkYO6jcvMNDrqwkMvL+JHq1qQGOCvZ1ssopi5v8hKlglBSI7UDx4i92gu06xyla1nLAciojSg==","signatures":[{"sig":"MEUCIQCOFOwQVuTFw4kHSYb4VhNxVyK+i4w4j074ETjlcF6bnwIgeuWAxu43JOC8vr9Ta+irxCOMXtzqEVJgXpHX5pb99x4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310821},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"347f25225cc2cd9d247683644bc7d37d52d259a5","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.11_1696815461204_0.8343484132867209","host":"s3://npm-registry-packages"}},"1.0.12":{"name":"@adaptr/web-sdk","version":"1.0.12","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.12","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"46ecca037289c6972bec79700539b3684e3206cc","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.12.tgz","fileCount":29,"integrity":"sha512-zRtEqwB+GLz8g/mpnBEArDGin/cZm0dfeJnTbz+6ZqV+1qjJkKNwAOsnPwEOI0QwVrde0iMcov/0PrlEX68/ew==","signatures":[{"sig":"MEUCIQDlWnlM9LtuenTMQMdvXR+fKsM5h9+xc7TcxT6sF1S9/QIgdnqJDVe4ujUJZgit8PuYODJHKahU+QsTtV6FlQ5Mss8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310821},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f5cc9b8072ce3a9970779ceee04a7a13c0fb60cb","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.12_1696815895404_0.4942611220634088","host":"s3://npm-registry-packages"}},"1.0.13":{"name":"@adaptr/web-sdk","version":"1.0.13","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.13","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"3f0371ea40b6b831ace5f6b78e71062ee65f1009","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.13.tgz","fileCount":29,"integrity":"sha512-HoWtTohFp5pBj/qZZ3+qKd6x5qFAi0x1WhXn2JY6//LEuBbmWWP21Gprxzixl6Sb/tGBVgiJgLllRaPCdmlplQ==","signatures":[{"sig":"MEYCIQDVP2gjJAPAsccx6MFjiDR/xsVVc/4oQP8RoQoGDpZsjgIhANVKrtKfS0klcjrcSX7CPRJhfvQLYK72XA6NOWU9yACI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310821},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a032fdead95032e220a57ec5a0f245d2aa4bb54e","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.13_1696816081629_0.40898529833861774","host":"s3://npm-registry-packages"}},"1.0.14":{"name":"@adaptr/web-sdk","version":"1.0.14","author":"","license":"ISC","_id":"@adaptr/web-sdk@1.0.14","maintainers":[{"name":"gwilliams958","email":"greg@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"6fde0bfb52dc7233a4d6992adeecc15b91fe95a4","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.0.14.tgz","fileCount":29,"integrity":"sha512-PYaWPkbb1a7MljTPs8ogf4YZvnMbvPSB4o4Zh1fXsRxd5QNrky6dT7RFtpfnXOgBmqkOEY8DNKgjMblLvsocdQ==","signatures":[{"sig":"MEUCIQDD4T/maOcyr7eTXqej497N0rWlc6V+ZjwWtHhiJGQQKAIge0TKyiMfWzCPV7v9NAiXFGwMQ6oyj2FPlfnEk3DiAdk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310820},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"6b5c803766481f9742dd33510c952a15973e72dc","scripts":{"dev":"npm-run-all -p serve watch-build-script","test":"echo no tests yet","build":"npm-run-all --parallel build-module build-script --serial build-docs","serve":"serve .","prepare":"husky install","release":"standard-version","lint-fix":"eslint --fix src && prettier --write .","build-docs":"rm -fr docs/* && npx typedoc --plugin typedoc-plugin-no-inherit --excludePrivate --excludeExternals --disableSources  -out docs ","lint-check":"npm-run-all lint-prettier lint-eslint","lint-eslint":"eslint src","build-module":"tsc","build-script":"esbuild src/index.ts --bundle --target=es6 --format=iife --global-name=Adaptr --outfile=dist/adaptr-script.js","lint-prettier":"prettier --check .","publish-doc__orig":"aws s3 sync docs s3://feedfm-static-docs-adaptr-com/javascript && aws cloudfront create-invalidation --distribution-id E3NFN4VRT0RB19 --paths '/javascript/*' ","watch-build-script":"watch 'npm run build-script' ./src"},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"## Introduction","directories":{},"_nodeVersion":"16.20.2","dependencies":{"@types/jest":"^29.5.5","query-string":"^6.13.7","@billjs/event-emitter":"^1.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","jest":"^29.5.5","none":"^1.0.0","husky":"^6.0.0","serve":"^11.3.2","tsdoc":"0.0.4","watch":"^1.0.2","eslint":"^8.50.0","esbuild":"^0.8.12","ts-jest":"^29.1.1","typedoc":"^0.25.1","prettier":"^2.3.2","eslint-cli":"^1.1.1","jest-junit":"^12.2.0","typescript":"^4.1.2","lint-staged":"^11.0.0","npm-run-all":"^4.1.5","tiny-cookie":"^2.3.2","standard-version":"^9.0.0","eslint-config-prettier":"^8.3.0","typedoc-plugin-markdown":"^3.1.0","@typescript-eslint/parser":"^5.62.0","typedoc-plugin-no-inherit":"^1.2.0","@typescript-eslint/eslint-plugin":"^5.62.0"},"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.0.14_1697151133677_0.6026815801916485","host":"s3://npm-registry-packages"}},"1.2.1-beta.42.2d5bb625.0":{"name":"@adaptr/web-sdk","version":"1.2.1-beta.42.2d5bb625.0","keywords":[],"author":"","license":"ISC","_id":"@adaptr/web-sdk@1.2.1-beta.42.2d5bb625.0","maintainers":[{"name":"brendan_fmg","email":"brendan@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"e06b29e3e7807eff74f1666a48b6602a27f1ab3d","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.2.1-beta.42.2d5bb625.0.tgz","fileCount":1,"integrity":"sha512-7l837fSJI7sUR2RWZt1nwIrsf69WmjxuEaJxr4jTz6nOdyEZBRvVMQsVCoAwZFXmEx+Giulis1ZhTKRkgD00dw==","signatures":[{"sig":"MEUCIQCnBwL4lBEEhxi5X6XqT/HguT1rbftdUY9V7JFlVKZLaQIgfeZgDfehLXZYgyeAgnieXeg4QEVr3D+1t/X3RIUC524=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":362},"main":"./dist/index.js","types":"./dist/index.d.ts","unpkg":"./dist/web-bundle.js","module":"./dist/index.m.js","readme":"ERROR: No README data found!","browser":"./dist/web-bundle.js","gitHead":"2d5bb6252336dc5ed6e38b69f227ad32548996f8","scripts":{},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.2.1-beta.42.2d5bb625.0_1708537169936_0.8695868755189344","host":"s3://npm-registry-packages"}},"1.2.1-beta.43.0f5c87eb.0":{"name":"@adaptr/web-sdk","version":"1.2.1-beta.43.0f5c87eb.0","keywords":[],"author":"","license":"ISC","_id":"@adaptr/web-sdk@1.2.1-beta.43.0f5c87eb.0","maintainers":[{"name":"brendan_fmg","email":"brendan@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"6793048909dc945cdbc06f7e55c08b61c5520a0a","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.2.1-beta.43.0f5c87eb.0.tgz","fileCount":1,"integrity":"sha512-1KqIWqamwiuWEGs9helZK7ORFf+H9UV36xPoAVaEQ9zzREAcK76bb9vWWy7EziflCvJalyRBOUXyqVBZf/wEhQ==","signatures":[{"sig":"MEQCIDOB0o4WNtwo2p4+Bv4Yorgh7DbO9LJoJsSztm3IFxmnAiAy5ET2Fa0wLuyt67zCdQER0m2b2yPjlcrihau1U7q5XQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":360},"main":"./dist/index.js","types":"./dist/index.d.ts","unpkg":"./dist/web-entry.js","module":"./dist/index.m.js","readme":"ERROR: No README data found!","browser":"./dist/web-entry.js","gitHead":"0f5c87eb457e038fa288b4e8da53c9c01fe1cb2e","scripts":{},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.2.1-beta.43.0f5c87eb.0_1709053180239_0.9911067446140833","host":"s3://npm-registry-packages"}},"1.2.1-beta.44.4bbbb09c.0":{"name":"@adaptr/web-sdk","version":"1.2.1-beta.44.4bbbb09c.0","keywords":[],"author":"","license":"ISC","_id":"@adaptr/web-sdk@1.2.1-beta.44.4bbbb09c.0","maintainers":[{"name":"brendan_fmg","email":"brendan@feed.fm"},{"name":"mishugana","email":"mishugana@gmail.com"},{"name":"mbelyaev","email":"mikhail@feed.fm"},{"name":"ericlambrecht","email":"eric@feed.fm"},{"name":"mslade","email":"mark@feed.fm"},{"name":"eca246","email":"chris@feed.fm"}],"dist":{"shasum":"6c7b980ea7e80a5a54736f4a444a8fe3debaff6b","tarball":"https://registry.npmjs.org/@adaptr/web-sdk/-/web-sdk-1.2.1-beta.44.4bbbb09c.0.tgz","fileCount":62,"integrity":"sha512-FNRw6j2RB8rW3uJKOaEPPCT5QfNtkeS3IhJv2RdZLKTxWfUZwhfzMaKb8+wOMGtuIoWedx6jngG1x6zr9EriQA==","signatures":[{"sig":"MEYCIQDPPBPmqSPrc+52mdjrf/V4gcZcF5u7xJ4gPws0u4mD7gIhAKdUcMuBwkysi90TWXwJMN94bqmoB7MOYu9dAiGCYUBt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":483290},"main":"./dist/index.js","types":"./dist/index.d.ts","unpkg":"./dist/web-entry.js","module":"./dist/index.m.js","readme":"ERROR: No README data found!","browser":"./dist/web-entry.js","gitHead":"4bbbb09c74b80eeca6c6d70c24d9d5f8a83b0269","scripts":{},"_npmUser":{"name":"ericlambrecht","email":"eric@feed.fm"},"_npmVersion":"8.19.4","description":"","directories":{},"_nodeVersion":"16.20.2","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/web-sdk_1.2.1-beta.44.4bbbb09c.0_1709053822657_0.9007362058083235","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-07-12T14:33:02.629Z","modified":"2026-09-10T18:14:58.229Z","1.3.1-beta.30.7c0b5a9b.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.23.b987e226.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.38.c92acbd0.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.26.c2b6afc8.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.39.3256d648.0":"2021-07-09T14:19:50.556Z","1.4.1-beta.43.8f3334a0.0":"2021-07-09T14:19:50.556Z","1.4.1-beta.45.0903c817.0":"2021-07-09T14:19:50.556Z","1.4.1":"2021-07-09T14:19:50.556Z","1.4.1-beta.42.7d51c9f5.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.35.071094f1.0":"2021-07-09T14:19:50.556Z","1.4.1-beta.44.0864dd22.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.33.3b26ab06.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.41.bedeb603.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.31.5de6dbde.0":"2021-07-09T14:19:50.556Z","1.4.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.34.faa4a705.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.36.53ebcc76.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.40.266f896f.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.24.e6c812f2.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.32.71a5ee56.0":"2021-07-09T14:19:50.556Z","1.3.1-beta.29.e5792f7a.0":"2021-07-09T14:19:50.556Z","1.0.1":"2021-07-12T14:33:03.151Z","1.0.2":"2021-07-12T14:46:45.016Z","1.0.3":"2021-07-12T14:58:10.738Z","1.0.4":"2021-07-12T15:11:06.945Z","1.0.5-beta.47.9ff952f1.0":"2021-07-13T14:35:10.845Z","1.0.5-beta.48.c3894321.0":"2021-07-13T14:41:01.073Z","1.0.5":"2021-07-13T15:24:45.009Z","1.0.6-beta.52.cac8f1fc.0":"2021-07-13T17:25:58.216Z","1.0.6-beta.53.bf254f9c.0":"2021-07-15T12:19:56.485Z","1.0.6-beta.54.4f313168.0":"2021-07-15T12:21:25.007Z","1.0.6":"2021-07-15T17:33:43.349Z","1.0.7-beta.59.071f5af3.0":"2021-07-16T14:02:02.707Z","1.0.7-beta.62.afe0c3ea.0":"2021-07-16T14:33:54.542Z","1.0.7":"2021-07-22T16:40:11.463Z","1.0.8":"2021-07-22T16:48:00.592Z","1.0.9":"2022-04-27T18:26:08.056Z","1.0.11-beta.80.8bac3416.0":"2023-10-09T01:31:52.818Z","1.0.11-beta.81.8b8bf1a1.0":"2023-10-09T01:32:40.858Z","1.0.11":"2023-10-09T01:37:41.500Z","1.0.12":"2023-10-09T01:44:55.629Z","1.0.13":"2023-10-09T01:48:01.846Z","1.0.14":"2023-10-12T22:52:13.878Z","1.2.1-beta.42.2d5bb625.0":"2024-02-21T17:39:30.062Z","1.2.1-beta.43.0f5c87eb.0":"2024-02-27T16:59:40.383Z","1.2.1-beta.44.4bbbb09c.0":"2024-02-27T17:10:22.821Z"},"license":"ISC","description":"## Introduction","maintainers":[{"email":"mishugana@gmail.com","name":"mishugana"},{"email":"eric@feed.fm","name":"ericlambrecht"},{"email":"mark@feed.fm","name":"mslade"},{"email":"brendan@feed.fm","name":"brendan_fmg"}],"readme":"","readmeFilename":""}