Add shutter sound to Thumbnail Camera

This commit is contained in:
MyNameIsBatman 2021-11-26 00:41:03 -03:00
parent a8eb8ecf22
commit 02e3e04fe7

View File

@ -1,6 +1,7 @@
import { NitroRectangle } from '@nitrots/nitro-renderer'; import { NitroRectangle } from '@nitrots/nitro-renderer';
import { FC, useCallback, useRef } from 'react'; import { FC, useCallback, useRef } from 'react';
import { GetRoomEngine, LocalizeText } from '../../api'; import { GetRoomEngine, LocalizeText } from '../../api';
import { PlaySound } from '../../api/utils/PlaySound';
import { DraggableWindow } from '../draggable-window'; import { DraggableWindow } from '../draggable-window';
import { NitroLayoutMiniCameraViewProps } from './NitroLayoutMiniCameraView.types'; import { NitroLayoutMiniCameraViewProps } from './NitroLayoutMiniCameraView.types';
@ -20,6 +21,7 @@ export const NitroLayoutMiniCameraView: FC<NitroLayoutMiniCameraViewProps> = pro
const takePicture = useCallback(() => const takePicture = useCallback(() =>
{ {
PlaySound('camera_shutter');
textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds())); textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds()));
}, [ roomId, getCameraBounds, textureReceiver ]); }, [ roomId, getCameraBounds, textureReceiver ]);