Bilibili-Evolved/registry/dist/components/video/player/control-background.js
2022-10-22 10:31:03 +08:00

9 lines
5.4 KiB
JavaScript

!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["video/player/control-background"]=e():o["video/player/control-background"]=e()}(self,(function(){return function(){var o,e,t={463:function(o,e,t){var n=t(355)((function(o){return o[1]}));n.push([o.id,'.bilibili-player-video-control-mask {\n background: transparent !important;\n}\n.bilibili-player-video-control .bilibili-player-video-control-bottom::before {\n content: "";\n position: absolute;\n bottom: 0;\n height: calc(100% - 5px);\n width: 100%;\n background-color: rgba(0, 0, 0, var(--video-control-opacity));\n z-index: -1;\n}\nbody.player-mode-webfullscreen .bilibili-player-video-control .bilibili-player-video-control-bottom::before, body.player-fullscreen-fix .bilibili-player-video-control .bilibili-player-video-control-bottom::before, body.player-full-win .bilibili-player-video-control .bilibili-player-video-control-bottom::before {\n height: calc(100% + 2px);\n}\n\n.bpx-player-control-mask {\n background: transparent !important;\n}\n.bpx-player-control-bottom::before {\n content: "";\n position: absolute;\n bottom: 0;\n height: calc(100% - 17px);\n width: 100%;\n background-color: rgba(0, 0, 0, var(--video-control-opacity));\n z-index: -1;\n}\nbody.player-mode-webfullscreen .bpx-player-control-bottom::before, body.player-fullscreen-fix .bpx-player-control-bottom::before, body.player-full-win .bpx-player-control-bottom::before {\n height: calc(100% - 11px);\n}\n.video-container-v1 .bpx-player-control-bottom::before {\n height: calc(100% - 5px);\n}\nbody.player-mode-webfullscreen .video-container-v1 .bpx-player-control-bottom::before, body.player-fullscreen-fix .video-container-v1 .bpx-player-control-bottom::before, body.player-full-win .video-container-v1 .bpx-player-control-bottom::before {\n height: calc(100% + 1px);\n}\n\nbody.video-control-progress-background .squirtle-progress-bar:not(.squirtle-progress-buffer):not(.squirtle-progress-timeline):not(.squirtle-progress-dot-container),\nbody.video-control-progress-background .bpx-player-progress-schedule {\n background-color: transparent !important;\n}\nbody.video-control-progress-background .bpx-player-progress,\nbody.video-control-progress-background .squirtle-progress-dot-container,\nbody.video-control-progress-background .bui-track-video-progress .bui-bar-wrap {\n background: rgba(0, 0, 0, var(--video-control-opacity)) !important;\n}',""]),o.exports=n},355:function(o){"use strict";
// eslint-disable-next-line func-names
o.exports=function(o){var e=[];return e.toString=function(){return this.map((function(e){var t=o(e);return e[2]?"@media ".concat(e[2]," {").concat(t,"}"):t})).join("")},
// eslint-disable-next-line func-names
e.i=function(o,t,n){"string"==typeof o&&(
// eslint-disable-next-line no-param-reassign
o=[[null,o,""]]);var r={};if(n)for(var i=0;i<this.length;i++){
// eslint-disable-next-line prefer-destructuring
var l=this[i][0];null!=l&&(r[l]=!0)}for(var a=0;a<o.length;a++){var c=[].concat(o[a]);n&&r[c[0]]||(t&&(c[2]?c[2]="".concat(t," and ").concat(c[2]):c[2]=t),e.push(c))}},e}},163:function(o,e,t){var n=t(463);n&&n.__esModule&&(n=n.default),o.exports="string"==typeof n?n:n.toString()},986:function(o){"use strict";o.exports=coreApis.settings}},n={};function r(o){var e=n[o];if(void 0!==e)return e.exports;var i=n[o]={id:o,exports:{}};return t[o](i,i.exports,r),i.exports}e=Object.getPrototypeOf?function(o){return Object.getPrototypeOf(o)}:function(o){return o.__proto__},r.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var i=Object.create(null);r.r(i);var l={};o=o||[null,e({}),e([]),e(e)];for(var a=2&n&&t;"object"==typeof a&&!~o.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach((function(o){l[o]=function(){return t[o]}}));return l.default=function(){return t},r.d(i,l),i},r.d=function(o,e){for(var t in e)r.o(e,t)&&!r.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},r.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},r.r=function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})};var i={};return function(){"use strict";r.d(i,{component:function(){return n}});var o=coreApis.componentApis.define,e=coreApis.utils.urls;const t=(0,o.defineOptionsMetadata)({opacity:{displayName:"不透明度(%)",defaultValue:64,slider:{}},includeProgress:{displayName:"包括进度条",defaultValue:!0}}),n=(0,o.defineComponentMetadata)({name:"playerControlBackground",displayName:"播放器控制栏背景色",tags:[componentsTags.video,componentsTags.style],description:{"zh-CN":"给视频播放器控制栏附上半透明的黑色, 代替原来的阴影."},entry:async o=>{let{metadata:e}=o;const{addComponentListener:t}=await Promise.resolve().then(r.t.bind(r,986,23));t(`${e.name}.includeProgress`,(o=>{document.body.classList.toggle("video-control-progress-background",o)}),!0),t(`${e.name}.opacity`,lodash.debounce((o=>{document.documentElement.style.setProperty("--video-control-opacity",(o/100).toString())}),200),!0)},instantStyles:[{name:"playerControlBackground",style:()=>Promise.resolve().then(r.t.bind(r,163,23))}],urlInclude:e.playerUrls,options:t,commitHash:"3c2cce86de3bf922598070b2086f5b04f5366888",coreVersion:"2.5.1"})}(),i=i.component}()}));