itube-modern-player 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -1
- package/dist/core.cjs +3 -3
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +516 -356
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/itube-modern-player.iife.js +3 -3
- package/dist/itube-modern-player.iife.js.map +1 -1
- package/dist/{labels-C3gAZEm-.js → labels-DZFT0XMa.js} +5 -1
- package/dist/labels-DZFT0XMa.js.map +1 -0
- package/dist/labels-y0IHe3i9.cjs +2 -0
- package/dist/labels-y0IHe3i9.cjs.map +1 -0
- package/dist/locales.cjs +1 -1
- package/dist/locales.cjs.map +1 -1
- package/dist/locales.js +44 -4
- package/dist/locales.js.map +1 -1
- package/dist/player.d.ts +18 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +55 -1
- package/dist/ui/controls.d.ts +16 -1
- package/dist/ui/menu.d.ts +15 -5
- package/dist/ui/overlays.d.ts +12 -0
- package/package.json +1 -1
- package/dist/labels-C3gAZEm-.js.map +0 -1
- package/dist/labels-DTgTxMuq.cjs +0 -2
- package/dist/labels-DTgTxMuq.cjs.map +0 -1
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.imp-player{--imp-accent: #e53935;--imp-bg: #000;--imp-text: #fff;--imp-control-bg: rgba(20, 20, 20, .85);--imp-track: rgba(255, 255, 255, .25);--imp-track-buffered: rgba(255, 255, 255, .35);--imp-radius: 8px;--imp-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--imp-controls-height: 48px;--imp-transition: .18s ease;position:relative;width:100%;aspect-ratio:16 / 9;background:var(--imp-bg);color:var(--imp-text);font-family:var(--imp-font);font-size:14px;line-height:1.4;overflow:hidden;border-radius:var(--imp-radius);outline:none;user-select:none;-webkit-user-select:none;container-type:inline-size}.imp-player--fullscreen{border-radius:0}.imp-player [hidden],.imp-ad [hidden]{display:none!important}.imp-video{width:100%;height:100%;display:block;object-fit:contain}.imp-layer{position:absolute;inset:0;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "middle" "bottom";pointer-events:none}.imp-layer__middle{grid-area:middle;display:flex;align-items:center;justify-content:center}.imp-center-controls{position:absolute;inset:0;align-items:center;justify-content:center;gap:16px;pointer-events:none;transition:opacity var(--imp-transition)}.imp-player--idle .imp-center-controls{opacity:0;pointer-events:none}.imp-player--idle .imp-center-controls *,.imp-player--idle .imp-layer__bottom *{pointer-events:none}.imp-center-btn{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:10px;border:0;border-radius:50%;background:#00000073;color:#fff;cursor:pointer;transition:background var(--imp-transition),transform var(--imp-transition)}.imp-center-btn svg{width:100%;height:100%}.imp-center-btn--play{width:56px;height:56px;padding:14px;background:var(--imp-accent)}.imp-center-btn:hover:not(:disabled){background:#0009}.imp-center-btn--play:hover:not(:disabled){background:var(--imp-accent)}.imp-center-btn:active:not(:disabled){transform:scale(.9)}.imp-center-btn:disabled{opacity:.35;cursor:default}.imp-btn--seek-back,.imp-btn--seek-forward,.imp-center-btn--seek-back,.imp-center-btn--seek-forward{position:relative}.imp-seek-num{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:7px;font-weight:700;line-height:1;letter-spacing:-.5px;pointer-events:none;font-variant-numeric:tabular-nums}.imp-center-btn .imp-seek-num{font-size:11px}.imp-center-btn--seek-back,.imp-center-btn--seek-forward{background:transparent;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}.imp-center-btn--seek-back:hover:not(:disabled),.imp-center-btn--seek-forward:hover:not(:disabled){background:#0000004d}.imp-next-preview{position:absolute;z-index:8;width:220px;max-width:calc(100% - 16px);background:#14141cf5;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:8px;box-shadow:0 8px 24px #00000080;pointer-events:none;color:#fff;animation:imp-fade-in .12s ease}.imp-next-preview__kicker{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--imp-accent);margin-bottom:6px}.imp-next-preview__thumb{position:relative;width:100%;aspect-ratio:16 / 9;background:#000 center / cover no-repeat;border-radius:6px;overflow:hidden}.imp-next-preview__duration{position:absolute;right:4px;bottom:4px;padding:1px 5px;border-radius:3px;background:#000c;font-size:11px;font-variant-numeric:tabular-nums}.imp-next-preview__title{margin-top:6px;font-size:13px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-next-preview__meta{margin-top:3px;font-size:11px;opacity:.7}.imp-layer__bottom{grid-area:bottom;display:flex;flex-direction:column;background:linear-gradient(transparent,#000000b3);padding:24px 12px 8px;opacity:1;transition:opacity var(--imp-transition)}.imp-player--idle .imp-layer__bottom{opacity:0;pointer-events:none}.imp-player--idle{cursor:none}.imp-btn{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:6px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;transition:background var(--imp-transition),transform var(--imp-transition)}.imp-btn svg{width:100%;height:100%}.imp-btn:hover:not(:disabled){background:#ffffff26}.imp-btn:focus-visible{outline:2px solid var(--imp-accent);outline-offset:1px}.imp-btn:disabled{opacity:.35;cursor:default}.imp-btn--active{color:var(--imp-accent)}.imp-btn--like.imp-btn--active{color:var(--imp-like, forestgreen)}.imp-btn--dislike.imp-btn--active{color:var(--imp-dislike, #e53935)}.imp-action{position:relative;display:inline-flex}.imp-count-tooltip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%) scale(.9);padding:3px 7px;border-radius:5px;background:var(--imp-control-bg);color:var(--imp-text);font-size:12px;font-variant-numeric:tabular-nums;line-height:1.2;white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--imp-transition),transform var(--imp-transition);z-index:5}.imp-action:hover .imp-count-tooltip:not([hidden]){opacity:1;visibility:visible;transform:translate(-50%) scale(1)}.imp-controls{display:flex;flex-direction:column;gap:4px}.imp-controls__row{display:flex;align-items:center;gap:4px;min-height:var(--imp-controls-height)}.imp-controls__group{display:flex;align-items:center;gap:2px;flex:0 0 auto}.imp-controls__row .imp-btn,.imp-controls__menu-anchor,.imp-action,.imp-volume,.imp-controls__time,.imp-controls__live{flex:0 0 auto}.imp-controls__spacer{flex:1;display:flex;align-items:center;justify-content:center;min-width:0}.imp-controls__chapter{font-size:12px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.imp-controls__time{font-variant-numeric:tabular-nums;font-size:13px;margin:0 6px;white-space:nowrap}.imp-controls__live{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.5px;margin:0 6px}.imp-controls__live:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--imp-accent)}.imp-controls__menu-anchor{position:relative;display:flex}.imp-volume{display:flex;align-items:center}.imp-volume__slider{pointer-events:auto;appearance:none;-webkit-appearance:none;width:0;opacity:0;height:4px;border-radius:2px;background:linear-gradient(to right,var(--imp-text) var(--imp-volume-fill, 100%),var(--imp-track) var(--imp-volume-fill, 100%));cursor:pointer;transition:width var(--imp-transition),opacity var(--imp-transition)}.imp-volume:hover .imp-volume__slider,.imp-volume__slider:focus-visible{width:64px;opacity:1;margin-right:6px}.imp-volume__slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:var(--imp-text);border:0}.imp-volume__slider::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--imp-text);border:0}.imp-progress{pointer-events:auto;position:relative;height:16px;display:flex;align-items:center;cursor:pointer;touch-action:none}.imp-progress--live{visibility:hidden}.imp-progress__heatmap{position:absolute;left:0;right:0;bottom:10px;height:36px;pointer-events:none;opacity:0;transition:opacity var(--imp-transition)}.imp-progress:hover .imp-progress__heatmap,.imp-progress--scrubbing .imp-progress__heatmap{opacity:1}.imp-progress__heatmap svg{width:100%;height:100%;display:block}.imp-progress__heatmap path{fill:#ffffff59}.imp-progress__buffered{position:absolute;left:0;height:4px;width:0;border-radius:2px;background:var(--imp-track-buffered);transition:height var(--imp-transition)}.imp-progress__track{position:relative;display:flex;gap:2px;width:100%;height:4px;transition:height var(--imp-transition)}.imp-progress:hover .imp-progress__track,.imp-progress--scrubbing .imp-progress__track,.imp-progress:hover .imp-progress__buffered,.imp-progress--scrubbing .imp-progress__buffered{height:6px}.imp-progress__segment{position:relative;flex-basis:0;height:100%;background:var(--imp-track);border-radius:2px;overflow:hidden}.imp-progress__fill{width:100%;height:100%;background:var(--imp-accent);transform:scaleX(0);transform-origin:left}.imp-progress__handle{position:absolute;width:12px;height:12px;border-radius:50%;background:var(--imp-accent);transform:translate(-50%) scale(0);transition:transform var(--imp-transition);pointer-events:none}.imp-progress:hover .imp-progress__handle,.imp-progress--scrubbing .imp-progress__handle{transform:translate(-50%) scale(1)}.imp-progress__tooltip{position:absolute;bottom:22px;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px;border-radius:6px;background:var(--imp-control-bg);opacity:0;visibility:hidden;transition:opacity var(--imp-transition);pointer-events:none;white-space:nowrap}.imp-progress__tooltip--visible{opacity:1;visibility:visible}.imp-progress__thumb{border-radius:4px;background-color:#111;background-repeat:no-repeat}.imp-progress__tooltip-chapter{font-size:12px;font-weight:600;max-width:220px;overflow:hidden;text-overflow:ellipsis}.imp-progress__tooltip-time{font-size:11px;font-variant-numeric:tabular-nums;opacity:.85}.imp-menu{pointer-events:auto;position:absolute;right:0;bottom:44px;min-width:160px;max-height:280px;overflow-y:auto;background:var(--imp-control-bg);border-radius:var(--imp-radius);padding:6px;backdrop-filter:blur(8px);z-index:5}.imp-menu__backdrop{display:none}.imp-menu--wide{min-width:240px}.imp-menu__section+.imp-menu__section{margin-top:6px;border-top:1px solid rgba(255,255,255,.12);padding-top:6px}.imp-menu__title{font-size:11px;text-transform:uppercase;letter-spacing:.6px;opacity:.6;padding:4px 8px}.imp-menu__item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:transparent;color:inherit;font:inherit;padding:7px 10px;border-radius:5px;cursor:pointer}.imp-menu__icon{display:inline-flex;width:18px;height:18px;flex-shrink:0}.imp-menu__icon svg,.imp-menu__icon img{width:100%;height:100%;object-fit:contain}.imp-menu__label{white-space:nowrap}.imp-menu__item:hover{background:#ffffff1f}.imp-menu__item--active{color:var(--imp-accent);font-weight:600}.imp-menu__row .imp-menu__value{margin-left:auto;opacity:.7;white-space:nowrap}.imp-menu__chevron{display:inline-flex;width:16px;height:16px;flex-shrink:0;opacity:.7}.imp-menu__row .imp-menu__chevron{margin-left:4px}.imp-menu__chevron svg{width:100%;height:100%}.imp-menu__back{font-weight:600;border-bottom:1px solid rgba(255,255,255,.12);border-radius:5px 5px 0 0;margin-bottom:4px}.imp-menu__back .imp-menu__chevron{width:18px;height:18px;opacity:.9}.imp-poster{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--imp-bg)}.imp-poster__image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.imp-poster__play{position:relative;width:72px;height:72px;border-radius:50%;background:var(--imp-accent);padding:16px}.imp-poster__play:hover:not(:disabled){background:var(--imp-accent);transform:scale(1.08)}.imp-player--play-inverted .imp-poster__play,.imp-player--play-inverted .imp-center-btn--play{background:#ffffffd9;color:var(--imp-accent)}.imp-player--play-inverted .imp-poster__play:hover:not(:disabled),.imp-player--play-inverted .imp-center-btn--play:hover:not(:disabled){background:#fffffff2}.imp-error{pointer-events:auto;max-width:80%;padding:10px 16px;border-radius:8px;background:#000000bf;border:1px solid rgba(255,255,255,.2);font-size:13px;text-align:center}.imp-spinner{position:absolute;inset:0;margin:auto;width:48px;height:48px;border:4px solid rgba(255,255,255,.25);border-top-color:var(--imp-text);border-radius:50%;animation:imp-spin .8s linear infinite}@keyframes imp-spin{to{transform:rotate(360deg)}}.imp-pause-screen{grid-area:top;pointer-events:auto;padding:20px 24px;background:linear-gradient(rgba(0,0,0,.7),transparent);animation:imp-fade-in .22s ease}.imp-pause-screen--custom{grid-area:1 / 1 / -1 / -1;display:flex;align-items:center;justify-content:center;padding:16px;background:#0009;z-index:4}.imp-pause-screen__custom{pointer-events:auto;max-width:100%;max-height:100%;overflow:auto}.imp-pause-screen__default{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.imp-pause-screen__heading{flex:1;min-width:0}.imp-channel{display:flex;align-items:center;gap:10px;border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;flex-shrink:0}.imp-channel--link{cursor:pointer}.imp-channel--link:hover .imp-channel__name{text-decoration:underline}.imp-channel__avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--imp-accent),#7b1fa2);background-size:cover;background-position:center}.imp-channel__avatar--rounded{border-radius:10px}.imp-channel__avatar--square{border-radius:0}.imp-channel__avatar--circle{border-radius:50%}.imp-channel__avatar{background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;flex-shrink:0}.imp-channel__name{font-size:14px;font-weight:600;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.imp-pause-screen__title{font-size:20px;font-weight:700}.imp-pause-screen__description{margin-top:6px;font-size:14px;opacity:.85;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-sponsor{display:inline-flex;align-items:center;gap:7px;margin:0 0 10px -8px;padding:5px 11px 5px 8px;border-radius:6px;max-width:100%;background:#00000073;border:1px solid rgba(255,255,255,.25);color:var(--imp-text);font-size:13px;font-weight:600;text-decoration:none;pointer-events:auto;transition:border-color var(--imp-transition),background var(--imp-transition)}.imp-sponsor:hover{border-color:var(--imp-accent);background:#0009}.imp-sponsor__label{flex-shrink:0;padding:1px 6px;border-radius:3px;background:var(--imp-accent);color:#fff;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px}.imp-sponsor__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes imp-fade-in{0%{opacity:0}}.imp-related{grid-area:middle;pointer-events:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:24px;background:#000c;animation:imp-fade-in .22s ease;z-index:2}.imp-related__close{align-self:flex-end}.imp-related__title{font-size:16px;font-weight:700}.imp-related__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;overflow-y:auto}.imp-related__card{display:flex;flex-direction:column;gap:6px;border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.imp-related__thumb{position:relative;aspect-ratio:16 / 9;border-radius:6px;background-color:#222;background-size:cover;background-position:center;transition:transform var(--imp-transition)}.imp-related__card:hover .imp-related__thumb{transform:scale(1.04)}.imp-related__duration{position:absolute;right:6px;bottom:6px;padding:1px 5px;border-radius:4px;background:#000c;font-size:11px;font-variant-numeric:tabular-nums}.imp-related__card-title{font-size:13px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-playlist{position:absolute;display:flex;flex-direction:column;background:var(--imp-control-bg);backdrop-filter:blur(8px);z-index:6;--imp-thumb-w: 88}.imp-playlist--sidebar{top:0;right:0;bottom:0;width:min(320px,80%);animation:imp-slide-in .2s ease}.imp-playlist--bottom{left:0;right:0;bottom:0;max-height:46%;animation:imp-slide-up .2s ease;--imp-thumb-w: 128}.imp-playlist--bottom .imp-playlist__list{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:0 12px 12px}.imp-playlist--bottom .imp-playlist__item{flex-direction:column;align-items:stretch;flex:0 0 calc(var(--imp-thumb-w) * 1px + 12px)}.imp-playlist--bottom .imp-playlist__thumb{flex:0 0 auto;width:calc(var(--imp-thumb-w) * 1px)}@keyframes imp-slide-up{0%{transform:translateY(100%)}}.imp-playlist__tools{display:flex;align-items:center;gap:2px}.imp-playlist__heading{min-width:0}.imp-playlist__kicker{font-size:11px;font-weight:400;text-transform:uppercase;letter-spacing:.6px;opacity:.6}.imp-playlist__name{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes imp-slide-in{0%{transform:translate(100%)}}.imp-playlist__header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;font-weight:700}.imp-playlist__list{overflow-y:auto;display:flex;flex-direction:column;padding:0 8px 8px;gap:4px}.imp-playlist__item{display:flex;gap:10px;align-items:center;padding:6px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.imp-playlist__item:hover{background:#ffffff1a}.imp-playlist__item--active{background:#ffffff24;box-shadow:inset 2px 0 0 var(--imp-accent)}.imp-playlist__thumb{flex:0 0 calc(var(--imp-thumb-w) * 1px);aspect-ratio:16 / 9;border-radius:4px;background-color:#222;background-size:cover;background-position:center;overflow:hidden}.imp-scenes__sprite{background-repeat:no-repeat;transform:scale(calc(var(--imp-thumb-w) / var(--imp-sprite-w, 160)));transform-origin:top left}.imp-playlist__title{font-size:13px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-playlist__duration{font-size:12px;opacity:.7;font-variant-numeric:tabular-nums}.imp-ad{position:absolute;inset:0;display:grid;grid-template-rows:auto 1fr auto;background:var(--imp-bg);z-index:10}.imp-ad__video{grid-row:1 / -1;grid-column:1;width:100%;height:100%;object-fit:contain;cursor:pointer}.imp-ad__spinner{grid-row:2;grid-column:1;justify-self:center;align-self:center;pointer-events:none}.imp-ad__hud{grid-row:1;grid-column:1;position:relative;z-index:2;display:flex;align-items:center;gap:10px;padding:12px 14px;pointer-events:none}.imp-ad__badge{padding:3px 8px;border-radius:4px;background:#000000b3;border:1px solid rgba(255,255,255,.4);font-size:12px;font-weight:700}.imp-ad__countdown{font-size:12px;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px rgba(0,0,0,.8)}.imp-ad__actions{grid-row:3;grid-column:1;position:relative;z-index:2;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:14px}.imp-ad__skip,.imp-ad__visit{border:1px solid rgba(255,255,255,.5);background:#000000bf;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:6px;cursor:pointer;touch-action:manipulation}.imp-ad__skip:disabled{opacity:.7;cursor:default}.imp-ad__skip:hover:not(:disabled),.imp-ad__visit:hover{background:#fff3}.imp-ad--paused:after{content:"▶";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:48px;background:#0006;pointer-events:none}@media(max-width:767px){.imp-btn{width:28px;height:28px;padding:5px}.imp-controls__row{gap:0;min-height:38px}.imp-controls__group{gap:0}.imp-layer__bottom{padding:12px 6px 5px}.imp-controls__chapter{display:none}.imp-btn--seek-back,.imp-btn--seek-forward{width:26px;height:26px;padding:5px;opacity:.75}.imp-progress{height:12px}.imp-controls__time,.imp-controls__live{font-size:10px;margin:0 3px}.imp-poster__play{width:48px;height:48px;padding:11px}.imp-spinner{width:36px;height:36px;border-width:3px}.imp-pause-screen{padding:8px 10px}.imp-pause-screen__default{align-items:flex-start;gap:8px}.imp-pause-screen__title{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:0}.imp-pause-screen__description{display:none}.imp-channel{align-self:flex-start}.imp-channel__name{display:none}.imp-channel__avatar{width:32px;height:32px}.imp-sponsor{margin-top:6px;padding:4px 8px;font-size:11px;gap:5px}.imp-sponsor__label{font-size:9px}.imp-ad__hud{padding:8px 10px;gap:6px}.imp-ad__badge{font-size:10px;padding:2px 6px}.imp-ad__countdown{font-size:11px}.imp-ad__actions{padding:8px;gap:6px}.imp-ad__skip,.imp-ad__visit{padding:6px 10px;font-size:12px}.imp-ad--paused:after{font-size:36px}.imp-controls__menu-anchor{position:static}.imp-menu{position:absolute;inset:auto 0 0;box-sizing:border-box;min-width:0;max-width:none;max-height:80%;overflow-y:auto;border-radius:var(--imp-radius) var(--imp-radius) 0 0;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));box-shadow:0 -8px 24px #00000080;animation:imp-slide-up .18s ease;z-index:6}.imp-menu__backdrop{display:block;position:absolute;inset:0;background:#00000080;pointer-events:auto;z-index:5;animation:imp-fade-in .18s ease}.imp-menu__item{padding:10px}.imp-playlist{inset:0;width:auto;max-height:none;border-radius:0;animation:imp-fade-in .18s ease}.imp-playlist--bottom .imp-playlist__list,.imp-playlist__list{flex-direction:column;overflow-x:hidden;overflow-y:auto}.imp-playlist--bottom .imp-playlist__item{flex-direction:row;align-items:center;flex:0 0 auto}.imp-playlist--bottom .imp-playlist__thumb,.imp-playlist__thumb{flex:0 0 120px;width:120px}}
|
|
1
|
+
.imp-player{--imp-accent: #e53935;--imp-bg: #000;--imp-text: #fff;--imp-control-bg: rgba(20, 20, 20, .85);--imp-track: rgba(255, 255, 255, .25);--imp-track-buffered: rgba(255, 255, 255, .35);--imp-radius: 8px;--imp-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--imp-controls-height: 48px;--imp-transition: .18s ease;position:relative;width:100%;aspect-ratio:16 / 9;background:var(--imp-bg);color:var(--imp-text);font-family:var(--imp-font);font-size:14px;line-height:1.4;overflow:hidden;border-radius:var(--imp-radius);outline:none;user-select:none;-webkit-user-select:none;container-type:inline-size}.imp-player--fullscreen{border-radius:0}.imp-player [hidden],.imp-ad [hidden]{display:none!important}.imp-video{width:100%;height:100%;display:block;object-fit:contain}.imp-layer{position:absolute;inset:0;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "middle" "bottom";pointer-events:none}.imp-layer__middle{grid-area:middle;display:flex;align-items:center;justify-content:center}.imp-center-controls{position:absolute;inset:0;align-items:center;justify-content:center;gap:16px;pointer-events:none;transition:opacity var(--imp-transition)}.imp-player--idle .imp-center-controls{opacity:0;pointer-events:none}.imp-player--idle .imp-center-controls *,.imp-player--idle .imp-layer__bottom *{pointer-events:none}.imp-center-btn{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;padding:10px;border:0;border-radius:50%;background:#00000073;color:#fff;cursor:pointer;transition:background var(--imp-transition),transform var(--imp-transition)}.imp-center-btn svg{width:100%;height:100%}.imp-center-btn--play{width:84px;height:84px;padding:22px;margin:0 44px;background:var(--imp-accent)}.imp-center-btn:hover:not(:disabled){background:#0009}.imp-center-btn--play:hover:not(:disabled){background:var(--imp-accent)}.imp-center-btn:active:not(:disabled){transform:scale(.9)}.imp-center-btn:disabled{opacity:.35;cursor:default}.imp-btn--seek-back,.imp-btn--seek-forward,.imp-center-btn--seek-back,.imp-center-btn--seek-forward{flex-direction:column;gap:2px}.imp-seek-num{font-weight:800;line-height:1;font-variant-numeric:tabular-nums;pointer-events:none}.imp-center-btn--seek-back,.imp-center-btn--seek-forward{width:auto;height:auto;padding:0;border-radius:0;background:transparent;filter:drop-shadow(0 1px 2px rgba(0,0,0,.6))}.imp-center-btn--seek-back svg,.imp-center-btn--seek-forward svg{width:34px;height:34px}.imp-center-btn .imp-seek-num{font-size:13px}.imp-center-btn--seek-back:hover:not(:disabled),.imp-center-btn--seek-forward:hover:not(:disabled){background:transparent;opacity:.85}.imp-btn--seek-back,.imp-btn--seek-forward{width:auto;height:auto;padding:2px 6px}.imp-btn--seek-back svg,.imp-btn--seek-forward svg{width:18px;height:18px}.imp-btn--seek-back .imp-seek-num,.imp-btn--seek-forward .imp-seek-num{font-size:9px}.imp-next-preview{position:absolute;z-index:8;width:220px;max-width:calc(100% - 16px);background:#14141cf5;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:8px;box-shadow:0 8px 24px #00000080;pointer-events:none;color:#fff;animation:imp-fade-in .12s ease}.imp-next-preview__kicker{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--imp-accent);margin-bottom:6px}.imp-next-preview__thumb{position:relative;width:100%;aspect-ratio:16 / 9;background:#000 center / cover no-repeat;border-radius:6px;overflow:hidden}.imp-next-preview__duration{position:absolute;right:4px;bottom:4px;padding:1px 5px;border-radius:3px;background:#000c;font-size:11px;font-variant-numeric:tabular-nums}.imp-next-preview__title{margin-top:6px;font-size:13px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-next-preview__meta{margin-top:3px;font-size:11px;opacity:.7}.imp-menu__toggle{justify-content:space-between}.imp-switch{flex-shrink:0;position:relative;width:36px;height:20px;border-radius:10px;background:#ffffff40;transition:background var(--imp-transition)}.imp-switch__knob{position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform var(--imp-transition)}.imp-menu__toggle--on .imp-switch{background:var(--imp-accent)}.imp-menu__toggle--on .imp-switch__knob{transform:translate(16px)}.imp-upnext{position:absolute;inset:0;z-index:7;display:flex;align-items:center;justify-content:center;background:#000000b8;animation:imp-fade-in .18s ease}.imp-upnext__card{width:280px;max-width:80%;text-align:center;color:#fff}.imp-upnext__kicker{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--imp-accent);margin-bottom:8px}.imp-upnext__thumb{position:relative;display:block;width:100%;aspect-ratio:16 / 9;border:0;padding:0;border-radius:10px;background:#000 center / cover no-repeat;cursor:pointer;overflow:hidden}.imp-upnext__duration{position:absolute;right:6px;bottom:6px;padding:1px 6px;border-radius:3px;background:#000c;font-size:12px;font-variant-numeric:tabular-nums}.imp-upnext__thumb-play{position:absolute;top:50%;left:50%;width:48px;height:48px;transform:translate(-50%,-50%);padding:12px;border-radius:50%;background:#0000008c;transition:background var(--imp-transition)}.imp-upnext__thumb:hover .imp-upnext__thumb-play{background:var(--imp-accent)}.imp-upnext__title{margin-top:10px;font-size:15px;font-weight:600;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-upnext__meta{margin-top:4px;font-size:12px;opacity:.7}.imp-upnext__btn{margin-top:14px;padding:9px 20px;border:0;border-radius:8px;background:var(--imp-accent);color:#fff;font:inherit;font-weight:700;cursor:pointer;transition:opacity var(--imp-transition)}.imp-upnext__btn:hover{opacity:.92}.imp-layer__bottom{grid-area:bottom;display:flex;flex-direction:column;background:linear-gradient(transparent,#000000b3);padding:24px 12px 8px;opacity:1;transition:opacity var(--imp-transition)}.imp-player--idle .imp-layer__bottom{opacity:0;pointer-events:none}.imp-player--idle{cursor:none}.imp-btn{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:6px;border:0;border-radius:6px;background:transparent;color:inherit;cursor:pointer;transition:background var(--imp-transition),transform var(--imp-transition)}.imp-btn svg{width:100%;height:100%}.imp-btn:hover:not(:disabled){background:#ffffff26}.imp-btn:focus-visible{outline:2px solid var(--imp-accent);outline-offset:1px}.imp-btn:disabled{opacity:.35;cursor:default}.imp-btn--active{color:var(--imp-accent)}.imp-btn--like.imp-btn--active{color:var(--imp-like, forestgreen)}.imp-btn--dislike.imp-btn--active{color:var(--imp-dislike, #e53935)}.imp-action{position:relative;display:inline-flex}.imp-count-tooltip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%) scale(.9);padding:3px 7px;border-radius:5px;background:var(--imp-control-bg);color:var(--imp-text);font-size:12px;font-variant-numeric:tabular-nums;line-height:1.2;white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;transition:opacity var(--imp-transition),transform var(--imp-transition);z-index:5}.imp-action:hover .imp-count-tooltip:not([hidden]){opacity:1;visibility:visible;transform:translate(-50%) scale(1)}.imp-controls{display:flex;flex-direction:column;gap:4px}.imp-controls__row{display:flex;align-items:center;gap:4px;min-height:var(--imp-controls-height)}.imp-controls__group{display:flex;align-items:center;gap:2px;flex:0 0 auto}.imp-controls__row .imp-btn,.imp-controls__menu-anchor,.imp-action,.imp-volume,.imp-controls__time,.imp-controls__live{flex:0 0 auto}.imp-controls__spacer{flex:1;display:flex;align-items:center;justify-content:center;min-width:0}.imp-controls__chapter{font-size:12px;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.imp-controls__time{font-variant-numeric:tabular-nums;font-size:13px;margin:0 6px;white-space:nowrap}.imp-controls__live{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;letter-spacing:.5px;margin:0 6px}.imp-controls__live:before{content:"";width:8px;height:8px;border-radius:50%;background:var(--imp-accent)}.imp-controls__menu-anchor{position:relative;display:flex}.imp-volume{display:flex;align-items:center}.imp-volume__slider{pointer-events:auto;appearance:none;-webkit-appearance:none;width:0;opacity:0;height:4px;border-radius:2px;background:linear-gradient(to right,var(--imp-text) var(--imp-volume-fill, 100%),var(--imp-track) var(--imp-volume-fill, 100%));cursor:pointer;transition:width var(--imp-transition),opacity var(--imp-transition)}.imp-volume:hover .imp-volume__slider,.imp-volume__slider:focus-visible{width:64px;opacity:1;margin-right:6px}.imp-volume__slider::-webkit-slider-thumb{-webkit-appearance:none;width:12px;height:12px;border-radius:50%;background:var(--imp-text);border:0}.imp-volume__slider::-moz-range-thumb{width:12px;height:12px;border-radius:50%;background:var(--imp-text);border:0}.imp-progress{pointer-events:auto;position:relative;height:16px;display:flex;align-items:center;cursor:pointer;touch-action:none}.imp-progress--live{visibility:hidden}.imp-progress__heatmap{position:absolute;left:0;right:0;bottom:10px;height:36px;pointer-events:none;opacity:0;transition:opacity var(--imp-transition)}.imp-progress:hover .imp-progress__heatmap,.imp-progress--scrubbing .imp-progress__heatmap{opacity:1}.imp-progress__heatmap svg{width:100%;height:100%;display:block}.imp-progress__heatmap path{fill:#ffffff59}.imp-progress__buffered{position:absolute;left:0;height:4px;width:0;border-radius:2px;background:var(--imp-track-buffered);transition:height var(--imp-transition)}.imp-progress__track{position:relative;display:flex;gap:2px;width:100%;height:4px;transition:height var(--imp-transition)}.imp-progress:hover .imp-progress__track,.imp-progress--scrubbing .imp-progress__track,.imp-progress:hover .imp-progress__buffered,.imp-progress--scrubbing .imp-progress__buffered{height:6px}.imp-progress__segment{position:relative;flex-basis:0;height:100%;background:var(--imp-track);border-radius:2px;overflow:hidden}.imp-progress__fill{width:100%;height:100%;background:var(--imp-accent);transform:scaleX(0);transform-origin:left}.imp-progress__handle{position:absolute;width:12px;height:12px;border-radius:50%;background:var(--imp-accent);transform:translate(-50%) scale(0);transition:transform var(--imp-transition);pointer-events:none}.imp-progress:hover .imp-progress__handle,.imp-progress--scrubbing .imp-progress__handle{transform:translate(-50%) scale(1)}.imp-progress__tooltip{position:absolute;bottom:22px;transform:translate(-50%);display:flex;flex-direction:column;align-items:center;gap:4px;padding:4px;border-radius:6px;background:var(--imp-control-bg);opacity:0;visibility:hidden;transition:opacity var(--imp-transition);pointer-events:none;white-space:nowrap}.imp-progress__tooltip--visible{opacity:1;visibility:visible}.imp-progress__thumb{border-radius:4px;background-color:#111;background-repeat:no-repeat}.imp-progress__tooltip-chapter{font-size:12px;font-weight:600;max-width:220px;overflow:hidden;text-overflow:ellipsis}.imp-progress__tooltip-time{font-size:11px;font-variant-numeric:tabular-nums;opacity:.85}.imp-menu{pointer-events:auto;position:absolute;right:0;bottom:44px;min-width:160px;max-height:280px;overflow-y:auto;background:var(--imp-control-bg);border-radius:var(--imp-radius);padding:6px;backdrop-filter:blur(8px);z-index:5}.imp-menu__backdrop{display:none}.imp-menu--wide{min-width:240px}.imp-menu__section+.imp-menu__section{margin-top:6px;border-top:1px solid rgba(255,255,255,.12);padding-top:6px}.imp-menu__title{font-size:11px;text-transform:uppercase;letter-spacing:.6px;opacity:.6;padding:4px 8px}.imp-menu__item{display:flex;align-items:center;gap:8px;width:100%;text-align:left;border:0;background:transparent;color:inherit;font:inherit;padding:7px 10px;border-radius:5px;cursor:pointer}.imp-menu__icon{display:inline-flex;width:18px;height:18px;flex-shrink:0}.imp-menu__icon svg,.imp-menu__icon img{width:100%;height:100%;object-fit:contain}.imp-menu__label{white-space:nowrap}.imp-menu__item:hover{background:#ffffff1f}.imp-menu__item--active{color:var(--imp-accent);font-weight:600}.imp-menu__row .imp-menu__value{margin-left:auto;opacity:.7;white-space:nowrap}.imp-menu__chevron{display:inline-flex;width:16px;height:16px;flex-shrink:0;opacity:.7}.imp-menu__row .imp-menu__chevron{margin-left:4px}.imp-menu__chevron svg{width:100%;height:100%}.imp-menu__back{font-weight:600;border-bottom:1px solid rgba(255,255,255,.12);border-radius:5px 5px 0 0;margin-bottom:4px}.imp-menu__back .imp-menu__chevron{width:18px;height:18px;opacity:.9}.imp-poster{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--imp-bg)}.imp-poster__image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.imp-poster__play{position:relative;width:72px;height:72px;border-radius:50%;background:var(--imp-accent);padding:16px}.imp-poster__play:hover:not(:disabled){background:var(--imp-accent);transform:scale(1.08)}.imp-player--play-inverted .imp-poster__play,.imp-player--play-inverted .imp-center-btn--play{background:#ffffffd9;color:var(--imp-accent)}.imp-player--play-inverted .imp-poster__play:hover:not(:disabled),.imp-player--play-inverted .imp-center-btn--play:hover:not(:disabled){background:#fffffff2}.imp-error{pointer-events:auto;max-width:80%;padding:10px 16px;border-radius:8px;background:#000000bf;border:1px solid rgba(255,255,255,.2);font-size:13px;text-align:center}.imp-spinner{position:absolute;inset:0;margin:auto;width:48px;height:48px;border:4px solid rgba(255,255,255,.25);border-top-color:var(--imp-text);border-radius:50%;animation:imp-spin .8s linear infinite}@keyframes imp-spin{to{transform:rotate(360deg)}}.imp-pause-screen{grid-area:top;pointer-events:auto;padding:20px 24px;background:linear-gradient(rgba(0,0,0,.7),transparent);animation:imp-fade-in .22s ease}.imp-pause-screen--custom{grid-area:1 / 1 / -1 / -1;display:flex;align-items:center;justify-content:center;padding:16px;background:#0009;z-index:4}.imp-pause-screen__custom{pointer-events:auto;max-width:100%;max-height:100%;overflow:auto}.imp-pause-screen__default{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.imp-pause-screen__heading{flex:1;min-width:0}.imp-channel{display:flex;align-items:center;gap:10px;border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;flex-shrink:0}.imp-channel--link{cursor:pointer}.imp-channel--link:hover .imp-channel__name{text-decoration:underline}.imp-channel__avatar{width:44px;height:44px;border-radius:50%;background:linear-gradient(135deg,var(--imp-accent),#7b1fa2);background-size:cover;background-position:center}.imp-channel__avatar--rounded{border-radius:10px}.imp-channel__avatar--square{border-radius:0}.imp-channel__avatar--circle{border-radius:50%}.imp-channel__avatar{background-size:cover;background-position:center;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;flex-shrink:0}.imp-channel__name{font-size:14px;font-weight:600;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right}.imp-pause-screen__title{font-size:20px;font-weight:700}.imp-pause-screen__description{margin-top:6px;font-size:14px;opacity:.85;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-sponsor{display:inline-flex;align-items:center;gap:7px;margin:0 0 10px -8px;padding:5px 11px 5px 8px;border-radius:6px;max-width:100%;background:#00000073;border:1px solid rgba(255,255,255,.25);color:var(--imp-text);font-size:13px;font-weight:600;text-decoration:none;pointer-events:auto;transition:border-color var(--imp-transition),background var(--imp-transition)}.imp-sponsor:hover{border-color:var(--imp-accent);background:#0009}.imp-sponsor__label{flex-shrink:0;padding:2px 7px;border-radius:3px;background:#facc15;color:#000;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px}.imp-sponsor__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:underline}.imp-btn--scene-types{width:auto;gap:6px;padding:0 10px}.imp-scene-type__icon{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0}.imp-scene-type__icon svg,.imp-scene-type__icon img{width:100%;height:100%}.imp-scene-type__label{font-size:13px;font-weight:600;white-space:nowrap}@keyframes imp-fade-in{0%{opacity:0}}.imp-related{grid-area:middle;pointer-events:auto;align-self:stretch;display:flex;flex-direction:column;justify-content:center;gap:12px;padding:24px;background:#000c;animation:imp-fade-in .22s ease;z-index:2}.imp-related__close{align-self:flex-end}.imp-related__title{font-size:16px;font-weight:700}.imp-related__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;overflow-y:auto}.imp-related__card{display:flex;flex-direction:column;gap:6px;border:0;padding:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.imp-related__thumb{position:relative;aspect-ratio:16 / 9;border-radius:6px;background-color:#222;background-size:cover;background-position:center;transition:transform var(--imp-transition)}.imp-related__card:hover .imp-related__thumb{transform:scale(1.04)}.imp-related__duration{position:absolute;right:6px;bottom:6px;padding:1px 5px;border-radius:4px;background:#000c;font-size:11px;font-variant-numeric:tabular-nums}.imp-related__card-title{font-size:13px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-playlist{position:absolute;display:flex;flex-direction:column;background:var(--imp-control-bg);backdrop-filter:blur(8px);z-index:6;--imp-thumb-w: 88}.imp-playlist--sidebar{top:0;right:0;bottom:0;width:min(320px,80%);animation:imp-slide-in .2s ease}.imp-playlist--bottom{left:0;right:0;bottom:0;max-height:46%;animation:imp-slide-up .2s ease;--imp-thumb-w: 128}.imp-playlist--bottom .imp-playlist__list{flex-direction:row;overflow-x:auto;overflow-y:hidden;padding:0 12px 12px}.imp-playlist--bottom .imp-playlist__item{flex-direction:column;align-items:stretch;flex:0 0 calc(var(--imp-thumb-w) * 1px + 12px)}.imp-playlist--bottom .imp-playlist__thumb{flex:0 0 auto;width:calc(var(--imp-thumb-w) * 1px)}@keyframes imp-slide-up{0%{transform:translateY(100%)}}.imp-playlist__tools{display:flex;align-items:center;gap:2px}.imp-playlist__heading{min-width:0}.imp-playlist__kicker{font-size:11px;font-weight:400;text-transform:uppercase;letter-spacing:.6px;opacity:.6}.imp-playlist__name{font-size:15px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@keyframes imp-slide-in{0%{transform:translate(100%)}}.imp-playlist__header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;font-weight:700}.imp-playlist__list{overflow-y:auto;display:flex;flex-direction:column;padding:0 8px 8px;gap:4px}.imp-playlist__item{display:flex;gap:10px;align-items:center;padding:6px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.imp-playlist__item:hover{background:#ffffff1a}.imp-playlist__item--active{background:#ffffff24;box-shadow:inset 2px 0 0 var(--imp-accent)}.imp-playlist__thumb{flex:0 0 calc(var(--imp-thumb-w) * 1px);aspect-ratio:16 / 9;border-radius:4px;background-color:#222;background-size:cover;background-position:center;overflow:hidden}.imp-scenes__sprite{background-repeat:no-repeat;transform:scale(calc(var(--imp-thumb-w) / var(--imp-sprite-w, 160)));transform-origin:top left}.imp-playlist__title{font-size:13px;font-weight:600;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.imp-playlist__duration{font-size:12px;opacity:.7;font-variant-numeric:tabular-nums}.imp-ad{position:absolute;inset:0;display:grid;grid-template-rows:auto 1fr auto;background:var(--imp-bg);z-index:10}.imp-ad__video{grid-row:1 / -1;grid-column:1;width:100%;height:100%;object-fit:contain;cursor:pointer;position:relative;z-index:0}.imp-ad__spinner{grid-row:2;grid-column:1;justify-self:center;align-self:center;pointer-events:none;position:relative;z-index:2}.imp-ad__hud{grid-row:1;grid-column:1;position:relative;z-index:2;display:flex;align-items:center;gap:10px;padding:12px 14px;pointer-events:none}.imp-ad__badge{padding:3px 8px;border-radius:4px;background:#000000b3;border:1px solid rgba(255,255,255,.4);font-size:12px;font-weight:700}.imp-ad__countdown{font-size:12px;font-variant-numeric:tabular-nums;text-shadow:0 1px 2px rgba(0,0,0,.8)}.imp-ad__actions{grid-row:3;grid-column:1;position:relative;z-index:2;display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:14px}.imp-ad__skip,.imp-ad__visit{border:1px solid rgba(255,255,255,.5);background:#000000bf;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:6px;cursor:pointer;touch-action:manipulation}.imp-ad__skip:disabled{opacity:.7;cursor:default}.imp-ad__skip:hover:not(:disabled),.imp-ad__visit:hover{background:#fff3}.imp-ad--paused:after{content:"▶";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:48px;background:#0006;pointer-events:none;z-index:3}@media(max-width:767px){.imp-center-btn--play{width:56px;height:56px;padding:14px;margin:0 8px}.imp-btn{width:28px;height:28px;padding:5px}.imp-controls__row{gap:0;min-height:38px}.imp-controls__group{gap:0}.imp-layer__bottom{padding:12px 6px 5px}.imp-controls__chapter{display:none}.imp-btn--seek-back,.imp-btn--seek-forward{width:26px;height:26px;padding:5px;opacity:.75}.imp-progress{height:12px}.imp-controls__time,.imp-controls__live{font-size:10px;margin:0 3px}.imp-poster__play{width:48px;height:48px;padding:11px}.imp-spinner{width:36px;height:36px;border-width:3px}.imp-pause-screen{padding:8px 10px}.imp-pause-screen__default{align-items:flex-start;gap:8px}.imp-pause-screen__title{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:0}.imp-pause-screen__description{display:none}.imp-channel{align-self:flex-start}.imp-channel__name{display:none}.imp-channel__avatar{width:32px;height:32px}.imp-sponsor{margin-top:6px;padding:4px 8px;font-size:11px;gap:5px}.imp-sponsor__label{font-size:9px}.imp-ad__hud{padding:8px 10px;gap:6px}.imp-ad__badge{font-size:10px;padding:2px 6px}.imp-ad__countdown{font-size:11px}.imp-ad__actions{padding:8px;gap:6px}.imp-ad__skip,.imp-ad__visit{padding:6px 10px;font-size:12px}.imp-ad--paused:after{font-size:36px}.imp-controls__menu-anchor{position:static}.imp-menu{position:absolute;inset:auto 0 0;box-sizing:border-box;min-width:0;max-width:none;max-height:80%;overflow-y:auto;border-radius:var(--imp-radius) var(--imp-radius) 0 0;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));box-shadow:0 -8px 24px #00000080;animation:imp-slide-up .18s ease;z-index:6}.imp-menu__backdrop{display:block;position:absolute;inset:0;background:#00000080;pointer-events:auto;z-index:5;animation:imp-fade-in .18s ease}.imp-menu__item{padding:10px}.imp-playlist{inset:0;width:auto;max-height:none;border-radius:0;animation:imp-fade-in .18s ease}.imp-playlist--bottom .imp-playlist__list,.imp-playlist__list{flex-direction:column;overflow-x:hidden;overflow-y:auto}.imp-playlist--bottom .imp-playlist__item{flex-direction:row;align-items:center;flex:0 0 auto}.imp-playlist--bottom .imp-playlist__thumb,.imp-playlist__thumb{flex:0 0 120px;width:120px}}
|
package/dist/types.d.ts
CHANGED
|
@@ -22,6 +22,21 @@ export interface Chapter {
|
|
|
22
22
|
/** Chapter title shown in the seek tooltip and the chapter label. */
|
|
23
23
|
title: string;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* A named breakdown of the video into scenes of one type (actors, locations,
|
|
27
|
+
* actions, …). Several groups can be attached to a source; the scene-type
|
|
28
|
+
* control switches the active one, rebuilding the timeline + scenes panel.
|
|
29
|
+
*/
|
|
30
|
+
export interface SceneGroup {
|
|
31
|
+
/** Stable id, e.g. `"actions"` / `"locations"`. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** Label shown on the scene-type control and in its dropdown. */
|
|
34
|
+
title: string;
|
|
35
|
+
/** Icon for the control/dropdown: raw `<svg>` markup or an image URL. */
|
|
36
|
+
icon?: string;
|
|
37
|
+
/** Scenes (chapters) for this type. */
|
|
38
|
+
scenes: Chapter[];
|
|
39
|
+
}
|
|
25
40
|
/** An alternative quality rendition for progressive (non-HLS) sources. */
|
|
26
41
|
export interface QualityLevel {
|
|
27
42
|
/** Stream / file URL for this rendition. */
|
|
@@ -96,6 +111,13 @@ export interface VideoSource {
|
|
|
96
111
|
sponsor?: SponsorLink;
|
|
97
112
|
/** Chapters as an array, or a URL of a WebVTT chapters file. */
|
|
98
113
|
chapters?: Chapter[] | string;
|
|
114
|
+
/**
|
|
115
|
+
* Typed scene breakdowns (actors / locations / actions / …). When set, the
|
|
116
|
+
* scene-type control lets the viewer switch between them, and the active
|
|
117
|
+
* group's `scenes` drive the timeline segments + scenes panel (taking
|
|
118
|
+
* precedence over `chapters`).
|
|
119
|
+
*/
|
|
120
|
+
sceneGroups?: SceneGroup[];
|
|
99
121
|
/** Alternative renditions for progressive sources. Ignored for HLS (levels come from the manifest). */
|
|
100
122
|
qualities?: QualityLevel[];
|
|
101
123
|
/**
|
|
@@ -214,6 +236,13 @@ export interface ActionsOptions {
|
|
|
214
236
|
* - `false`: off. `true` is an alias for `"gear"`.
|
|
215
237
|
*/
|
|
216
238
|
export type SettingPlacement = boolean | 'gear' | 'bar';
|
|
239
|
+
/** Formats the seek-button caption. `seconds` is the step; `direction` the arrow. */
|
|
240
|
+
export type SeekLabelFormat = (seconds: number, direction: 'back' | 'forward') => string;
|
|
241
|
+
/**
|
|
242
|
+
* Stable keys of the right-cluster controls (for `controls.order`). Custom
|
|
243
|
+
* action buttons placed in the bar are addressed as `` `custom:${id}` ``.
|
|
244
|
+
*/
|
|
245
|
+
export type ControlBarItem = 'like' | 'dislike' | 'speed' | 'quality' | 'subtitles' | 'gear' | 'scenes' | 'sceneTypes' | 'playlist' | 'pip' | 'fullscreen' | `custom:${string}`;
|
|
217
246
|
/** What the "next video" hover preview shows. `true`/`false` toggle all of it. */
|
|
218
247
|
export interface NextPreviewOptions {
|
|
219
248
|
/** Thumbnail (next source's `poster`). Default true. */
|
|
@@ -240,14 +269,21 @@ export interface ControlsOptions {
|
|
|
240
269
|
quality?: SettingPlacement;
|
|
241
270
|
/** Scene list button — appears when the source has chapters. Default true. */
|
|
242
271
|
scenes?: boolean;
|
|
272
|
+
/** Scene-type selector (dropdown) — appears when the source has `sceneGroups`. Default true. */
|
|
273
|
+
sceneTypes?: boolean;
|
|
243
274
|
/** Popularity heatmap above the progress bar (needs `source.heatmap` data). Default true. */
|
|
244
275
|
heatmap?: boolean;
|
|
245
276
|
/** Subtitles. Default `"gear"` (inside the settings dropdown). */
|
|
246
277
|
subtitles?: SettingPlacement;
|
|
247
|
-
/**
|
|
278
|
+
/**
|
|
279
|
+
* Skip-back / skip-forward buttons. Pass an object to change the step (seconds)
|
|
280
|
+
* and/or the caption format. `label` is a formatter — the most flexible option
|
|
281
|
+
* (a regex matches, it doesn't format); default → `"−15s"` / `"+15s"`.
|
|
282
|
+
*/
|
|
248
283
|
seekButtons?: boolean | {
|
|
249
284
|
back?: number;
|
|
250
285
|
forward?: number;
|
|
286
|
+
label?: SeekLabelFormat;
|
|
251
287
|
};
|
|
252
288
|
/**
|
|
253
289
|
* Where the prev/seek/play/next cluster lives:
|
|
@@ -256,6 +292,12 @@ export interface ControlsOptions {
|
|
|
256
292
|
* over the video on mobile). This is the pre-0.3 desktop behaviour.
|
|
257
293
|
*/
|
|
258
294
|
seekPlacement?: 'overlay' | 'bar';
|
|
295
|
+
/**
|
|
296
|
+
* Left-to-right order of the right-cluster controls (gear, pip, playlist, …).
|
|
297
|
+
* Omit / empty → built-in order. Listed keys go first (in this order); any not
|
|
298
|
+
* listed keep their default position after them. The ⋯ menu stays last.
|
|
299
|
+
*/
|
|
300
|
+
order?: ControlBarItem[];
|
|
259
301
|
/** Previous / next / list buttons (only rendered when a playlist is present). */
|
|
260
302
|
playlist?: boolean;
|
|
261
303
|
/**
|
|
@@ -319,6 +361,12 @@ export interface PlayerLabels {
|
|
|
319
361
|
previous: string;
|
|
320
362
|
playlist: string;
|
|
321
363
|
scenes: string;
|
|
364
|
+
/** Header of the scene-type selector dropdown. */
|
|
365
|
+
sceneTypes: string;
|
|
366
|
+
/** Autoplay toggle in the settings dropdown. */
|
|
367
|
+
autoplay: string;
|
|
368
|
+
/** "Play next" button on the up-next end overlay. */
|
|
369
|
+
playNext: string;
|
|
322
370
|
shuffle: string;
|
|
323
371
|
repeat: string;
|
|
324
372
|
like: string;
|
|
@@ -329,6 +377,8 @@ export interface PlayerLabels {
|
|
|
329
377
|
more: string;
|
|
330
378
|
seekForward: string;
|
|
331
379
|
seekBack: string;
|
|
380
|
+
/** Short unit appended to the seek-step caption, e.g. the "s" in "+15s". */
|
|
381
|
+
secondsShort: string;
|
|
332
382
|
live: string;
|
|
333
383
|
related: string;
|
|
334
384
|
adLabel: string;
|
|
@@ -463,6 +513,10 @@ export interface PlayerEventMap {
|
|
|
463
513
|
chapterchange: {
|
|
464
514
|
chapter: Chapter | null;
|
|
465
515
|
};
|
|
516
|
+
/** Fired when the active scene type (group) changes. */
|
|
517
|
+
scenetypechange: {
|
|
518
|
+
group: SceneGroup | null;
|
|
519
|
+
};
|
|
466
520
|
fullscreenchange: {
|
|
467
521
|
active: boolean;
|
|
468
522
|
};
|
package/dist/ui/controls.d.ts
CHANGED
|
@@ -18,6 +18,9 @@ export declare class Controls {
|
|
|
18
18
|
private fullscreenBtn;
|
|
19
19
|
private row;
|
|
20
20
|
private rightGroup;
|
|
21
|
+
private seekLabelFn?;
|
|
22
|
+
/** Right-cluster controls keyed for ordering; appended in `controls.order`. */
|
|
23
|
+
private rightItems;
|
|
21
24
|
private subtitlesBtn;
|
|
22
25
|
private settingsBtn;
|
|
23
26
|
private settingsMenu;
|
|
@@ -35,6 +38,8 @@ export declare class Controls {
|
|
|
35
38
|
private nextPreviewEl;
|
|
36
39
|
private nextPreviewOpts;
|
|
37
40
|
private scenesBtn;
|
|
41
|
+
private sceneTypeBtn;
|
|
42
|
+
private sceneTypeMenu;
|
|
38
43
|
private likeBtn;
|
|
39
44
|
private dislikeBtn;
|
|
40
45
|
private likeCountEl;
|
|
@@ -59,14 +64,24 @@ export declare class Controls {
|
|
|
59
64
|
constructor(player: Player);
|
|
60
65
|
private onWindowResize;
|
|
61
66
|
private registerCollapsible;
|
|
67
|
+
/**
|
|
68
|
+
* Append the right-cluster controls. Built-in order = creation order; if
|
|
69
|
+
* `controls.order` is set, its keys go first (in that order), then any
|
|
70
|
+
* unlisted controls keep their default position. (⋯ is appended separately.)
|
|
71
|
+
*/
|
|
72
|
+
private layoutRightCluster;
|
|
62
73
|
/** Center-cluster button — deliberately NOT `.imp-btn` (own sizing/look). */
|
|
63
74
|
private makeCenterButton;
|
|
64
|
-
/**
|
|
75
|
+
/** Caption under the seek arrow. Default "−15s"/"+15s"; overridable via `controls.seekButtons.label`. */
|
|
65
76
|
private addStepBadge;
|
|
66
77
|
/** Sections for the gear when overflowed into ⋯ (expanded, no drill-down). */
|
|
67
78
|
private gearSections;
|
|
68
79
|
/** Gear drill-down rows: one per setting, each showing its current value. */
|
|
69
80
|
private gearEntries;
|
|
81
|
+
/** Update the scene-type button to the active group's icon + title. */
|
|
82
|
+
private refreshSceneTypeButton;
|
|
83
|
+
private sceneTypeSection;
|
|
84
|
+
private toggleSceneTypeMenu;
|
|
70
85
|
private toggleGearMenu;
|
|
71
86
|
private setupNextPreview;
|
|
72
87
|
private bindNextPreview;
|
package/dist/ui/menu.d.ts
CHANGED
|
@@ -10,14 +10,22 @@ export interface MenuSection {
|
|
|
10
10
|
items: MenuItem[];
|
|
11
11
|
onSelect(value: string): void;
|
|
12
12
|
}
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* One row in the settings (gear) drill-down. Either a drill row (label + current
|
|
15
|
+
* value → options) or a toggle row (label + on/off switch).
|
|
16
|
+
*/
|
|
14
17
|
export interface SettingEntry {
|
|
15
18
|
key: string;
|
|
16
19
|
label: string;
|
|
17
|
-
/** Current value shown on
|
|
18
|
-
value
|
|
19
|
-
/** The options panel to drill into when
|
|
20
|
-
section(): MenuSection;
|
|
20
|
+
/** Current value shown on a drill row, e.g. "Auto", "1×", "Off". */
|
|
21
|
+
value?: string;
|
|
22
|
+
/** The options panel to drill into when a drill row is clicked. */
|
|
23
|
+
section?(): MenuSection;
|
|
24
|
+
/** Present → render a toggle switch instead of a drill row. */
|
|
25
|
+
toggle?: {
|
|
26
|
+
value: boolean;
|
|
27
|
+
onChange(next: boolean): void;
|
|
28
|
+
};
|
|
21
29
|
}
|
|
22
30
|
/**
|
|
23
31
|
* Popup menu anchored above a control button. One instance per button;
|
|
@@ -37,6 +45,8 @@ export declare class Menu {
|
|
|
37
45
|
toggleSettings(title: string, entries: SettingEntry[]): void;
|
|
38
46
|
showSettings(_title: string, entries: SettingEntry[]): void;
|
|
39
47
|
private renderSettingsRoot;
|
|
48
|
+
/** Toggle row: label + an on/off switch. Stays in the menu (no close). */
|
|
49
|
+
private buildToggleRow;
|
|
40
50
|
private renderSettingsDetail;
|
|
41
51
|
/** Build one option block (radio items) from a section. */
|
|
42
52
|
private renderSection;
|
package/dist/ui/overlays.d.ts
CHANGED
|
@@ -61,3 +61,15 @@ export declare class RelatedOverlay {
|
|
|
61
61
|
show(): void;
|
|
62
62
|
hide(): void;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* End-of-video "up next" overlay shown when autoplay is OFF and a next item
|
|
66
|
+
* exists: a preview card of the next video + a "Play next" button.
|
|
67
|
+
*/
|
|
68
|
+
export declare class UpNextOverlay {
|
|
69
|
+
private player;
|
|
70
|
+
readonly root: HTMLElement;
|
|
71
|
+
constructor(player: Player);
|
|
72
|
+
get visible(): boolean;
|
|
73
|
+
show(): void;
|
|
74
|
+
hide(): void;
|
|
75
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itube-modern-player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Lightweight, framework-agnostic HTML5 video player: HLS streams, playlists, chapters, VTT subtitles, sprite previews, VAST ads. Ships with a Vue 3 wrapper.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"labels-C3gAZEm-.js","sources":["../src/core/labels.ts"],"sourcesContent":["import type { PlayerLabels } from '../types'\n\nexport const defaultLabels: PlayerLabels = {\n play: 'Play',\n pause: 'Pause',\n replay: 'Replay',\n mute: 'Mute',\n unmute: 'Unmute',\n fullscreen: 'Fullscreen',\n exitFullscreen: 'Exit fullscreen',\n pip: 'Picture-in-picture',\n settings: 'Playback speed',\n scenes: 'Scenes',\n shuffle: 'Shuffle',\n repeat: 'Repeat',\n subtitles: 'Subtitles',\n subtitlesOff: 'Off',\n speed: 'Speed',\n quality: 'Quality',\n qualityAuto: 'Auto',\n next: 'Next',\n previous: 'Previous',\n playlist: 'Playlist',\n like: 'Like',\n dislike: 'Dislike',\n addTo: 'Save to…',\n share: 'Share',\n report: 'Report',\n more: 'More actions',\n seekForward: 'Seek forward',\n seekBack: 'Seek back',\n live: 'LIVE',\n related: 'More videos',\n adLabel: 'Ad',\n skipAd: 'Skip ad',\n skipAdIn: 'Skip in',\n visitAdvertiser: 'Visit advertiser',\n sponsored: 'Sponsored',\n}\n"],"names":["defaultLabels"],"mappings":"AAEO,MAAMA,IAA8B;AAAA,EACzC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,KAAK;AAAA,EACL,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AAAA,EACP,SAAS;AAAA,EACT,aAAa;AAAA,EACb,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,WAAW;AACb;"}
|
package/dist/labels-DTgTxMuq.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e={play:"Play",pause:"Pause",replay:"Replay",mute:"Mute",unmute:"Unmute",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",pip:"Picture-in-picture",settings:"Playback speed",scenes:"Scenes",shuffle:"Shuffle",repeat:"Repeat",subtitles:"Subtitles",subtitlesOff:"Off",speed:"Speed",quality:"Quality",qualityAuto:"Auto",next:"Next",previous:"Previous",playlist:"Playlist",like:"Like",dislike:"Dislike",addTo:"Save to…",share:"Share",report:"Report",more:"More actions",seekForward:"Seek forward",seekBack:"Seek back",live:"LIVE",related:"More videos",adLabel:"Ad",skipAd:"Skip ad",skipAdIn:"Skip in",visitAdvertiser:"Visit advertiser",sponsored:"Sponsored"};exports.defaultLabels=e;
|
|
2
|
-
//# sourceMappingURL=labels-DTgTxMuq.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"labels-DTgTxMuq.cjs","sources":["../src/core/labels.ts"],"sourcesContent":["import type { PlayerLabels } from '../types'\n\nexport const defaultLabels: PlayerLabels = {\n play: 'Play',\n pause: 'Pause',\n replay: 'Replay',\n mute: 'Mute',\n unmute: 'Unmute',\n fullscreen: 'Fullscreen',\n exitFullscreen: 'Exit fullscreen',\n pip: 'Picture-in-picture',\n settings: 'Playback speed',\n scenes: 'Scenes',\n shuffle: 'Shuffle',\n repeat: 'Repeat',\n subtitles: 'Subtitles',\n subtitlesOff: 'Off',\n speed: 'Speed',\n quality: 'Quality',\n qualityAuto: 'Auto',\n next: 'Next',\n previous: 'Previous',\n playlist: 'Playlist',\n like: 'Like',\n dislike: 'Dislike',\n addTo: 'Save to…',\n share: 'Share',\n report: 'Report',\n more: 'More actions',\n seekForward: 'Seek forward',\n seekBack: 'Seek back',\n live: 'LIVE',\n related: 'More videos',\n adLabel: 'Ad',\n skipAd: 'Skip ad',\n skipAdIn: 'Skip in',\n visitAdvertiser: 'Visit advertiser',\n sponsored: 'Sponsored',\n}\n"],"names":["defaultLabels"],"mappings":"aAEO,MAAMA,EAA8B,CACzC,KAAM,OACN,MAAO,QACP,OAAQ,SACR,KAAM,OACN,OAAQ,SACR,WAAY,aACZ,eAAgB,kBAChB,IAAK,qBACL,SAAU,iBACV,OAAQ,SACR,QAAS,UACT,OAAQ,SACR,UAAW,YACX,aAAc,MACd,MAAO,QACP,QAAS,UACT,YAAa,OACb,KAAM,OACN,SAAU,WACV,SAAU,WACV,KAAM,OACN,QAAS,UACT,MAAO,WACP,MAAO,QACP,OAAQ,SACR,KAAM,eACN,YAAa,eACb,SAAU,YACV,KAAM,OACN,QAAS,cACT,QAAS,KACT,OAAQ,UACR,SAAU,UACV,gBAAiB,mBACjB,UAAW,WACb"}
|