mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 04:44:28 +00:00
feat(transcode): add HLS live streaming support (#436)
* feat(transcode): add HLS live streaming support * fix(hls): resolve version stacks for public HLS and add workflow E2E test
This commit is contained in:
@@ -198,6 +198,7 @@ describe('UploadService', () => {
|
||||
threads: 0,
|
||||
sprite: true,
|
||||
poster: true,
|
||||
hlsEnabled: false,
|
||||
},
|
||||
})
|
||||
})
|
||||
@@ -249,6 +250,7 @@ describe('UploadService', () => {
|
||||
threads: 12,
|
||||
sprite: true,
|
||||
poster: true,
|
||||
hlsEnabled: false,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@@ -335,11 +335,14 @@ export class UploadService {
|
||||
if (isVideo) {
|
||||
const strategy = settings?.transcode?.videoStrategy || 'best_match'
|
||||
const hardwareAcceleration = settings?.transcode?.hardwareAcceleration || 'off'
|
||||
const hlsEnabled = settings?.transcode?.hlsEnabled ?? false
|
||||
const hlsResolutions = settings?.transcode?.hlsResolutions
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
await new VideoTranscoder(tx as any, asset.id, team.id, projectId)
|
||||
.setStrategy(strategy)
|
||||
.setHardwareAcceleration(hardwareAcceleration)
|
||||
.setThreads(threads)
|
||||
.setHls(hlsEnabled, hlsResolutions)
|
||||
.withSprite()
|
||||
.withPoster()
|
||||
.submit()
|
||||
|
||||
Reference in New Issue
Block a user