Since our tests already test VAST and VMAP this is no longer necessary,
and the tests were disabled because the IMA library is buggy in Tizen.
On the other hand, removing the IMA load reduces the test loading time.
This deduplicates a platform support check that was run in
player_integration.js, and declares the pre-existing central support map
in an extern so we can clean up its use.
This stops a DRM integration test from timing out on FirefoxWindows. It
still gets skipped, though, due to a failing Widevine check, so there
will be follow-on work for that.
Issue #7449
The promise for DOM auto setup tests doesn't guarantee that load() is
complete, only that we started it. So checking video duration causes
flake, in particular on slow devices like Tizen. Instead, check for the
player to have an asset URI.
In 4425dca2, we broke auto-loading content with `<source>` tags or
`src=` in the UI, such that we tried to load content before we had
attached a video element. That was almost a year ago. Oops!
This also adds an appropriate unit test.
The PR is solving playback error in a Multi period manifest when the
start time is not 0.
Additionally, solving the error code 3015 due to the clear of the buffer
during the playback.
Fixes https://github.com/shaka-project/shaka-player/issues/7401
Needed for #5022
This PR does not enable AirPlay on MSE yet, but moves shaka from using
`src` attribute to `source` tags. With this change we will be able to
enable it more easily, as `src` and `source` should not be used
together.
In #7345, we disabled Jasmine's global error handler. However, jasmine
still tries to call this. So instead of replacing it with null, replace
it with a stub.
Also add comments about why we are able to do this and still handle
global errors in our own way.
Previously, there were situations where, when handling `trackschanged` events, the manifest would not yet have been
copied from the preload manager to the player. This would prevent developers from properly handling those events.
This PR changes the order of operations slightly, such that the manifest is copied over earlier.
If we fail certain actions during test setup, we should log those
unconditionally through Karma's dump() function, and not just when
browser console logs are enabled with --enable-logging.
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
We get strange uncaught errors sometimes on Cast devices. These are
unreadable "script error" events that have nothing to do with our tests
(see https://sentry.io/answers/script-error/), and we intend to ignore
them.
However, our existing logic to ignore those is not sufficient, because
in addition to our own error handler (via
window.addEventListener("error")), Jasmine has its own unconditional
error handler (via window.onerror).
To take complete control over how these are handled, we need to remove
Jasmine's handler.
Jasmine's handler is installed at the top of its execute() function, so
our top-level beforeAll() is the best place to remove it.
On some real Cast devices, you can't delete window.cast. This is fine,
and shouldn't cause the test to fail. If this happens, skip the test
instead. The test, which mocks everything including the platform
detection and the Cast API, is still valid on platforms where we can get
away with those mocks.
The screenshots with native text rendering don't always trigger our
threshold even when they should. That's because the native text tends to
be much smaller. Therefore the matching threshold should be higher to
make these smaller regions of text more sensitive to change.
This raises the threshold from 95% (still used for DOM-based) to 97% for
native text. I believe this could have caught some of the changes that I
only caught later with manual review of screenshots.
Original author: @joeyparrish Thanks!
Since xlink processing is slow and very few streams use it, it is best
to disable this functionality by default to improve performance
especially on STB or SmartTV devices.