Skip to content

Commit

Permalink
Custom backgrounds in Teams V2 - disable custom
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonatas Evaristo committed Apr 26, 2024
1 parent 07ed773 commit 66c53c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ We added a feature to load custom background images during a video call. This is
2. 3 new command-line parameters `customBGServiceBaseUrl`, `customBGServiceIgnoreMSDefaults` and `customBGServiceConfigFetchInterval` are introduced. See above for details.
3. Custom images are always loaded with `<customBGServiceBaseUrl>/<image-path>`. So, you have to make sure the web server is running and `<customBGServiceBaseUrl>` responds to the request.
4. You can choose any web server of your choice but make sure `Access-Control-Allow-Origin` is set to `*` in response headers from web server.
5. In Teams version 2, this will replace Microsoft's default images.
5. In Teams version 2, this will replace Microsoft's default images. To use standard Microsoft images, you must activate the flag --isCustomBackgroundEnabled=false

For apache2, `/etc/apache2/apache2.conf` may need to have an entry like this.
```xml
Expand Down
2 changes: 1 addition & 1 deletion app/mainAppWindow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function onBeforeRequestHandler(details, callback) {
callback({ redirectURL: imgUrl });
}
// Custom background replace for teams v2
else if (details.url.startsWith('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/')) {
else if (details.url.startsWith('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/' && config.isCustomBackgroundEnabled)) {
const reqUrl = details.url.replace('https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/', '');
const imgUrl = getBGRedirectUrl(reqUrl);
logger.debug(`Forwarding '${details.url}' to '${imgUrl}'`);
Expand Down

0 comments on commit 66c53c6

Please sign in to comment.