1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00
video.js/test
André 78310464d5
fix(error-display): update display on consecutive errors (#8485)
When consecutive errors occur, the `ErrorDisplay` component is not updated with the new error message.
This results in an inconsistent state between the `player.error` and `player.errorDisplay.contentEl().textContent`.

|                         | player.error() | player.errorDisplay.content() | player.errorDisplay.contentEl().textContent |
| ----------------------- | -------------- | ----------------------------- | ------------------------------------------- |
| player.error('Error 1') | Error 1 ✔️      | Error 1 ✔️                     | Error 1 ✔️                                   |
| player.error('Error 2') | Error 2 ✔️      | Error 2 ✔️                     | Error 1                                   |

An example of a use case where updating the error message is useful is :
- user tries to play media 1 but the media doestn't exist
- user tries to play media 2 but the media is not compatible

- call the `close` function before each call to the `open` function.
  - if errorDisplay is not **open**, the `close` function does nothing
  - if errorDisplay is **open**, the `close` function executes and triggers the close events, then the open function executes and triggers the open events, ensuring that the content is updated.
2023-11-28 23:11:15 +01:00
..
api refactor: remove internal Map, Set, and WeakMap shams, assume window.performance and requestAnimationFrame support (#7775) 2022-11-23 09:49:24 -05:00
require feat: built-in HLS playback support (#5057) 2018-03-30 14:01:16 -04:00
unit fix(error-display): update display on consecutive errors (#8485) 2023-11-28 23:11:15 +01:00
karma.conf.js fix: Replace Object.values with ponyfill (#8267) 2023-05-11 18:57:13 -04:00
sinon.js fix: properly return promise from requestFullscreen and exitFullscreen (#7299) 2021-07-06 14:56:02 -04:00