spectatr-player-sdk
Version:
A custom video player built with Stencil with Shaka Player integration
162 lines (142 loc) • 2.79 kB
CSS
:host {
max-width: 30%;
display: flex;
overflow: auto;
padding-right: 4px;
}
::-webkit-scrollbar {
width: 4px;
height: 8px;
}
::-webkit-scrollbar-thumb {
background: var(--vp-text);
border-radius: 4px;
}
/* Scrollbar Track (background) */
::-webkit-scrollbar-track {
background: var(--vp-primary-bg);
}
.suggestions-container {
width: 100%;
display: flex;
flex-direction: column;
gap: 8px;
overflow: hidden;
}
.suggestion-title {
color: var(--vp-text);
font-size: 1rem;
font-weight: 500;
margin: 0%;
font-family: var(--title-font);
}
@media (max-width: 768px) {
:host {
min-width: 100%;
max-width: 100%;
height: 100%;
display: block;
padding-right: 0px;
}
.Suggestion-title {
font-size: 0.7rem;
}
.suggestions-container {
padding-right: 0px;
}
}
.suggestions-list {
display: block;
flex: 1;
gap: 6px;
overflow-y: auto;
font-family: var(--description-font);
}
.suggestion-card {
display: flex;
gap: 12px;
height: 77px;
cursor: pointer;
align-items: flex-start;
overflow: hidden;
border-radius: 2px;
padding: 4px;
}
.suggestions-list .selected {
background: rgba(0, 0, 0, 0.2);
opacity: 0.9;
}
.thumbnail-container {
position: relative;
flex-shrink: 0;
width: 130px;
height: 100%;
background: black;
border-radius: 4px;
overflow: hidden;
}
.thumbnail-container img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 4px;
}
.duration {
position: absolute;
bottom: 4px;
right: 4px;
background-color: rgba(0, 0, 0, 0.8);
color: #fff;
font-size: 11px;
padding: 2px 4px;
border-radius: 2px;
}
.suggestion-info {
display: flex;
flex-direction: column;
font-size: 14px;
flex: 1;
min-width: 0;
}
.suggestion-info .title {
font-weight: 600;
margin-bottom: 4px;
line-height: 1.2;
word-break: break-word;
color: var(--vp-text);
display: -webkit-box;
-webkit-line-clamp: 2; /* Limit to 2 lines */
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.suggestion-info .channel {
color: var(--vp-text);
font-size: 13px;
font-weight: thin;
}
.suggestion-info .meta {
color: #909090;
font-size: 12px;
}
h4,
p {
margin: 0;
}
.load-more-container {
display: flex;
justify-content: center;
align-items: center;
}
.load-more-btn {
padding: 0.4rem 0.8rem;
font-size: 0.8rem;
font-weight: 600;
color: var(--vp-video-text);
background-color: var(--vp-accent);
border: none;
border-radius: 0.375rem;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}