Skip to content

Commit

Permalink
Fix LTPlayer loading (#162)
Browse files Browse the repository at this point in the history
* Fix LTPlayer URLs

* Fix comments in mobile layout for widths 700px-1080px
  • Loading branch information
kuylar authored Aug 12, 2024
1 parent f1217d5 commit bd2efa5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions LightTube/JsCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ public static class JsCache
private static Dictionary<string, Uri> LibraryUrls = new()
{
["hls.js"] = new Uri("https://cdn.jsdelivr.net/npm/hls.js@1.4.0/dist/hls.min.js"),
["ltplayer.js"] = new Uri("https://raw.githubusercontent.com/lighttube-org/LTPlayer/fix/few-fixes/dist/player.min.js"),
["ltplayer.css"] = new Uri("https://raw.githubusercontent.com/lighttube-org/LTPlayer/fix/few-fixes/dist/player.min.css"),
["ltplayer.js"] = new Uri("https://raw.githubusercontent.com/lighttube-org/LTPlayer/master/dist/player.min.js"),
["ltplayer.css"] = new Uri("https://raw.githubusercontent.com/lighttube-org/LTPlayer/master/dist/player.min.css"),
};
private static Dictionary<string, string> Hashes = [];
public static DateTimeOffset CacheUpdateTime = DateTimeOffset.MinValue;
Expand Down
8 changes: 4 additions & 4 deletions LightTube/Views/Youtube/Watch.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</div>
@if (Model.Comments is not null)
{
<div class="interaction-buttons hide-on-desktop">
<div class="interaction-buttons mobile-comments-breakpoint">
<label class="interaction-button" for="comments-toggle">
<svg class="icon" width="20" height="20" fill="currentColor">
<use xlink:href="/svg/bootstrap-icons.svg#chat-left-text"></use>
Expand Down Expand Up @@ -108,13 +108,13 @@
{
<details>
<summary>
<svg class="icon hide-on-desktop" width="32" height="32" fill="currentColor">
<svg class="icon mobile-comments-breakpoint" width="32" height="32" fill="currentColor">
<use class="only-when-closed" xlink:href="/svg/bootstrap-icons.svg#chevron-right"></use>
<use class="only-when-open" xlink:href="/svg/bootstrap-icons.svg#chevron-down"></use>
</svg>
@(Model.Video.CommentsCountText ?? Model.Comments.Results.Length + (Model.Comments.ContinuationToken != null ? "+" : "")) @Model.Localization.GetString("watch.comments.count")
<div class="flex-divider hide-on-desktop"></div>
<label for="comments-toggle" class="hide-on-desktop">
<div class="flex-divider mobile-comments-breakpoint"></div>
<label for="comments-toggle" class="mobile-comments-breakpoint">
<svg class="icon" width="32" height="32" fill="currentColor">
<use xlink:href="/svg/bootstrap-icons.svg#x"></use>
</svg>
Expand Down
8 changes: 8 additions & 0 deletions LightTube/wwwroot/css/lighttube.css
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,10 @@ body.no-guide .app {
margin-left: -8px;
height: auto !important;
}

.mobile-comments-breakpoint {
display: block !important;
}
}

.watch-page, .watch-page > div {
Expand Down Expand Up @@ -1093,6 +1097,10 @@ input#comments-toggle {
font-size: larger;
}

.mobile-comments-breakpoint {
display: none;
}

/* Search Page */

.search-container {
Expand Down

0 comments on commit bd2efa5

Please sign in to comment.