{"_id":"@audapolis/webvtt-writer","_rev":"9-bd5fa328c1276d1e5d1fcd4548235a8b","name":"@audapolis/webvtt-writer","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.2":{"name":"@audapolis/webvtt-writer","version":"1.0.2","description":"A small library to create WebVTT (and SRT) files","main":"dist/WebVtt.js","types":"./src/WebVtt.ts","scripts":{"build":"tsc","lint":"eslint . --ext .ts","format":"prettier --write 'src/**/*'","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"keywords":["webvtt","subtitles","typescript"],"author":"","license":"AGPL-3.0","bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"homepage":"https://github.com/audapolis/webvtt-writer#readme","devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","esbuild":"^0.12.28","esbuild-jest":"^0.5.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.25.1","eslint-plugin-unused-imports":"^1.1.4","jest":"^27.4.7","typescript":">=3.3.1 <4.5.0","prettier":"^2.3.2"},"gitHead":"063c9d64de3b406c5823004a725753d4e6d7c26f","_id":"@audapolis/webvtt-writer@1.0.2","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-hmq0qHCSrcdII692ERYyaCsA3/5dSg79KUu+9gEqIwjAaAsUl3SQRO6hPUMrw41Enfwcu7Q8e6fEFRzsAcj76Q==","shasum":"1a47375e91505f42b64c5c86b323b8ecbce2ae6a","tarball":"https://registry.npmjs.org/@audapolis/webvtt-writer/-/webvtt-writer-1.0.2.tgz","fileCount":13,"unpackedSize":26648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2FMDCRA9TVsSAnZWagAAJjsQAJlMr4dqojlf65z5liwW\nDJMIKnSsR+uTkWbJCibXJKC79b5kuhY6rngtUbo9rHQJVkbISf11/6+DjKmX\nCyPRSpPtt265CWuhSdUro28usTMX74Hc0B3paX2JqlKUg1KUVl0lYcBG+XPi\nytDvNfBC9PcYVq4jo0OicCKAfo7RmakP702uPcl/O76EIcYnmUb7+ngZuJap\nYafqThLCQ9G9hiS1k694tsNOOZI4VvFpdbqtJIK8fbzp2TXQmedtoWtaztuB\nB+bMBSix5KFC9RPduRUszzo5GPODQXiKLeQOq92DZZ4WZTh/XdrxfkiLn8PW\nVJ0uZCoHbJu1vHEwN4w1yaQ3Ic+5C+JMZBzgtO40iEc6NYzD1OURo0W6R0v+\nLjS4Hn1+SnQuaykqVvp1jDel+ZTAg/ZrDDQt0D88++NXzHoVvLXU3ESLX3x0\nBCJUpwVrY95rQrdQhkoxJxtzAQznbnW7pbZG/gCcDo3Q99umBAi8dkodwUt5\nR+0srAw7vJ7vk3fKHk5AcZZ9A80Qo64+UIPQSCdNUjFtUEHmq6whWztNeU1h\n/fapTrDrix/dIkBXj7CzQlcFriVwK8V9yUSWbFYf2z+SwBlyS6Og7GkSFdfH\n9yVEu7lrOm7TX06B0vnIvM6n4nNDTqcQNbZ/FOd0uylxckgQW1ofJeVPpiZA\nUb4u\r\n=nzQk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5sH4zLGS+NIMIKO5/sV3mRJ97yIyClxZOgzQP/RFqTQIgfYUIgw6j7O6Enh1ffhD83nYQCxdSYAXZCv6gMAME3WI="}]},"_npmUser":{"name":"pajowu","email":"npm@ca.pajowu.de"},"directories":{},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webvtt-writer_1.0.2_1641566979456_0.10709332914677838"},"_hasShrinkwrap":false},"1.0.3":{"name":"@audapolis/webvtt-writer","version":"1.0.3","description":"A small library to create WebVTT (and SRT) files","main":"dist/WebVtt.js","types":"./src/WebVtt.ts","scripts":{"build":"tsc","lint":"eslint . --ext .ts","format":"prettier --write 'src/**/*'","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"keywords":["webvtt","subtitles","typescript"],"author":"","license":"AGPL-3.0","bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"homepage":"https://github.com/audapolis/webvtt-writer#readme","devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","esbuild":"^0.12.28","esbuild-jest":"^0.5.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.25.1","eslint-plugin-unused-imports":"^1.1.4","jest":"^27.4.7","typescript":">=3.3.1 <4.5.0","prettier":"^2.3.2"},"gitHead":"12c3c2e58a967a7d2b098caab5adf069f389019c","_id":"@audapolis/webvtt-writer@1.0.3","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Ow4Jlkaz+hyuuvsIZ3WwINwH+M+Kdtw3UK4MNCEAyvaSuHd1yDmwvORjFjAhQQZpKQ94Gz9FgRgMSnFJc0eYLw==","shasum":"548e88ffc02af77b40273ed7e3672b868c20643e","tarball":"https://registry.npmjs.org/@audapolis/webvtt-writer/-/webvtt-writer-1.0.3.tgz","fileCount":13,"unpackedSize":26698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2F0aCRA9TVsSAnZWagAAO0AQAKHnVY/6kX16JIipf1l2\nJ+9cuY3Drm48HXWDEB08smt1W3C2nPQsNYgVXEAQgTyiYW76W7CQ+WQATl4t\nna4Kb/ly0e9F8gHRe85pU9ET0ToL4si90gbZgMmwSLCw4l4teOmywgFImff8\nEwPe19pJYruHcN6gczbYZnqxf041EIuKqA6q1WBhp/Gew8m0NsFKmwyaal/c\nnMiEnF59/Bs/1dx21t720rQ327aRaP417Eod1eZLKtHduWdqHS3Tj74iJe/L\nHH20wstWkSkgo+SNoBbjnt5zlBWtJCnJ1KOFm6nYjQ2YSMwR9FQ4er+soWwq\nG9XTgOeRh/Vj8XsDRCNUFCMvvp+h3adPOD0jZXcD9EaIDweM72Pi4rM/vyG+\n0f2O8IRIdKrYTX7VUoBPCroeOrhralvOfQNSmEYQ01Hc9L2ZHgIPQaVqjtVw\n9YmyOJRbxBHB4HTP4JTrHZ5kDRHKjv/qLhoQ+qYsH8uMfx/uwwHCwrhp8Zm4\nA6hMvuOq+0vfXm98HoV0qCs+AjnWF/l1mNWX/EREl/Lkr5TNobFYKIYPd/Vl\nYc1QUckU3GEgHtpx94hxI0dSGNQGGMeeElszto1nosiYkPXuX3p3MwWXigW9\nu4YZFQcpdIwpbZPukDBtVUpGarH7cjPlfnoBcVmj/VwqUd4F0yN5oQehGwHY\nD0+f\r\n=swiu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHNpm23DgjjxIpt4xnPDAcHut5XFBZXFrFR2UhXCTzEkAiEAzpCB8ao/6sJoSOLUnWhxbCKVs8OGhnFuv6G+YaZrHJ8="}]},"_npmUser":{"name":"pajowu","email":"npm@ca.pajowu.de"},"directories":{},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webvtt-writer_1.0.3_1641569562190_0.15461948814770543"},"_hasShrinkwrap":false},"1.0.4":{"name":"@audapolis/webvtt-writer","version":"1.0.4","description":"A small library to create WebVTT (and SRT) files","main":"dist/WebVtt.js","types":"./src/WebVtt.ts","scripts":{"build":"tsc","lint":"eslint . --ext .ts","format":"prettier --write 'src/**/*'","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"keywords":["webvtt","subtitles","typescript"],"author":"","license":"AGPL-3.0","bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"homepage":"https://github.com/audapolis/webvtt-writer#readme","devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","esbuild":"^0.12.28","esbuild-jest":"^0.5.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.25.1","eslint-plugin-unused-imports":"^1.1.4","jest":"^27.4.7","typescript":">=3.3.1 <4.5.0","prettier":"^2.3.2"},"gitHead":"a99b25557ba774362b4f139cffc69025b1a40026","_id":"@audapolis/webvtt-writer@1.0.4","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-x7MZqMP0ggV3sklREiTnDi+/J81l1qGNJ0mMiYmX4K2NjEIyqkhkovFYzih7OW7H7XAVkr1kM+afwTejcQVuNg==","shasum":"2956ad992d7e177230017e32f5d6d488d6527c82","tarball":"https://registry.npmjs.org/@audapolis/webvtt-writer/-/webvtt-writer-1.0.4.tgz","fileCount":16,"unpackedSize":74732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2J93CRA9TVsSAnZWagAAor4QAKRbwh1KEM5H2xl02xti\nFLoQi5/5ytG0gZb1Imr8fnWTfCP4RxXRRoUxhh6LJwOFTs+7K7kZywcCcGxZ\nXH/g48gY0gvwg7gUvyBlZExIHoUtkMJysHCPUhgUo5CBphdtPzyTUuThw5Ba\nUNZxYtn2k0iuacMUXWqKXDisu/EoHmyq2fRKTR7o7RlF43G2vutID8g2Xu0Y\nqI+HNA6X154RKdCoURyABRF7hi9FUu/YSXgUwkJ6DKa5wdfG/T5rCb6qHtJW\nuq6NlfT9gWqYAeVRQe1naP8U2g7mNv3UdHGcOWtp2T6SWNLKvymwa+cFM6ep\nh1O/vpEOjLvv8LX+g6BExdLJKLH9PI30k6UNP9NUeaFhdJfbl7cbv3KzFSjW\npd52f/cHqeZ5hL3aVX47lv2L7y1JuJtVSdDrJ2KxOEZX7mE2ka02wMQb2Ipe\nvQ5zR9JcYPdoWPAOAAhS3QYq5Fe2pb6fvyGvHwJWc9GAoXXP8x6ic3vg2Drr\npJIVrOGF4mekhWbdXLz3n1UeUKd2+r2mw9/a8OeOS+UoVwF4Wld57Rxw9anj\nTDD08ylV5r+pJ6aH2gbWzqScqb9pAItfUAnEJ6k/AtpQsIOwowttkkCuc5fq\ni86J6Agu7DxZ7sU90JL6UF4ubMuZLMSzmg0RiSorZDUjk9bwKMPlt4t2Z/QZ\nEn7j\r\n=o5mQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoWF0k7YWxAWhXAlZPbCIALNav7gCl7gbaqXX8VKqB0QIhAK7TSzd2NpMlOrt4gSmu1ti/l64Udfnqbwc7ruGP3nGP"}]},"_npmUser":{"name":"pajowu","email":"npm@ca.pajowu.de"},"directories":{},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webvtt-writer_1.0.4_1641586551775_0.33643006585577395"},"_hasShrinkwrap":false},"1.0.5":{"name":"@audapolis/webvtt-writer","version":"1.0.5","description":"A small library to create WebVTT (and SRT) files","main":"dist/WebVtt.js","types":"./src/WebVtt.ts","scripts":{"build":"tsc","lint":"eslint . --ext .ts","format":"prettier --write 'src/**/*'","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"keywords":["webvtt","subtitles","typescript"],"author":"","license":"AGPL-3.0","bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"homepage":"https://github.com/audapolis/webvtt-writer#readme","devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","esbuild":"^0.12.28","esbuild-jest":"^0.5.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.25.1","eslint-plugin-unused-imports":"^1.1.4","jest":"^27.4.7","typescript":">=3.3.1 <4.5.0","prettier":"^2.3.2"},"gitHead":"861f82d59128df29f832844bbb93e4e63fa4ee26","_id":"@audapolis/webvtt-writer@1.0.5","_nodeVersion":"16.16.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-TStO+rZvUtux8/lydRGv5zzE8aFASGJESkcVhDTGU8U8momcYN9nD94ZpCBQey4WDtevBgB/D42P5za4NbU42g==","shasum":"2de3e848ce8779dd177e1373fc023f5cf82d15f5","tarball":"https://registry.npmjs.org/@audapolis/webvtt-writer/-/webvtt-writer-1.0.5.tgz","fileCount":16,"unpackedSize":74807,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0uD54BtPB1N/yVTz9p9/XFIhG1yAO5ZmnEXbAUhAKqAiAGgdCIPijWzNXRV9Ujif3mieAP3h3/0l8aDedn3b7EAQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCnQDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoHxA/+L6TCjc5yKk28Vj6sRtj5JQHhIosWv0u9FRVTyW+nSaEN0omW\r\nO35jFWilobxaGBxCOa20wR0o83Z3ijT1k7qoFoP6DW1/ZUvfJ+vsvQgY/02J\r\nT7JmRjismr1+0Sjku3CjGUTolmZkwqKtyn+thP6WTmAps1Kr9IeDr+b87E5B\r\nHfAfJZL6ONWLFqk86sCj6XLFDsWRLh0uUrhSV1t+8/UDmftfc+epGoHORRr8\r\nLm4OCKvcioSIqEpie+rLskFq6WK0qaKxVES808+HUWtY0JWJt7vVP47Zlk+0\r\nAUdauUx46d8b/Q2sfSlp2+UDrCLDXN0MfmHxKhpz9kHENC4JkeXGLBX3vr2X\r\nQfQGeO4dDYRTWCA3KOm/mbIkCSG84TG7lAeMttMGVUzlxBXVY+yD5MDz1vyG\r\nxlRvF5nQJB8csmNUqnbysxBEehpdeW82hyoNdRLJc7lPoievyvdTEty6zH1d\r\nsTWexW93ltyucI0HJ+6aoPEGqVhZuDhEvi/EKQDUeNyIeiBAjmj64vMko/Gb\r\nksoNnHsXRtOhs7p0zMVu8ScrDRrdGHn3K5Sjhr7PaOdDIe9uoRlalONmzYsn\r\nR7Rd5YaigGY4qJFVMvSUWFQ4CmcONtAvNeKOYirMjwh0g+sHWQKQd7uqZnPl\r\nINno19No7NncN1BMFWr0ZVt40iCQtO6zPSo=\r\n=TuJ4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pajowu","email":"npm@ca.pajowu.de"},"directories":{},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webvtt-writer_1.0.5_1661629443675_0.8222756468838657"},"_hasShrinkwrap":false},"1.0.6":{"name":"@audapolis/webvtt-writer","version":"1.0.6","description":"A small library to create WebVTT (and SRT) files","main":"dist/WebVtt.js","types":"./src/WebVtt.ts","scripts":{"build":"tsc","lint":"eslint . --ext .ts","format":"prettier --write 'src/**/*'","test":"jest"},"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"keywords":["webvtt","subtitles","typescript"],"author":"","license":"AGPL-3.0","bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"homepage":"https://github.com/audapolis/webvtt-writer#readme","devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^4.30.0","@typescript-eslint/parser":"^4.30.0","esbuild":"^0.12.28","esbuild-jest":"^0.5.0","eslint":"^7.32.0","eslint-plugin-import":"^2.24.2","eslint-plugin-prettier":"^4.0.0","eslint-plugin-react":"^7.25.1","eslint-plugin-unused-imports":"^1.1.4","jest":"^27.4.7","typescript":">=3.3.1 <4.5.0","prettier":"^2.3.2"},"gitHead":"461e4f88940bca2c0137582a7b5ec05654345bcf","_id":"@audapolis/webvtt-writer@1.0.6","_nodeVersion":"16.20.0","_npmVersion":"8.19.4","dist":{"integrity":"sha512-puzL9RmqNylJJLmKAs02Qzmy448KqKqNXx0AdFEbvpxpa/Mfy1J0T693J3DhtK0llw8dNCrKv68GYav+2plSYg==","shasum":"23b73af52a07cf72040b0a72a72523ae41f8377b","tarball":"https://registry.npmjs.org/@audapolis/webvtt-writer/-/webvtt-writer-1.0.6.tgz","fileCount":16,"unpackedSize":74851,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID7p+ekf15e8Xm1cHM+FlYd3Gfn80pZQ7Y1/lIGdDkiBAiANPy8kkjPmfS1oyM5k+SsFM+XDyy05qTKNPSwsHyLyPg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkPUwpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQNA/+LQSgWuuN+nsuhwnml+VPSGBRYiQk6h36qNUCU52vPfffE/E/\r\nqPWin+SGAlb9V8UkFsmzOVWcmuQAeXDpPY+do2y4uzXECNBXSUmS7IYjyBGm\r\nWfNGwq/fxYNpUYLaC0n+hrbVVW34EL+pHesQXfYsmprqxnW5DlHy4EuQsPuG\r\nhymKc9g+iiGZDakpgPXknkqTr8bqdbii8pvpABJ8U3X1uPXGWKpeJqfwhPBQ\r\n+l+1Jc45Y20hV4jSmXOFtJdrwS3f6ETcGzIPcG8jF4Hcjky80C9Ov5muwZTf\r\nQgcwZBdWxtnuNNrNpnwtFS/ORLksfAY80RMjXehleKFMm/GS24cu+v4U8E4x\r\nrBfLiJIg5UvPBb/FoOz6nrQ5cwmVRmbN/Qu1uHYFYwfMhNsQ7bJA0sOMaQTq\r\ny98bRuoU+H6Fgz1UnYdfjtUYTbgnW4HOH9OcXLpWRMGCQZ0q9jezFNrFUvN2\r\nzlmd7HbzTjOAD0mzELkzjWAe1SgN7EP7n3qnm+4AFMd0m/Isk+kklXamfORW\r\nkuVxnmKBCYmMhFjWR6dKUz47nJZtGl66oeo+JpKVe594ZhsLjTN5XhXw3Ixc\r\nCNOob3QZodEWr9sNFE1vQfOG7zxrpK9IBaS3P0rK7p1yyyw5yEACchwRL0BT\r\noF/5O9T3LQo7VV683ZNk2tD8LcsI9R2QjPI=\r\n=Jtzv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"pajowu","email":"npm@ca.pajowu.de"},"directories":{},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webvtt-writer_1.0.6_1681738793103_0.09073307830044297"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-07T14:40:32.943Z","1.0.0":"2022-01-07T14:40:33.157Z","modified":"2023-04-17T13:39:53.447Z","1.0.1":"2022-01-07T14:47:23.004Z","1.0.2":"2022-01-07T14:49:39.584Z","1.0.3":"2022-01-07T15:32:42.312Z","1.0.4":"2022-01-07T20:15:51.929Z","1.0.5":"2022-08-27T19:44:03.908Z","1.0.6":"2023-04-17T13:39:53.328Z"},"maintainers":[{"name":"nein","email":"jarohabiger@googlemail.com"},{"name":"pajowu","email":"npm@ca.pajowu.de"}],"description":"A small library to create WebVTT (and SRT) files","homepage":"https://github.com/audapolis/webvtt-writer#readme","keywords":["webvtt","subtitles","typescript"],"repository":{"type":"git","url":"git+https://github.com/audapolis/webvtt-writer.git"},"bugs":{"url":"https://github.com/audapolis/webvtt-writer/issues"},"license":"AGPL-3.0","readme":"# webvtt-writer\n\n> A library to create WebVTT (and SRT) files\n\nThis repo contains a library to create subtitle-files in the WebVTT and SRT formats which we created for\n[audapolis](https://github.com/audapolis/audapolis).\n\n## Installation\n\n```shell\nnpm install @audapolis/webvtt-writer\n```\n\n### Usage\n\n#### 🏗️ Construction\n\nFirst, you have to create a `WebVtt`-Instance.\nThis represents one subtitle file.\n\n```js\nimport { WebVtt } from '@audapolis/webvtt-writer';\n\nconst minimal_vtt = new WebVtt();\n```\n\nYou can optionally give it a [text header](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#webvtt_body):\n\n```js\nconst vtt = new WebVtt('Subtitles are cool');\n```\n\nNow you can start adding elements to you subtitle file:\n\n##### [Comments](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#webvtt_comments)\n\n> Comments are an optional component that can be used to add information to a WebVTT file. Comments are intended for those reading the file and are not seen by users.[^mdn_comments]\n>\n> [^mdn_comments]: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#webvtt_comments)\n\nTo add a comment you have to create a new VttComment instance and then add it to the WebVtt object:\n\n```js\nimport { VttComment } from '@audapolis/webvtt-writer';\nconst myComment = new VttComment('This is a comment\\nIt can even be multiline');\nvtt.add(myComment);\n```\n\n#### [Cues](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#webvtt_cues)\n\nCues are subtitle lines.\nEach cue has a start and end time and a payload -- the text that should be displayed.\nIt may optionally also have\n\n- an identifier\n- cue settings\n\n##### The simplest cue\n\nSince every cue needs a start time, an end time and a payload, this is one of the simplest cues possible:\n\n```js\nimport { VttCue } from '@audapolis/webvtt-writer';\nconst mySimpleCue = new VttCue({\n  startTime: 1,\n  endTime: 2,\n  payload: 'This will be shown\\nincluding this second line',\n});\nvtt.add(mySimpleCue);\n```\n\nStart and end time are given in seconds.\n\n##### Identifier\n\nA cue may also have an identifier which can be used to reference this cue, for example for styling it.\nThey do not have to be unique, but are often numbered.\n\n```js\nconst cueWithIdentifier = new VttCue({\n  startTime: 3,\n  endTime: 4,\n  payload: 'This cue has an identifier',\n  identifier: \"Hey, i'm an identifier\",\n});\nvtt.add(cueWithIdentifier);\n```\n\n##### [Cue Settings](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#cue_settings)\n\nCue settings are used to position the cue payload text.\nThere are 5 cue settings, whose meanings and possible values are described [here](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#cue_settings):\n\n- vertical\n- line\n- position\n- size\n- align\n\nAll of them are optional but if you want to, you can specify them like this:\n\n```js\nimport { VttCueSettings } from '@audapolis/webvtt-writer';\n\nconst mySettings = new VttCueSettings({ size: '50%' });\nconst cueWithSettings = new VttCue({\n  startTime: 5,\n  endTime: 120,\n  payload: 'This cue has settings',\n  settings: mySettings,\n});\nvtt.add(cueWithSettings);\n```\n\n##### Escaping and Payload Tags\n\nThe payload may not contain the characters `-` and `<` and the usage of `>` is not recommeneded. Instead their escape\nsequences should be used. Because of that `webvtt-writer` automatically escapes the payload and identifier.\n\nHowever this means that you cannot use a payload which contains [cue payload text tags](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#cue_payload_text_tags),\nas they would be escaped as well.\nIf you want to use payload tags, you can set `payloadEscaped` to `true`. This will disable automatic payload escaping.\n**Warning:** It is now your task to escape the payload text, so use `escapeVttString` widely.\nFor example:\n\n```js\nimport { escapeVttString } from '@audapolis/webvtt-writer';\n\nconst cueWithoutEscaping = new VttCue({\n  startTime: 130,\n  endTime: 200,\n  payload: `<b>${escapeVttString('This cue')}</b>${escapeVttString(' has cue text tags')}`,\n  payloadEscaped: true,\n});\nvtt.add(cueWithoutEscaping);\n```\n\n#### ✍️ Rendering the subtitles\n\nTo get the content of the subtitle file as a string, you can use `.toString()` on you `WebVtt` object:\n\n```js\nconst vttString = vtt.toString();\nconsole.log(vttString);\n```\n\nFrom the examples above, you should get:\n\n```\nWEBVTT Subtitles are cool\n\nNOTE This is a comment\nIt can even be multiline\n\n00:00:01.000 --> 00:00:02.000\nThis will be shown\nincluding this second line\n\nHey, i'm an identifier\n00:00:03.000 --> 00:00:04.000\nThis cue has an identifier\n\n00:00:05.000 --> 00:02:00.000 size:50%\nThis cue has settings\n\n00:02:10.000 --> 00:03:20.000\n<b>This cue</b> has cue text tags\n```\n\nThis can now be written to a file, for example on nodejs like this:\n\n```js\nfs.writeFileSync('subtitles.vtt', vttString);\n```\n\n##### SRT\n\nYou can also export the subtitles as an SRT file, which has broader software support.\n**Note:** Srt does not support some features of WebVTT. We know of at least:\n\n- header (including header text)\n- cue text tags\n- cue settings\n- comments\n\nThe header, cue settings and comments will simply be ignored when exporting to srt.\nSince cue text tags are not handled by this library, you have to take care to not add them if you want to create an srt\nfile.\n\nKnowing all this, you can render the srt version of using `.toString('srt')`:\n\n```js\nconst srtString = vtt.toString('srt');\nconsole.log(srtString);\n```\n\nThis should give you:\n\n```\n00:00:01.000 --> 00:00:02.000\nThis will be shown\nincluding this second line\n\nHey, i'm an identifier\n00:00:03.000 --> 00:00:04.000\nThis cue has an identifier\n\n00:00:05.000 --> 00:02:00.000\nThis cue has settings\n\n00:02:10.000 --> 00:03:20.000\n<b>This cue</b> has cue text tags\n```\n","readmeFilename":"README.md"}