Snippet: Template logic to test object attribute

Example

You can use this as a simple solution

{if $attribute.content.filename}
{* show the player *}
...
{else}

{* omit the player *}
...
{/if} 

Reference