Skip to content

Commit 25eab10

Browse files
authored
Update functional tests to run on Safari using MacOS 13 (#6101)
* Update functional tests to run on Safari using MacOS 13 * Skip smooth switch test in Safari on streams with overlapping appends * Omit VOD "ended" event tests with overlapping appends from Safari
1 parent c769596 commit 25eab10

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ jobs:
416416
max-parallel: 8
417417
matrix:
418418
include:
419-
- config: safari-macOS_10.15
419+
- config: safari-macOS_13
420420
ua: safari
421-
os: macOS 10.15
421+
os: macOS 13
422422
- config: firefox-win_10
423423
ua: firefox
424424
os: Windows 10

tests/functional/auto/setup.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,22 @@ describe(`testing hls.js playback in the browser on "${browserDescription}"`, fu
616616
entries.length = 10;
617617
}
618618

619+
const isSafari = browserConfig.name === 'safari';
620+
619621
entries
620622
// eslint-disable-next-line no-unused-vars
621623
.filter(([name, stream]) => !stream.skipFunctionalTests)
622624
// eslint-disable-next-line no-unused-vars
623625
.forEach(([name, stream]) => {
624626
const url = stream.url;
625627
const config = stream.config || {};
628+
629+
// Segment media is shorted than playlist duration resulting in overlapping appends on switch
630+
// This appears to prevent playback in Safari which causes smoothswitch and VOD ended event tests to fail
631+
const isStreamsWithOverlappingAppends =
632+
name === 'arte' || name === 'oceansAES';
633+
634+
config.preferManagedMediaSource = false;
626635
if (
627636
stream.skip_ua &&
628637
stream.skip_ua.some((browserInfo) => {
@@ -649,7 +658,11 @@ describe(`testing hls.js playback in the browser on "${browserDescription}"`, fu
649658
);
650659
}
651660

652-
if (stream.abr && !HlsjsLightBuild) {
661+
if (
662+
stream.abr &&
663+
!HlsjsLightBuild &&
664+
(!isSafari || !isStreamsWithOverlappingAppends)
665+
) {
653666
it(
654667
`should "smooth switch" to highest level and still play after 2s for ${stream.description}`,
655668
testSmoothSwitch.bind(null, url, config)
@@ -670,10 +683,12 @@ describe(`testing hls.js playback in the browser on "${browserDescription}"`, fu
670683
`should play ${stream.description}`,
671684
testIsPlayingVOD.bind(null, url, config)
672685
);
673-
it(
674-
`should seek 3s from end and receive video ended event for ${stream.description} with 2 or less buffered ranges`,
675-
testSeekOnVOD.bind(null, url, config)
676-
);
686+
if (!isSafari || !isStreamsWithOverlappingAppends) {
687+
it(
688+
`should seek 3s from end and receive video ended event for ${stream.description} with 2 or less buffered ranges`,
689+
testSeekOnVOD.bind(null, url, config)
690+
);
691+
}
677692
// TODO: Seeking to or past VOD duration should result in the video ending
678693
// it(`should seek on end and receive video ended event for ${stream.description}`, testSeekEndVOD.bind(null, url));
679694
}

0 commit comments

Comments
 (0)