> ## Documentation Index
> Fetch the complete documentation index at: https://docs.member.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit a Library file from the hub editor

> Open a hub's Library video in the Admin file editor, save changes, and understand the popup's limits and states.

The admin is Membership.io's control panel for managing your team and Library. Use **Edit in Admin** to open the Library file used by a hub page's Video element. The file opens in a separate window. When you save there, the hub editor refreshes the video.

This is a test run behind feature flags on staging and dev. It is not available in production yet.

## Open a video in Admin

Open the hub editor with `?edit=1`, select a Video element, and find its **Source** card. The **Library file** source can be edited; a **Video link** (URL) or iframe source has no **Edit in Admin** button. Select **Edit in Admin** to open that file in a popup window. After you save file changes in the admin, the hub editor refreshes the video.

The button is disabled on a custom-domain hub: **Editing in Admin isn't available on custom domains yet.** It is also disabled while the hub's Library videos load (**Loading Library files…**), when the chosen video is no longer among them, for example because it was deleted (**Choose a Library video to edit in Admin.**), and when the Library list can't load (**This file isn't available in the Admin editor yet.**). With no video chosen, the button isn't shown.

## Sign in and access

The hub editor, including its **Edit in Admin** button, is available to the hub owner and hub admins. In the Admin popup, sign in with an account that is the team owner or a team admin; the popup lets you sign in if needed. If the hub belongs to another team you manage, the popup shows **This hub is in another team** with a **Switch to \<team>** button. If the hub is not in a team you can manage, the popup shows: **This hub isn't available. It isn't in a team you can manage. Ask the team owner for access.** The hub card continues to say **Editing in Admin window**. If your Admin account cannot access the file and the file request returns 403, the card shows: **Editing in Admin needs an Admin account with access to this team. Ask the team owner to add you in Admin.**

If you reach the hub editor as an owner or admin but have no Admin account (your login exists only on the hub), you can't sign in in the popup. It stays on the sign-in form and the Source card keeps saying **Sign in in the Admin window.** The popup sign-in uses an Admin email and password; it does not offer Google sign-in.

## Popup states

While opening, the Source card can show **Opening…** and then **Connecting to Admin…**. When the popup is connected, it says **Editing in Admin window**. Select **Focus** to bring the popup forward. Select **Cancel** to close it when there are no unsaved edits and no save in progress. If your admin session ends, the card says **Your Admin session ended. Sign in again in the Admin window.** An error banner may offer **Retry** or **Open full Admin**.

With unsaved edits or a save running, **Close** or Esc in the popup opens the **Finish or discard your edit** prompt; a clean file closes at once. If you select **Cancel** in the hub editor while the file has unsaved edits or is saving, the Admin popup is brought forward and the card says **Finish or discard the current edit in the Admin window.** With unsaved edits, choose **Keep editing** or **Discard and close**. While a save is running, the prompt says **Saving…** and has no buttons; wait for the save to finish before closing.

You can edit only one file in a popup at a time. After selecting another file, click **Edit in Admin** for it. If the existing popup is still open, the card says **Close the current Admin window, then click Edit in Admin again.** A clean popup closes itself; then click **Edit in Admin** again for the new file.

You can also close the popup with the browser window's close button. If a save is in progress or there are unsaved edits, the browser asks whether to leave the page. If you confirm, the hub editor detects the closed window and refreshes the file data.

### If you delete the file

In the Admin file editor, **Delete** opens a confirmation. For a file in use, the dialog says **This file is used in N places. Deleting it removes it from all of them.** It lists up to five usages as “title · type”, followed by “and N more”, “and N+ more”, or “and more” when there are additional usages. The button says **Delete anyway** when the file is in use and **Delete** otherwise. If the file is not in use, the dialog says **This file will be deleted.** For a ready or failed file it adds **Support can restore it within 30 days.**; for a pending upload it adds **This cannot be undone.** After deletion, the popup closes and the Video element's Source card says **That file was deleted in Admin.**

### If the popup does not open

If your browser blocks the popup, the Source card says **Pop-up blocked. Allow pop-ups for this site, then click Edit again.** Allow popups for the hub, then select **Edit in Admin** again.

The admin file-edit address is tied to the popup session started by the editor. A signed-out direct open first goes to Admin sign-in. After signing in, opening that address directly in a normal tab shows **Open this screen from the editor** and **This file edit screen is only available from the hub editor.** Return to the hub editor and open the file there.

## Limits

* The hub address must be an HTTPS address with no port on a `member.dev` subdomain. The bare `member.dev` domain and custom-domain hubs cannot use this feature yet.
* Only a Video element's Library file is supported. Playlists and members are not editable this way.

## Related

* [Media workflow](https://docs.member.dev/guides/media-workflow.md): the Admin Library, files, and playlists.
* [Find file usages](https://docs.member.dev/guides/file-usages.md): see where a Library file is used.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.