diff --git a/app/public/config/config.example.js b/app/public/config/config.example.js index 8739850..154ccf8 100644 --- a/app/public/config/config.example.js +++ b/app/public/config/config.example.js @@ -14,8 +14,17 @@ var config = credential : 'example' } ], - requestTimeout : 10000, - transportOptions : + /** + * If defaultResolution is set, it will override user settings when joining: + * low ~ 320x240 + * medium ~ 640x480 + * high ~ 1280x720 + * veryhigh ~ 1920x1080 + * ultra ~ 3840x2560 + **/ + defaultResolution : 'medium', + requestTimeout : 10000, + transportOptions : { tcp : true }, diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index 73cb6ea..ca7c41c 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -30,7 +30,8 @@ let turnServers, requestTimeout, transportOptions, lastN, - mobileLastN; + mobileLastN, + defaultResolution; if (process.env.NODE_ENV !== 'test') { @@ -39,7 +40,8 @@ if (process.env.NODE_ENV !== 'test') requestTimeout, transportOptions, lastN, - mobileLastN + mobileLastN, + defaultResolution } = window.config); } @@ -165,6 +167,9 @@ export default class RoomClient // Our WebTorrent client this._webTorrent = null; + if (defaultResolution) + store.dispatch(settingsActions.setVideoResolution(defaultResolution)); + // Max spotlights if (device.bowser.getPlatformType() === 'desktop') this._maxSpotlights = lastN;