1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 01:44:25 +04:00
Files
tabler/shared/includes/ui/inline-player.html
2025-04-15 23:18:49 +02:00

17 lines
600 B
HTML

{% assign id = include.id %}
{% if id and include.embed-id %}
<div id="player-{{ id }}" data-plyr-provider="{{ include.type | default: 'youtube' }}" data-plyr-embed-id="{{ include.embed-id }}"></div>
{% capture_script %}
<script>
document.addEventListener("DOMContentLoaded", function () {
{% if environment == 'development' %}
window.tabler_player = window.tabler_player || {};
{% endif %}
window.Plyr && ({% if environment == 'development' %}window.tabler_player["player-{{ id }}"] = {% endif %}new Plyr('#player-{{ id }}'));
});
</script>
{% endcapture_script %}
{% endif %}