<!DOCTYPE html>
<html lang="<%= env.get("preferences").as(Preferences).locale %>">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="thumbnail" content="<%= thumbnail %>">
    <%= rendered "components/player_sources" %>
    <link rel="stylesheet" href="/videojs/videojs-overlay/videojs-overlay.css?v=<%= ASSET_COMMIT %>">
    <script src="/videojs/videojs-overlay/videojs-overlay.js?v=<%= ASSET_COMMIT %>"></script>
    <link rel="stylesheet" href="/css/default.css?v=<%= ASSET_COMMIT %>">
    <link rel="stylesheet" href="/css/embed.css?v=<%= ASSET_COMMIT %>">
    <title><%= HTML.escape(video.title) %> - Invidious</title>
    <script src="/js/_helpers.js?v=<%= ASSET_COMMIT %>"></script>
</head>

<body class="dark-theme">
<script id="video_data" type="application/json">
<%=
{
    "id" => video.id,
    "index" => continuation,
    "plid" => plid,
    "length_seconds" => video.length_seconds.to_f,
    "video_series" => video_series,
    "params" => params,
    "preferences" => preferences,
    "premiere_timestamp" => video.premiere_timestamp.try &.to_unix,
    "local_disabled" => CONFIG.disabled?("local")
}.to_pretty_json
%>
</script>

<%= rendered "components/player" %>
<script src="/js/embed.js?v=<%= ASSET_COMMIT %>"></script>
</body>
</html>
