Replace green screen with blank screen, add CORS policy
This commit is contained in:
parent
2317d2f98f
commit
4ccc883437
@ -17,7 +17,6 @@ import MediaStreamUtils from '/imports/utils/media-stream-utils';
|
||||
import { notify } from '/imports/ui/services/notification';
|
||||
import {
|
||||
EFFECT_TYPES,
|
||||
FALLBACK_IMAGE,
|
||||
SHOW_THUMBNAILS,
|
||||
setSessionVirtualBackgroundInfo,
|
||||
getSessionVirtualBackgroundInfo,
|
||||
@ -341,7 +340,7 @@ class VideoPreview extends Component {
|
||||
|
||||
const webcamBackgroundURL = webcamBackground?.webcamBackground;
|
||||
if (webcamBackgroundURL !== '') {
|
||||
this.handleVirtualBgSelected(EFFECT_TYPES.IMAGE_TYPE, FALLBACK_IMAGE, { url: webcamBackgroundURL });
|
||||
this.handleVirtualBgSelected(EFFECT_TYPES.IMAGE_TYPE, '', { url: webcamBackgroundURL });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -397,7 +397,13 @@ export async function createVirtualBackgroundService(parameters = null) {
|
||||
// Function to convert image URL to a File object
|
||||
async function getFileFromUrl(url) {
|
||||
try {
|
||||
const response = await fetch(url);
|
||||
const response = await fetch(url, {
|
||||
credentials: 'omit',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Accept': 'image/*',
|
||||
}
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ const EFFECT_TYPES = {
|
||||
IMAGE_TYPE: 'image',
|
||||
NONE_TYPE: 'none',
|
||||
}
|
||||
const FALLBACK_IMAGE = 'green_screen.jpg';
|
||||
|
||||
// TODO I'm sure this is centralized somewhere; fetch it from "there" if possible
|
||||
const BASE_PATH = Meteor.settings.public.app.cdn
|
||||
@ -34,7 +33,7 @@ const MODELS = {
|
||||
|
||||
const {
|
||||
thumbnailsPath: THUMBNAILS_PATH = '/resources/images/virtual-backgrounds/thumbnails/',
|
||||
fileNames: IMAGE_NAMES = ['home.jpg', 'coffeeshop.jpg', 'board.jpg', 'green_screen.jpg'],
|
||||
fileNames: IMAGE_NAMES = ['home.jpg', 'coffeeshop.jpg', 'board.jpg'],
|
||||
storedOnBBB: IS_STORED_ON_BBB = true,
|
||||
imagesPath: IMAGES_PATH = '/resources/images/virtual-backgrounds/',
|
||||
showThumbnails: SHOW_THUMBNAILS = true,
|
||||
@ -102,7 +101,6 @@ export {
|
||||
IMAGES_PATH,
|
||||
BLUR_FILENAME,
|
||||
EFFECT_TYPES,
|
||||
FALLBACK_IMAGE,
|
||||
setSessionVirtualBackgroundInfo,
|
||||
getSessionVirtualBackgroundInfo,
|
||||
getSessionVirtualBackgroundInfoWithDefault,
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 693 B |
Loading…
Reference in New Issue
Block a user