Skip to content

Commit

Permalink
feat: support wowza integration
Browse files Browse the repository at this point in the history
  • Loading branch information
james-wallis committed Nov 6, 2024
1 parent 044fcae commit a0b31a0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/components/integrations/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { ButtonProps } from "src/components/button";

export type IntegrationUploadType = "image" | "video";

export type IntegrationUploaderProvider = "mux" | "cloudinary" | "brightcove";
export type IntegrationUploaderProvider =
| "mux"
| "cloudinary"
| "brightcove"
| "wowza";

export type IntegrationUploaderPlaybackPolicy = "signed" | "public" | undefined;

Expand All @@ -28,11 +32,13 @@ export const supportedIntegrations: Record<
cloudinary: true,
mux: false,
brightcove: false,
wowza: false,
},
video: {
mux: true,
cloudinary: true,
brightcove: true,
wowza: true,
},
};

Expand Down
3 changes: 2 additions & 1 deletion src/components/integrations/mux/muxUploader.component.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import MuxUploaderComponent from "@mux/mux-uploader-react";
import { useQueryClient } from "@tanstack/react-query";
import { sentenceCase } from "change-case";
import { CSSProperties, useState } from "react";
import { CgSpinner } from "react-icons/cg";
import { toast } from "react-toastify";
Expand Down Expand Up @@ -92,7 +93,7 @@ export const MuxUploader = ({
<>
<Modal
isOpen={isOpen}
title={`Upload video to ${provider === "brightcove" ? "Brightcove" : "Mux"}`}
title={`Upload video to ${sentenceCase(provider)}`}
size="medium"
closeModal={() => setIsOpen(false)}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const IntegrationUploader = ({
onSuccess: onSuccessWrapper,
};

if (provider === "mux" || provider === "brightcove") {
if (["mux", "brightcove", "wowza"].includes(provider)) {
return <MuxUploader {...opts} {...commonProps} />;
}

Expand Down

0 comments on commit a0b31a0

Please sign in to comment.