Telegram Web K with changes to work inside I2P https://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

409 lines
7.6 KiB

/*
* https://github.com/morethanwords/tweb
* Copyright (C) 2019-2021 Eduard Kuzmenko
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
.ckin {
&__player {
letter-spacing: 0.02em;
user-select: none;
&.ckin__fullscreen {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100%;
width: 100%;
z-index: 10000000;
background: #000;
border-radius: 0 !important;
display: -ms-flexbox;
display: flex;
video {
width: 100%;
height: 100%;
/* max-height: none;
max-width: none; */
object-fit: contain;
}
}
.time {
margin-left: .875rem;
font-size: .875rem;
color: #fff;
@include respond-to(handhelds) {
margin-left: 1rem;
}
}
}
}
.default {
border: 0 solid rgba(0, 0, 0, .2);
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
position: relative;
font-size: 0;
//overflow: hidden;
//border-radius: 5px;
display: flex;
align-items: center;
justify-content: center;
&.show-controls video {
cursor: pointer;
}
/* &:before {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
transition: opacity .2s;
opacity: 1;
visibility: visible;
} */
&__button {
color: #fff;
padding: .375rem;
i {
align-self: center;
}
&--big {
background: none;
border: 0;
line-height: 1;
color: #fff;
text-align: center;
outline: 0;
padding: 0;
cursor: pointer;
position: absolute;
opacity: 1;
visibility: visible;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0) scale(1);
font-size: 4rem;
transition: visibility .2s, opacity .2s;
touch-action: manipulation;
@include respond-to(handhelds) {
font-size: 3rem;
}
}
}
&:not(.played) {
.default__button--big {
opacity: 0;
visibility: hidden;
}
}
&__controls {
position: absolute;
bottom: 0;
right: 0;
left: 0;
transition: transform .3s;
text-align: left;
direction: ltr;
z-index: 6;
.progress-line {
margin: 0 16px;
border-radius: var(--border-radius);
&__filled {
background: var(--primary-color);
}
&__loaded, & {
background: rgba(255, 255, 255, .38);
}
}
}
&__gradient-bottom {
height: 49px;
// padding-top: 49px;
padding-top: 93px;
bottom: 0;
z-index: 2;
background-position: bottom;
width: 100%;
position: absolute;
background-repeat: repeat-x;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);
transition: transform .3s;
pointer-events: none;
}
&:not(.ckin__fullscreen) .default__gradient-bottom {
@include respond-to(handhelds) {
display: none;
}
}
.toggle:before {
content: $tgico-play;
}
&.is-playing {
.default__gradient-bottom {
transform: translate3d(0, 50px, 0);
}
.default__controls {
transform: translate3d(0, 52px, 0);
@include respond-to(handhelds) {
transform: translate3d(0, 65px, 0);
}
}
/* html.no-touch &:hover,*/
&.show-controls.ckin__fullscreen,
&.show-controls:not(.ckin__fullscreen):hover,
html.is-touch &.show-controls {
.default__gradient-bottom,
.default__controls {
transform: translateZ(0);
}
}
&:not(.show-controls) {
cursor: none;
}
&:before {
opacity: 0;
visibility: hidden;
transform: translate3d(-50%, -50%, 0) scale(1.3);
}
.default__button--big {
opacity: 0;
visibility: hidden;
}
.toggle:not(.default__button--big) {
&:before {
content: $tgico-pause;
}
}
}
.player-volume {
margin: 0 .125rem 0 .625rem;
display: flex;
align-items: center;
html.is-touch & {
// margin-left: .125rem;
display: none;
}
&__icon {
fill: #fff;
width: 2.25rem;
height: 2.25rem;
margin-right: .5rem;
cursor: pointer;
padding: .375rem;
}
.progress-line {
--color: #fff;
margin: 0;
width: 50px;
// https://stackoverflow.com/a/4816050
html.is-ios & {
display: none;
}
&__seek {
--thumb-size: 15px;
}
}
}
&.is-buffering {
> .toggle {
display: none !important;
}
}
}
video::-webkit-media-controls-enclosure {
display: none !important;
}
.progress-line {
--color: var(--primary-color);
--height: 5px;
--border-radius: 6px;
border-radius: var(--border-radius);
height: var(--height);
position: relative;
cursor: pointer;
&:before {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: block;
content: " ";
border-radius: inherit;
}
&__seek {
--thumb-size: 13px;
-webkit-appearance: none;
-moz-appearance: none;
background: transparent;
width: 100%;
height: 100%;
cursor: pointer;
padding: 0;
margin: 0;
outline: none;
caret-color: var(--color);
&:focus {
outline: none;
&::-webkit-slider-runnable-track {
background: transparent;
}
&::-moz-range-track {
outline: none;
}
}
&::-webkit-slider-runnable-track {
width: 100%;
cursor: pointer;
border-radius: 1.3px;
-webkit-appearance: none;
}
&::-webkit-slider-thumb {
height: var(--thumb-size);
width: var(--thumb-size);
border-radius: 50%;
background-color: var(--color);
cursor: pointer;
-webkit-appearance: none;
border: none;
//margin-left: -.5px;
}
&::-moz-range-thumb {
height: var(--thumb-size);
width: var(--thumb-size);
border-radius: 50%;
background-color: var(--color);
cursor: pointer;
-webkit-appearance: none;
border: none;
//margin-left: -.5px;
}
&::-ms-thumb {
height: var(--thumb-size);
width: var(--thumb-size);
border-radius: 50%;
background-color: var(--color);
cursor: pointer;
-webkit-appearance: none;
border: none;
//margin-left: -.5px;
}
&::-moz-range-track {
width: 100%;
height: 8.4px;
cursor: pointer;
border: 1px solid transparent;
background: transparent;
//border-radius: 1.3px;
}
}
&__filled {
padding-right: 1px; // * need because there is border-radius
max-width: 100%;
&:not(.progress-line__loaded) {
background-color: var(--color);
z-index: 1;
}
}
&__loaded, &:before {
opacity: .3;
background-color: var(--secondary-color);
}
&__seek, &__filled, &__loaded {
border-radius: var(--border-radius);
position: absolute;
height: 100%;
top: 0;
}
}
input[type=range] {
&::-ms-track {
visibility: hidden;
}
&::-ms-ticks {
background: none;
color: none;
border: none;
}
&::-ms-thumb {
visibility: hidden;
}
&::-ms-tooltip {
visibility: hidden;
}
}
.left-controls,
.right-controls {
display: flex;
align-items: center;
}
.bottom-controls {
padding: 0 .625rem;
height: 2.25rem;
display: flex;
justify-content: space-between;
align-items: center;
@include respond-to(handhelds) {
height: 3.5rem;
padding: 0 .5rem;
}
}