@speechkit/speechkit-audio-player
v3.18.30
Published
A web player component that can play audio from https://speechkit.io
Downloads
69
Readme
🤖 Speechkit.io Audio Player
A library that can be used for playing podcasts from https://speechkit.io.
Installation
Firstly, clone this repo to your local machine:
git clone https://github.com/SpeechKit/speechkit-audio-player
Next, open the speechkit-audio-player
directory or the directory you cloned to and run npm install
to install all dependencies.
You can now run npm start
to begin serving on local host and you will find test pages within the /example
directory.
Development
To make changes, create a new branch from develop. Make sure you use the following format:
fix/sk-[task-number] - for a bug fix
feat/sk-[task-number] - for a feature
Where [task-number] represents the issue number in Trello.
Push your branch up to GitHub frequently and once you have completed work on the feature/fix, create a pull request against develop, making sure you also update the version in the package.json, eg 3.14.16
.
Testing and Deployment
The next step is to deploy this version to staging for testing.
- Create a new build by running
yarn build:stage
- Login to AWS and open the
s3/speechkit-js
bucket - Create new folder according the version number you want
- Upload the contents of the local
dist
folder into the folder you created - Update the version in the Heroku env (Vlad will help here!)
Once testing is complete, the next step is to make a pull request from develop to master.
If everything looks good, merge into master and push the branch up, at which point CircleCI will automatically deploy to npmjs.org. The new version may take some time to appear due to caching. For an urgent release, the caches may be purged (see links below).
CDN
We use JSDelivr for CDN. You can point your source to: https://cdn.jsdelivr.net/npm/@speechkit/speechkit-audio-player@VERSION/dist/speechkit.js
Example: https://cdn.jsdelivr.net/npm/@speechkit/speechkit-audio-player@1/dist/speechkit.js
Purging
After you have deployed a new version to JSDelivr, @latest and all other tags may take up to 24 hours to update. In the case that you need files to update sooner, you can purge the cache using the URLs below:
Purge Player:
https://purge.jsdelivr.net/npm/@speechkit/speechkit-audio-player@latest/dist/speechkit-player.js
Purge Ghost:
https://purge.jsdelivr.net/npm/@speechkit/speechkit-audio-player@latest/dist/speechkit-ghost.js