AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.
https://airensoft.com/ome.html
MIT License
515 stars 126 forks source link

Localization support or customization of error messages #377

Closed hernanrz closed 1 year ago

hernanrz commented 1 year 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 1 year 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