diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index be627b30ba3..e44306e5000 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -63,6 +63,9 @@ const PTP_CLIENT_DISCONNECTED_STATES = [ 'disconnected', ]; +// this is a local cache for ice server descriptions +let ICE_SERVERS = null; + const Wysiwyg = Widget.extend({ defaultOptions: { lang: 'odoo', @@ -611,7 +614,10 @@ const Wysiwyg = Widget.extend({ this._peerToPeerLoading = new Promise(async (resolve) => { this._currentRecord = await this._getCurrentRecord(); - let iceServers = await this._rpc({route: '/web_editor/get_ice_servers'}); + if (!ICE_SERVERS) { + ICE_SERVERS = await this._rpc({route: '/web_editor/get_ice_servers'}); + } + let iceServers = structuredClone(ICE_SERVERS); if (!iceServers.length) { iceServers = [ {