sanity-plugin-mux-input 2.8.1 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/hooks/useAccessControl.ts +1 -1
- package/src/hooks/useImportMuxAssets.ts +1 -1
- package/src/util/types.ts +3 -0
package/README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Mux Video Input Sanity Plugin
|
|
2
2
|
|
|
3
|
-
> This is a **Sanity Studio v3** plugin.
|
|
4
3
|
> For the v2 version, please refer to the [v2-branch](https://github.com/sanity-io/sanity-plugin-mux-input/tree/studio-v2).
|
|
5
4
|
|
|
6
5
|
This plugin lets you use [Mux](https://www.mux.com) video assets in your Sanity studio.
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -257,7 +257,7 @@ function muxAssetToSanityDocument(asset) {
|
|
|
257
257
|
_createdAt: parseMuxDate(asset.created_at).toISOString(),
|
|
258
258
|
assetId: asset.id,
|
|
259
259
|
playbackId,
|
|
260
|
-
filename: `Asset #${sanity.truncateString(asset.id, 15)}`,
|
|
260
|
+
filename: asset.meta?.title ?? `Asset #${sanity.truncateString(asset.id, 15)}`,
|
|
261
261
|
status: asset.status,
|
|
262
262
|
data: asset
|
|
263
263
|
};
|
|
@@ -916,7 +916,7 @@ function VideoPlayer({
|
|
|
916
916
|
crossOrigin: "anonymous",
|
|
917
917
|
metadata: {
|
|
918
918
|
player_name: "Sanity Admin Dashboard",
|
|
919
|
-
player_version: "2.
|
|
919
|
+
player_version: "2.9.0",
|
|
920
920
|
page_type: "Preview Player"
|
|
921
921
|
},
|
|
922
922
|
audio: isAudio,
|
|
@@ -2310,7 +2310,7 @@ const InputFallback = () => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { pad
|
|
|
2310
2310
|
}
|
|
2311
2311
|
) }), useAccessControl = (config) => {
|
|
2312
2312
|
const user = sanity.useCurrentUser();
|
|
2313
|
-
return { hasConfigAccess: !config?.allowedRolesForConfiguration || user?.roles?.some((role) => config.allowedRolesForConfiguration.includes(role.name)) };
|
|
2313
|
+
return { hasConfigAccess: !config?.allowedRolesForConfiguration?.length || user?.roles?.some((role) => config.allowedRolesForConfiguration.includes(role.name)) };
|
|
2314
2314
|
};
|
|
2315
2315
|
function Onboard(props) {
|
|
2316
2316
|
const { setDialogState } = props, handleOpen = React.useCallback(() => setDialogState("secrets"), [setDialogState]), { hasConfigAccess } = useAccessControl(props.config);
|