Closed ysliew closed 8 months ago
@ysliew Hi. We can change the icon with CSS like below:
i.op-con.op-warning::before {
background-image: url(your/image/path.png);
}
However, the player needs to be updated to set icons for each error type.
Now the .op-warning class is used for all errors. If you add different classes for each error code in the code below, you can display different icons for each type. https://github.com/AirenSoft/OvenPlayer/blob/548e18c09f8e1efb9c4d53839461b8e5be32bac7/src/js/view/components/helpers/main.js#L233
Ex) Add the error code class and change icon
i.op-con.op-warning.100::before {
background-image: url(your/image/path.png);
}
Error codes are defined below. https://github.com/AirenSoft/OvenPlayer/blob/548e18c09f8e1efb9c4d53839461b8e5be32bac7/src/js/api/constants.js#L152
That should work now as a quick hack, thank you very much for the info!
(By the way, perhaps in the future: it could be simpler to do so through some configuration settings)
Current player display a large warning sign (triangle with exclamation mark in it) along with error messages.
Possible to provide user options to replace the icon (based on type and severity of icon)?
Or, at which .js file (and line number) to manually change the icon (by providing simple logic based on type of error)?