HLS video handling/storage/state refactor (#151)
* WIP with new transcoder progress monitor * A whole different WIP in progress monitoring via local PUTs * Use an actual hls playlist parser to rewrite master playlist * Cleanup * Private vs public path for thumbnail generation * Allow each storage provider to make decisions of how to store different types of files * Simplify inbound file writes * Revert * Split out set stream as connected/disconnected state methods * Update videojs * Add comment about the hls handler * Rework of the offline stream state. For #85 * Delete old unreferenced video segment files from disk * Cleanup all segments and revert to a completely offline state after 5min * Stop thumbnail generation on stream stop. Copy logo to thumbnail on cleanup. * Update transcoder test * Add comment * Return http 200 on success to transcoder. Tweak how files are written to disk * Force pixel color format in transcoder * Add debugging info for S3 transfers. Add default ACL. * Fix cleanup timer * Reset session stats when we cleanup the session. * Put log file back * Update test * File should not be a part of this commit * Add centralized shared performance timer for use anywhere * Post-rebase cleanup * Support returning nil from storage provider save * Updates to reflect package changes + other updates in master * Fix storage providers being overwritten * Do not return pointer in save. Support cache headers with S3 providers * Split out videojs + vhs and point to specific working versions of them * Bump vjs and vhs versions * Fix test * Remove unused * Update upload warning message * No longer valid comment * Pin videojs and vhs versions
This commit is contained in:
@@ -8,3 +8,9 @@ To add, remove, or update one of these components:
|
||||
2. Edit the `snowpack` `install` block of `package.json` to specify what files you want to add to the Owncast project. This can be an entire library (such as `preact`) or a single file (such as `video.js/dist/video.min.js`). These paths point to files that live in `node_modules`.
|
||||
3. Run `npm run build`. This will download the requested module from NPM, package up the assets you specified, and then copy them to the Owncast web app in the `webroot/js/web_modules` directory.
|
||||
4. Your new web dependency is now available for use in your web code.
|
||||
|
||||
## VideoJS versions
|
||||
|
||||
Currently Videojs version 7.8.3 and http-streaming version 2.2.0 are hardcoded because these are versions that have been found to work properly with our HLS stream. Other versions have had issues with things like discontinuities causing a loading spinner.
|
||||
|
||||
So if you update videojs or vhs make sure you do an end-to-end test of a stream and make sure the "this stream is offline" ending video displays properly.
|
||||
|
||||
97
build/javascript/package-lock.json
generated
97
build/javascript/package-lock.json
generated
@@ -362,13 +362,6 @@
|
||||
"mpd-parser": "0.12.0",
|
||||
"mux.js": "5.6.6",
|
||||
"video.js": "^6 || ^7"
|
||||
},
|
||||
"dependencies": {
|
||||
"mux.js": {
|
||||
"version": "5.6.6",
|
||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.6.6.tgz",
|
||||
"integrity": "sha512-q5VIpqb28UVs5dKsOQkpHrPxqInMjiZ/f/4qW4gEBKlm2xeBasRjRJIokixFWj+r6PWfVSEygvPffXnG7aK99g=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"@videojs/themes": {
|
||||
@@ -380,9 +373,9 @@
|
||||
}
|
||||
},
|
||||
"@videojs/vhs-utils": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-2.2.0.tgz",
|
||||
"integrity": "sha512-Mtq+doRlbNvis9TyI5kfOg+Vg8aHGXkSXiuNwnkcimqyaP3wO/s/iEVKPcmRUySKivjaWktjdEFVXYfaP+/HTg==",
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-2.2.1.tgz",
|
||||
"integrity": "sha512-9Qbwx3LAdkG1jh2HKfninjXDxVZCeaoPcmct/bUcDRmLej68Z9XhLe5d2a9fy1qB+UuQwWg7YySASesWavYNjQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"global": "^4.3.2",
|
||||
@@ -397,17 +390,6 @@
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"global": "~4.4.0",
|
||||
"is-function": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"global": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz",
|
||||
"integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
|
||||
"requires": {
|
||||
"min-document": "^2.19.0",
|
||||
"process": "^0.11.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
@@ -1207,19 +1189,12 @@
|
||||
}
|
||||
},
|
||||
"global": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
|
||||
"integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=",
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz",
|
||||
"integrity": "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==",
|
||||
"requires": {
|
||||
"min-document": "^2.19.0",
|
||||
"process": "~0.5.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"process": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
|
||||
"integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
|
||||
}
|
||||
"process": "^0.11.10"
|
||||
}
|
||||
},
|
||||
"got": {
|
||||
@@ -1725,9 +1700,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"mux.js": {
|
||||
"version": "5.6.1",
|
||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.6.1.tgz",
|
||||
"integrity": "sha512-iIE3EJURbrPZ9Y4i9ADKTIvxGUcAEBOFhwWUOZGCiKlpXDZrqDgcJLDrOa0PenLhw6WYkOyl18kHFEvwm9JSpg=="
|
||||
"version": "5.6.6",
|
||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.6.6.tgz",
|
||||
"integrity": "sha512-q5VIpqb28UVs5dKsOQkpHrPxqInMjiZ/f/4qW4gEBKlm2xeBasRjRJIokixFWj+r6PWfVSEygvPffXnG7aK99g=="
|
||||
},
|
||||
"node-emoji": {
|
||||
"version": "1.10.0",
|
||||
@@ -2944,12 +2919,12 @@
|
||||
}
|
||||
},
|
||||
"video.js": {
|
||||
"version": "7.9.6",
|
||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.9.6.tgz",
|
||||
"integrity": "sha512-2Dg0h2IbFCZRJW/1pkNYrTqolZPonR14ajaC30D5gdVwrSLxqR6SgsYDAblXw+mFFJHxleXzoLiM/hu3TfJmEQ==",
|
||||
"version": "7.8.3",
|
||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.8.3.tgz",
|
||||
"integrity": "sha512-u8/1qEZdBeOm7TgBhJg8ab28vd3x62UMaaSnZ79yOMaxCqACP9CzWJT9c3Isfv2jY9BNLBIIft+BqNLTWudtLw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.9.2",
|
||||
"@videojs/http-streaming": "1.13.4",
|
||||
"@videojs/http-streaming": "1.13.2",
|
||||
"@videojs/xhr": "2.5.1",
|
||||
"global": "4.3.2",
|
||||
"keycode": "^2.2.0",
|
||||
@@ -2959,15 +2934,15 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@videojs/http-streaming": {
|
||||
"version": "1.13.4",
|
||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-1.13.4.tgz",
|
||||
"integrity": "sha512-I/hWi0uiA8aRwB4tfK44FRaWEoOU3uyvjUJW4cNST3TsweuovGGoud7K09WUrlbN4U0EjQvDqNwwXNggNs3niw==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-1.13.2.tgz",
|
||||
"integrity": "sha512-U4Xhh+HxGpRBx9Gm0LlEadq85k9BwckzFgZmyhacauhK/27Mz0goKKFAt+BpxBNp2oHVdAdk8NHfneinsqni3Q==",
|
||||
"requires": {
|
||||
"aes-decrypter": "3.0.2",
|
||||
"aes-decrypter": "3.0.0",
|
||||
"global": "^4.3.0",
|
||||
"m3u8-parser": "4.4.0",
|
||||
"mpd-parser": "0.10.0",
|
||||
"mux.js": "5.6.1",
|
||||
"mux.js": "5.5.1",
|
||||
"url-toolkit": "^2.1.3",
|
||||
"video.js": "^6.8.0 || ^7.0.0"
|
||||
}
|
||||
@@ -2982,6 +2957,30 @@
|
||||
"url-toolkit": "^2.1.6"
|
||||
}
|
||||
},
|
||||
"aes-decrypter": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.0.0.tgz",
|
||||
"integrity": "sha1-eEihwUW5/b9Xrj4rWxvHzwZEqPs=",
|
||||
"requires": {
|
||||
"commander": "^2.9.0",
|
||||
"global": "^4.3.2",
|
||||
"pkcs7": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
||||
},
|
||||
"global": {
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz",
|
||||
"integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=",
|
||||
"requires": {
|
||||
"min-document": "^2.19.0",
|
||||
"process": "~0.5.1"
|
||||
}
|
||||
},
|
||||
"m3u8-parser": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.4.0.tgz",
|
||||
@@ -3000,6 +2999,16 @@
|
||||
"global": "^4.3.2",
|
||||
"xmldom": "^0.1.27"
|
||||
}
|
||||
},
|
||||
"mux.js": {
|
||||
"version": "5.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.5.1.tgz",
|
||||
"integrity": "sha512-5VmmjADBqS4++8pTI6poSRJ+chHdaoI4XErcQPM5w4QfwaDl+FQlSI0iOgWbYDn6CBCbDRKaSCcEiN2K5aHNGQ=="
|
||||
},
|
||||
"process": {
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz",
|
||||
"integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,19 +6,19 @@
|
||||
"dependencies": {
|
||||
"@joeattardi/emoji-button": "^4.2.0",
|
||||
"@justinribeiro/lite-youtube": "^0.9.0",
|
||||
"@videojs/http-streaming": "^2.2.0",
|
||||
"@videojs/themes": "^1.0.0",
|
||||
"htm": "^3.0.4",
|
||||
"preact": "^10.5.3",
|
||||
"tailwindcss": "^1.8.10",
|
||||
"video.js": "^7.9.6"
|
||||
"video.js": "7.8.3",
|
||||
"@videojs/http-streaming": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"snowpack": "^2.12.1"
|
||||
},
|
||||
"snowpack": {
|
||||
"install": [
|
||||
"video.js/dist/video.min.js",
|
||||
"video.js/core.js",
|
||||
"@videojs/themes/fantasy/*",
|
||||
"@videojs/http-streaming/dist/videojs-http-streaming.min.js",
|
||||
"video.js/dist/video-js.min.css",
|
||||
@@ -27,11 +27,14 @@
|
||||
"htm",
|
||||
"preact",
|
||||
"tailwindcss/dist/tailwind.min.css"
|
||||
]
|
||||
],
|
||||
"alias": {
|
||||
"video.js": "video.js/core.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "npm install && npx snowpack install && cp -R web_modules ../../webroot/js"
|
||||
"build": "npm install && npx snowpack install && cp node_modules/video.js/dist/video-js.min.css web_modules/videojs && cp -R web_modules ../../webroot/js"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
|
||||
Reference in New Issue
Block a user