Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add error listener & ec3 test in codec switching integration test #6486

Merged
merged 15 commits into from May 6, 2024
4 changes: 4 additions & 0 deletions lib/util/platform.js
Expand Up @@ -562,6 +562,10 @@ shaka.util.Platform = class {
Platform.isWebOS4() || Platform.isWebOS5()) {
return false;
}
// Older chromecasts without GoogleTV seem to not support SMOOTH properly.
if (Platform.isChromecast() && !Platform.isAndroid()) {
tykus160 marked this conversation as resolved.
Show resolved Hide resolved
return false;
}
// See: https://chromium-review.googlesource.com/c/chromium/src/+/4577759
if (Platform.isWindows() && Platform.isEdge()) {
return false;
Expand Down
17 changes: 1 addition & 16 deletions test/codec_switching/codec_switching_integration.js
Expand Up @@ -63,6 +63,7 @@ describe('Codec Switching', () => {
});

afterEach(async () => {
await player.unload();
eventManager.release();
await player.destroy();
});
Expand Down Expand Up @@ -102,8 +103,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});

it('can switch codecs SMOOTH', async () => {
Expand Down Expand Up @@ -140,8 +139,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});
});

Expand Down Expand Up @@ -175,8 +172,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});

it('can switch codecs SMOOTH', async () => {
Expand Down Expand Up @@ -212,8 +207,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});
});

Expand Down Expand Up @@ -248,8 +241,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});

it('can switch codecs SMOOTH', async () => {
Expand Down Expand Up @@ -286,8 +277,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('es');

await player.unload();
});
});

Expand Down Expand Up @@ -322,8 +311,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('en');

await player.unload();
});

it('can switch codecs SMOOTH', async () => {
Expand Down Expand Up @@ -360,8 +347,6 @@ describe('Codec Switching', () => {
variants = player.getVariantTracks();

expect(variants.find((v) => !!v.active).language).toBe('en');

await player.unload();
});
});
});