qhkr2z22o: Prefer hls.js and fall back to the thumbnail when video cannot play
This commit is contained in:
@@ -19,10 +19,13 @@ describe("choosePlayback", () => {
|
||||
expect(choosePlayback(null, { nativeHls: true, hlsJsSupported: true })).toBe("none");
|
||||
expect(choosePlayback(undefined, { nativeHls: false, hlsJsSupported: true })).toBe("none");
|
||||
});
|
||||
it("uses native HLS where supported, hls.js otherwise", () => {
|
||||
expect(choosePlayback(HLS, { nativeHls: true, hlsJsSupported: true })).toBe("native");
|
||||
it("prefers hls.js whenever it is supported, even if native HLS is reported", () => {
|
||||
expect(choosePlayback(HLS, { nativeHls: true, hlsJsSupported: true })).toBe("hlsjs");
|
||||
expect(choosePlayback(HLS, { nativeHls: false, hlsJsSupported: true })).toBe("hlsjs");
|
||||
});
|
||||
it("uses native HLS only when hls.js is unsupported", () => {
|
||||
expect(choosePlayback(HLS, { nativeHls: true, hlsJsSupported: false })).toBe("native");
|
||||
});
|
||||
it("falls back to none when neither is available", () => {
|
||||
expect(choosePlayback(HLS, { nativeHls: false, hlsJsSupported: false })).toBe("none");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user