Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp
3.2 KB
Raw Blame
/* SPDX-License-Identifier: AGPL-3.0-or-later */

.container {
	position: relative;
	width: 100%;
	min-width: min(var(--video-player-min-width, 10rem), 100%);
	min-height: var(--video-player-min-height, 7rem);
	background-color: #000;
	border-radius: var(--radius-md, 0.375rem);
	overflow: hidden;
	outline: none;
}

.video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.videoHidden {
	visibility: hidden;
	position: absolute;
}

.seekPreviewVideo {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #000;
	object-fit: contain;
}

.posterOverlay {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background-color: rgba(0, 0, 0, 0.3);
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.posterOverlay:hover {
	background-color: rgba(0, 0, 0, 0.4);
}

.posterImage {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.thumbHashPlaceholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.playOverlayButton {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	background-color: rgba(0, 0, 0, 0.6);
	border: none;
	border-radius: 50%;
	color: var(--text-on-dark);
	cursor: pointer;
	transition: background-color 0.1s ease;
	z-index: 1;
}

.playOverlayButton:hover {
	background-color: rgba(0, 0, 0, 0.8);
}

.controlsOverlay {
	position: absolute;
	bottom: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	display: flex;
	flex-direction: column;
}

.progressBar {
	margin: 0;
	position: relative;
	z-index: 1;
}

.controlsRow {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.5rem 0.5rem 0.25rem;
	margin-top: -0.5rem;
	background-color: var(--background-primary);
}

.controlsLeft {
	display: flex;
	align-items: center;
	gap: 0.125rem;
}

.controlsCenter {
	flex: 1;
}

.controlsRight {
	display: flex;
	align-items: center;
	gap: 0.125rem;
}

.playPauseIndicator {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	background-color: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	color: var(--text-on-dark);
	pointer-events: none;
}

.fillContainer {
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 0;
	border-radius: 0;
}

.fillContainer .video {
	width: 100%;
	height: 100%;
}

.fullscreen {
	position: fixed;
	top: 0;
	inset-inline-start: 0;
	inset-inline-end: 0;
	bottom: 0;
	z-index: var(--z-index-modal);
	border-radius: 0;
}

.fullscreen .video {
	object-fit: contain;
}
.container:fullscreen,
.container:-webkit-full-screen {
	width: 100vw !important;
	height: 100vh !important;
	max-width: none !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	background-color: #000;
	border-radius: 0;
}

.container:fullscreen .video,
.container:-webkit-full-screen .video {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

@media (max-width: 320px) {
	.controlsRow {
		gap: 0.125rem;
	}
}

@media (max-width: 240px) {
	.controlsRight > *:not(:last-child) {
		display: none;
	}
}