Need to unset a widget tab from media browser based on the condition of media type supported by the field.
Media types: Image and Video.
For example, There is a field which references image media type only. When the media browser appears on the form, it displays create embed tab as well to embed the videos.
As the field doesn’t reference the video media type, need to unset the tab programmatically to help the content author.
I have tried the form alter, but I don’t get any information about the media type referenced by the field in the hook.