{# HTML TEXT #}
{% if library.type == enum('LibraryEnum::CONTENT_TEXT') %}
<div class="html-txt">
{{ library.text|raw }}
</div>
{# EMBED #}
{% elseif library.type == enum('LibraryEnum::CONTENT_EMBED') %}
<iframe src="{{ library.link }}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{# GOOGLE DOCS #}
{% elseif library.type == enum('LibraryEnum::CONTENT_FILES') %}
<iframe src="https://docs.google.com/viewer?url=https://{{ client.domainPrimary }}{{ path('getStremLibraryContent', { hash: encodeHex(library.id), timeHash: encodeHex("now"|date("Y-m-d H:i:s")) }) }}&embedded=true" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{# EAD PLAYER #}
{% elseif credentials and library.type in [
enum('LibraryEnum::CONTENT_AUDIO'),
enum('LibraryEnum::CONTENT_VIDEO_FILE'),
]%}
<iframe
src="https://player.vdocipher.com/v2/?otp={{ credentials.otp }}&playbackInfo={{ credentials.playbackInfo }}&primaryColor={{ getConfig('primary_color') }}"
frameborder="0"
allow="encrypted-media"
allowfullscreen
></iframe>
{# LIVE INTERNA #}
{% elseif library.type == enum('LibraryEnum::CONTENT_LIVE') %}
<iframe id="{{ infoLive.embedId }}" src="{{ infoLive.url }}" width="1280" height="720" frameborder="0" scrolling="no"></iframe>
<script data-embedid="{{ infoLive.embedId }}" src="{{ cdnLivestream }}"></script>
{# YOUTUBE | VIMEO #}
{% else %}
{% set linkVimeo = getVimeoFormatIframe(library.link) %}
<iframe src="{{ linkVimeo is not empty ? linkVimeo : library.link }}{% if 'vimeo.com' in library.link or 'youtube.com' in library.link %}?autoplay=0&rel=0&controls=1&showinfo=0&portrait=0&title=0&byline=0&color={{ getConfig('primary_color')|slice(1, 7) }}&autohide=1{% endif %}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{% endif %}