Add new hls.js version, add script for updating (fixes #29)
This commit is contained in:
parent
9f9ae45f6e
commit
5604786146
18
scripts/update_hls_js.sh
Executable file
18
scripts/update_hls_js.sh
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
LATEST_TAG=$(curl -s https://api.github.com/repos/video-dev/hls.js/releases/latest | jq -r '.tag_name')
|
||||||
|
|
||||||
|
if [[ -z "$LATEST_TAG" || "$LATEST_TAG" == "null" ]]; then
|
||||||
|
echo "Failed to fetch the latest release tag from GitHub."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
LICENSE="// @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
|
||||||
|
// @source https://github.com/video-dev/hls.js/tree/$LATEST_TAG"
|
||||||
|
|
||||||
|
echo "$LICENSE" > ../static/hls.min.js
|
||||||
|
|
||||||
|
curl -s https://cdn.jsdelivr.net/npm/hls.js@${LATEST_TAG}/dist/hls.min.js >> ../static/hls.min.js
|
||||||
|
|
||||||
|
echo "Update complete. The latest hls.js (${LATEST_TAG}) has been saved to static/hls.min.js."
|
5
static/hls.min.js
vendored
5
static/hls.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user