AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.
https://OvenMediaEngine.com/ovenplayer
MIT License
505 stars 125 forks source link

Localization support or customization of error messages #377

Closed hernanrz closed 10 months ago

hernanrz commented 11 months ago

Is there a way to change the text of the error messages displayed by ovenplayer, without having to modify the source code? This would allow for translations or custom messages in general

hernanrz commented 10 months ago

After digging through the source code, it seems this is supported! If we set systemText in the options object when creating the player and follow the structure defined in api/constants.js https://github.com/AirenSoft/OvenPlayer/blob/67ab3b212d63e88b30863812dcef58768fdc23bc/src/js/api/constants.js#L123