Create Context Based on Field File Type
Can I suggest a slightly different strategy? If you have the Rules modules installed - or are willing to install it - then can use a Rules condition to apply the specific test you want. If it passes that test, you can get Rules to set a field on your node that Context can respond to.

So, for example, you could have a Term reference on your content type that has three vocabulary items 'YouTube', 'Image', 'Empty'. Rules can set this field whenever the node is saved. And Context is able to respond differently depending on the Taxonomy Term that is present.

A downside is the user gets to see the Term reference field when entering data, but since it's changed to the right value on save anyway, this may not be a big deal. You can tell the user to ignore this on the form and hide it away, e.g. in a closed fieldset. Or if you are a Display Suite user, you can easily hide using configuration.

I've tested whether Rules can pick up the media type and can confirm it does so quite cheerfully. To start the process, add a new rule and choose React on event with the type 'Before saving content'. Supposing you have a field on your content type with the machine name field_media, then you will need to use a Data comparison condition that checked [node:field-media:file:mime] to see if it is equal to video/youtube or image\png etc. You may need to do a bit of fishing to get out all the relevant mime types. You'll then need to create an appropriate action when the condition is true. You'll probably want several rules bundled together in a Rule set.

A single condition will look a bit like this:



If you've not used Rules before, it can be a bit fiddly to set up the first couple of times, but well worth it. Knowing that it can detect the condition that is of interest to you, means that this is a solution that you can make work.