add alert when browser recording is not supported
This commit is contained in:
parent
0ddeda1f1c
commit
b3467912e7
6 changed files with 31 additions and 1 deletions
|
|
@ -7,6 +7,12 @@ export default function CTA() {
|
|||
const posthog = usePostHog();
|
||||
|
||||
const openRecordModal = () => {
|
||||
if (
|
||||
!navigator?.mediaDevices?.getDisplayMedia &&
|
||||
!navigator?.mediaDevices?.getDisplayMedia
|
||||
) {
|
||||
return alert("Your browser is currently NOT supported.");
|
||||
}
|
||||
setRecordOpen(true);
|
||||
|
||||
posthog?.capture("open record video modal", {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@ export default function NewVideoMenu() {
|
|||
const posthog = usePostHog();
|
||||
|
||||
const openRecordModal = () => {
|
||||
if (
|
||||
!navigator?.mediaDevices?.getDisplayMedia &&
|
||||
!navigator?.mediaDevices?.getDisplayMedia
|
||||
) {
|
||||
return alert("Your browser is currently NOT supported.");
|
||||
}
|
||||
setRecordOpen(true);
|
||||
|
||||
posthog?.capture("open record video modal", {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ if (typeof window !== "undefined") {
|
|||
api_host: env.NEXT_PUBLIC_POSTHOG_PROXY_HOST,
|
||||
// Enable debug mode in development
|
||||
loaded: (posthog) => {
|
||||
if (process.env.NODE_ENV === "development") posthog.debug();
|
||||
if (process.env.NODE_ENV === "development") posthog.debug(false);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,12 @@ const Home: NextPage = () => {
|
|||
const posthog = usePostHog();
|
||||
|
||||
const openRecordModal = () => {
|
||||
if (
|
||||
!navigator?.mediaDevices?.getDisplayMedia &&
|
||||
!navigator?.mediaDevices?.getDisplayMedia
|
||||
) {
|
||||
return alert("Your browser is currently NOT supported.");
|
||||
}
|
||||
setRecordOpen(true);
|
||||
|
||||
posthog?.capture("open record video modal", {
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ const VideoList: NextPage = () => {
|
|||
);
|
||||
|
||||
const openRecordModal = () => {
|
||||
if (
|
||||
!navigator?.mediaDevices?.getDisplayMedia &&
|
||||
!navigator?.mediaDevices?.getDisplayMedia
|
||||
) {
|
||||
return alert("Your browser is currently NOT supported.");
|
||||
}
|
||||
setRecordOpen(true);
|
||||
|
||||
posthog?.capture("open record video modal", {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ const VideoList: NextPage = () => {
|
|||
}
|
||||
|
||||
const openRecordModal = () => {
|
||||
if (
|
||||
!navigator?.mediaDevices?.getDisplayMedia &&
|
||||
!navigator?.mediaDevices?.getDisplayMedia
|
||||
) {
|
||||
return alert("Your browser is currently NOT supported.");
|
||||
}
|
||||
setRecordOpen(true);
|
||||
|
||||
posthog?.capture("open record video modal", {
|
||||
|
|
|
|||
Loading…
Reference in a new issue