@using System.Web @using InnerTube @using InnerTube.Models @model LightTube.Contexts.PlayerContext @{ ViewBag.Metadata = new Dictionary(); ViewBag.Metadata["author"] = Model.Video.Channel.Name; ViewBag.Metadata["og:title"] = Model.Player.Title; ViewBag.Metadata["og:url"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}{Url.ActionContext.HttpContext.Request.Path}{Url.ActionContext.HttpContext.Request.QueryString}"; ViewBag.Metadata["og:image"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}/proxy/image?url={HttpUtility.UrlEncode(Model.Player.Thumbnails.FirstOrDefault()?.Url?.ToString())}"; ViewBag.Metadata["twitter:card"] = $"{Url.ActionContext.HttpContext.Request.Scheme}://{Url.ActionContext.HttpContext.Request.Host}/proxy/image?url={HttpUtility.UrlEncode(Model.Player.Thumbnails.LastOrDefault()?.Url?.ToString())}"; ViewBag.Title = Model.Player.Title; Layout = "_Layout"; }

@Model.Player.Title

@Model.Video.Views • @Model.Video.UploadDate

Muxed formats

These downloads have both video and audio in them

@foreach (Format format in Model.Player.Formats) { }

Audio only formats

These downloads have only have audio in them

@foreach (Format format in Model.Player.AdaptiveFormats.Where(x => x.VideoCodec == "none")) {
@format.FormatNote (Codec: @format.AudioCodec, Sample Rate: @format.AudioSampleRate)
Download through LightTube Download through YouTube
}

Video only formats

These downloads have only have video in them

@foreach (Format format in Model.Player.AdaptiveFormats.Where(x => x.AudioCodec == "none")) {
@format.FormatNote (Codec: @format.VideoCodec)
Download through LightTube Download through YouTube
}