{% extends "embeddable.html.twig" %}
{% block page_title %}{{ entry.title }} - {{ parent() }}{% endblock %}
{% block content %}
{% set resource = resource|default(entry.resources.0) %}
{% set options = {} %}
{% if resource.type.classification == 'audio' or resource.type.classification == 'video' %}
{% set ratio = resource.type.classification == 'audio' ? '16:3' : '16:9' %}
{% set options = { 'autostart': false, 'poster': path('entry_poster', { 'type_name': entry.type.name, 'local_id': entry.localId, 'ratio': ratio }) } %}
{% endif %}
{% if resource.properties %}
{% set options = options|merge(resource.properties) %}
{% endif %}
{{ render(controller('ViewersBundle:Viewers:default', { 'type': resource.type.classification ~ '-' ~ resource.type.extension, 'url': attribute(content_conf, entry.type.name).view_host ~ resource.path, 'options': options })) }}
{% endblock %}