diff --git a/packages/artplayer-document/src/theme/SearchBar/lib/utils.js b/packages/artplayer-document/src/theme/SearchBar/lib/utils.js
index 5fe51b5ab..6d0573f30 100644
--- a/packages/artplayer-document/src/theme/SearchBar/lib/utils.js
+++ b/packages/artplayer-document/src/theme/SearchBar/lib/utils.js
@@ -1,271 +1,267 @@
/* eslint-disable */
-import $ from "autocomplete.js/zepto";
+import $ from 'autocomplete.js/zepto';
const utils = {
- /*
- * Move the content of an object key one level higher.
- * eg.
- * {
- * name: 'My name',
- * hierarchy: {
- * lvl0: 'Foo',
- * lvl1: 'Bar'
- * }
- * }
- * Will be converted to
- * {
- * name: 'My name',
- * lvl0: 'Foo',
- * lvl1: 'Bar'
- * }
- * @param {Object} object Main object
- * @param {String} property Main object key to move up
- * @return {Object}
- * @throws Error when key is not an attribute of Object or is not an object itself
- */
- mergeKeyWithParent(object, property) {
- if (object[property] === undefined) {
- return object;
- }
- if (typeof object[property] !== 'object') {
- return object;
- }
- const newObject = $.extend({}, object, object[property]);
- delete newObject[property];
- return newObject;
- },
- /*
- * Group all objects of a collection by the value of the specified attribute
- * If the attribute is a string, use the lowercase form.
- *
- * eg.
- * groupBy([
- * {name: 'Tim', category: 'dev'},
- * {name: 'Vincent', category: 'dev'},
- * {name: 'Ben', category: 'sales'},
- * {name: 'Jeremy', category: 'sales'},
- * {name: 'AlexS', category: 'dev'},
- * {name: 'AlexK', category: 'sales'}
- * ], 'category');
- * =>
- * {
- * 'devs': [
- * {name: 'Tim', category: 'dev'},
- * {name: 'Vincent', category: 'dev'},
- * {name: 'AlexS', category: 'dev'}
- * ],
- * 'sales': [
- * {name: 'Ben', category: 'sales'},
- * {name: 'Jeremy', category: 'sales'},
- * {name: 'AlexK', category: 'sales'}
- * ]
- * }
- * @param {array} collection Array of objects to group
- * @param {String} property The attribute on which apply the grouping
- * @return {array}
- * @throws Error when one of the element does not have the specified property
- */
- groupBy(collection, property) {
- const newCollection = {};
- $.each(collection, (index, item) => {
- if (item[property] === undefined) {
- throw new Error(`[groupBy]: Object has no key ${property}`);
- }
- let key = item[property];
- if (typeof key === 'string') {
- key = key.toLowerCase();
- }
- // fix #171 the given data type of docsearch hits might be conflict with the properties of the native Object,
- // such as the constructor, so we need to do this check.
- if (!Object.prototype.hasOwnProperty.call(newCollection, key)) {
- newCollection[key] = [];
- }
- newCollection[key].push(item);
- });
- return newCollection;
- },
- /*
- * Return an array of all the values of the specified object
- * eg.
- * values({
- * foo: 42,
- * bar: true,
- * baz: 'yep'
- * })
- * =>
- * [42, true, yep]
- * @param {object} object Object to extract values from
- * @return {array}
- */
- values(object) {
- return Object.keys(object).map(key => object[key]);
- },
- /*
- * Flattens an array
- * eg.
- * flatten([1, 2, [3, 4], [5, 6]])
- * =>
- * [1, 2, 3, 4, 5, 6]
- * @param {array} array Array to flatten
- * @return {array}
- */
- flatten(array) {
- const results = [];
- array.forEach(value => {
- if (!Array.isArray(value)) {
- results.push(value);
- return;
- }
- value.forEach(subvalue => {
- results.push(subvalue);
- });
- });
- return results;
- },
- /*
- * Flatten all values of an object into an array, marking each first element of
- * each group with a specific flag
- * eg.
- * flattenAndFlagFirst({
- * 'devs': [
- * {name: 'Tim', category: 'dev'},
- * {name: 'Vincent', category: 'dev'},
- * {name: 'AlexS', category: 'dev'}
- * ],
- * 'sales': [
- * {name: 'Ben', category: 'sales'},
- * {name: 'Jeremy', category: 'sales'},
- * {name: 'AlexK', category: 'sales'}
- * ]
- * , 'isTop');
- * =>
- * [
- * {name: 'Tim', category: 'dev', isTop: true},
- * {name: 'Vincent', category: 'dev', isTop: false},
- * {name: 'AlexS', category: 'dev', isTop: false},
- * {name: 'Ben', category: 'sales', isTop: true},
- * {name: 'Jeremy', category: 'sales', isTop: false},
- * {name: 'AlexK', category: 'sales', isTop: false}
- * ]
- * @param {object} object Object to flatten
- * @param {string} flag Flag to set to true on first element of each group
- * @return {array}
- */
- flattenAndFlagFirst(object, flag) {
- const values = this.values(object).map(collection =>
- collection.map((item, index) => {
- // eslint-disable-next-line no-param-reassign
- item[flag] = index === 0;
- return item;
- })
- );
- return this.flatten(values);
- },
- /*
- * Removes all empty strings, null, false and undefined elements array
- * eg.
- * compact([42, false, null, undefined, '', [], 'foo']);
- * =>
- * [42, [], 'foo']
- * @param {array} array Array to compact
- * @return {array}
- */
- compact(array) {
- const results = [];
- array.forEach(value => {
- if (!value) {
- return;
- }
- results.push(value);
- });
- return results;
- },
- /*
- * Returns the highlighted value of the specified key in the specified object.
- * If no highlighted value is available, will return the key value directly
- * eg.
- * getHighlightedValue({
- * _highlightResult: {
- * text: {
- * value: '
foo'
- * }
- * },
- * text: 'foo'
- * }, 'text');
- * =>
- * '
foo'
- * @param {object} object Hit object returned by the Algolia API
- * @param {string} property Object key to look for
- * @return {string}
- **/
- getHighlightedValue(object, property) {
- if (
- object._highlightResult &&
- object._highlightResult.hierarchy_camel &&
- object._highlightResult.hierarchy_camel[property] &&
- object._highlightResult.hierarchy_camel[property].matchLevel &&
- object._highlightResult.hierarchy_camel[property].matchLevel !== 'none' &&
- object._highlightResult.hierarchy_camel[property].value
- ) {
- return object._highlightResult.hierarchy_camel[property].value;
- }
- if (
- object._highlightResult &&
- object._highlightResult &&
- object._highlightResult[property] &&
- object._highlightResult[property].value
- ) {
- return object._highlightResult[property].value;
- }
- return object[property];
- },
- /*
- * Returns the snippeted value of the specified key in the specified object.
- * If no highlighted value is available, will return the key value directly.
- * Will add starting and ending ellipsis (…) if we detect that a sentence is
- * incomplete
- * eg.
- * getSnippetedValue({
- * _snippetResult: {
- * text: {
- * value: '
This is an unfinished sentence'
- * }
- * },
- * text: 'This is an unfinished sentence'
- * }, 'text');
- * =>
- * '
This is an unfinished sentence…'
- * @param {object} object Hit object returned by the Algolia API
- * @param {string} property Object key to look for
- * @return {string}
- **/
- getSnippetedValue(object, property) {
- if (
- !object._snippetResult ||
- !object._snippetResult[property] ||
- !object._snippetResult[property].value
- ) {
- return object[property];
- }
- let snippet = object._snippetResult[property].value;
+ /*
+ * Move the content of an object key one level higher.
+ * eg.
+ * {
+ * name: 'My name',
+ * hierarchy: {
+ * lvl0: 'Foo',
+ * lvl1: 'Bar'
+ * }
+ * }
+ * Will be converted to
+ * {
+ * name: 'My name',
+ * lvl0: 'Foo',
+ * lvl1: 'Bar'
+ * }
+ * @param {Object} object Main object
+ * @param {String} property Main object key to move up
+ * @return {Object}
+ * @throws Error when key is not an attribute of Object or is not an object itself
+ */
+ mergeKeyWithParent(object, property) {
+ if (object[property] === undefined) {
+ return object;
+ }
+ if (typeof object[property] !== 'object') {
+ return object;
+ }
+ const newObject = $.extend({}, object, object[property]);
+ delete newObject[property];
+ return newObject;
+ },
+ /*
+ * Group all objects of a collection by the value of the specified attribute
+ * If the attribute is a string, use the lowercase form.
+ *
+ * eg.
+ * groupBy([
+ * {name: 'Tim', category: 'dev'},
+ * {name: 'Vincent', category: 'dev'},
+ * {name: 'Ben', category: 'sales'},
+ * {name: 'Jeremy', category: 'sales'},
+ * {name: 'AlexS', category: 'dev'},
+ * {name: 'AlexK', category: 'sales'}
+ * ], 'category');
+ * =>
+ * {
+ * 'devs': [
+ * {name: 'Tim', category: 'dev'},
+ * {name: 'Vincent', category: 'dev'},
+ * {name: 'AlexS', category: 'dev'}
+ * ],
+ * 'sales': [
+ * {name: 'Ben', category: 'sales'},
+ * {name: 'Jeremy', category: 'sales'},
+ * {name: 'AlexK', category: 'sales'}
+ * ]
+ * }
+ * @param {array} collection Array of objects to group
+ * @param {String} property The attribute on which apply the grouping
+ * @return {array}
+ * @throws Error when one of the element does not have the specified property
+ */
+ groupBy(collection, property) {
+ const newCollection = {};
+ $.each(collection, (index, item) => {
+ if (item[property] === undefined) {
+ throw new Error(`[groupBy]: Object has no key ${property}`);
+ }
+ let key = item[property];
+ if (typeof key === 'string') {
+ key = key.toLowerCase();
+ }
+ // fix #171 the given data type of docsearch hits might be conflict with the properties of the native Object,
+ // such as the constructor, so we need to do this check.
+ if (!Object.prototype.hasOwnProperty.call(newCollection, key)) {
+ newCollection[key] = [];
+ }
+ newCollection[key].push(item);
+ });
+ return newCollection;
+ },
+ /*
+ * Return an array of all the values of the specified object
+ * eg.
+ * values({
+ * foo: 42,
+ * bar: true,
+ * baz: 'yep'
+ * })
+ * =>
+ * [42, true, yep]
+ * @param {object} object Object to extract values from
+ * @return {array}
+ */
+ values(object) {
+ return Object.keys(object).map((key) => object[key]);
+ },
+ /*
+ * Flattens an array
+ * eg.
+ * flatten([1, 2, [3, 4], [5, 6]])
+ * =>
+ * [1, 2, 3, 4, 5, 6]
+ * @param {array} array Array to flatten
+ * @return {array}
+ */
+ flatten(array) {
+ const results = [];
+ array.forEach((value) => {
+ if (!Array.isArray(value)) {
+ results.push(value);
+ return;
+ }
+ value.forEach((subvalue) => {
+ results.push(subvalue);
+ });
+ });
+ return results;
+ },
+ /*
+ * Flatten all values of an object into an array, marking each first element of
+ * each group with a specific flag
+ * eg.
+ * flattenAndFlagFirst({
+ * 'devs': [
+ * {name: 'Tim', category: 'dev'},
+ * {name: 'Vincent', category: 'dev'},
+ * {name: 'AlexS', category: 'dev'}
+ * ],
+ * 'sales': [
+ * {name: 'Ben', category: 'sales'},
+ * {name: 'Jeremy', category: 'sales'},
+ * {name: 'AlexK', category: 'sales'}
+ * ]
+ * , 'isTop');
+ * =>
+ * [
+ * {name: 'Tim', category: 'dev', isTop: true},
+ * {name: 'Vincent', category: 'dev', isTop: false},
+ * {name: 'AlexS', category: 'dev', isTop: false},
+ * {name: 'Ben', category: 'sales', isTop: true},
+ * {name: 'Jeremy', category: 'sales', isTop: false},
+ * {name: 'AlexK', category: 'sales', isTop: false}
+ * ]
+ * @param {object} object Object to flatten
+ * @param {string} flag Flag to set to true on first element of each group
+ * @return {array}
+ */
+ flattenAndFlagFirst(object, flag) {
+ const values = this.values(object).map((collection) =>
+ collection.map((item, index) => {
+ // eslint-disable-next-line no-param-reassign
+ item[flag] = index === 0;
+ return item;
+ }),
+ );
+ return this.flatten(values);
+ },
+ /*
+ * Removes all empty strings, null, false and undefined elements array
+ * eg.
+ * compact([42, false, null, undefined, '', [], 'foo']);
+ * =>
+ * [42, [], 'foo']
+ * @param {array} array Array to compact
+ * @return {array}
+ */
+ compact(array) {
+ const results = [];
+ array.forEach((value) => {
+ if (!value) {
+ return;
+ }
+ results.push(value);
+ });
+ return results;
+ },
+ /*
+ * Returns the highlighted value of the specified key in the specified object.
+ * If no highlighted value is available, will return the key value directly
+ * eg.
+ * getHighlightedValue({
+ * _highlightResult: {
+ * text: {
+ * value: '
foo'
+ * }
+ * },
+ * text: 'foo'
+ * }, 'text');
+ * =>
+ * '
foo'
+ * @param {object} object Hit object returned by the Algolia API
+ * @param {string} property Object key to look for
+ * @return {string}
+ **/
+ getHighlightedValue(object, property) {
+ if (
+ object._highlightResult &&
+ object._highlightResult.hierarchy_camel &&
+ object._highlightResult.hierarchy_camel[property] &&
+ object._highlightResult.hierarchy_camel[property].matchLevel &&
+ object._highlightResult.hierarchy_camel[property].matchLevel !== 'none' &&
+ object._highlightResult.hierarchy_camel[property].value
+ ) {
+ return object._highlightResult.hierarchy_camel[property].value;
+ }
+ if (
+ object._highlightResult &&
+ object._highlightResult &&
+ object._highlightResult[property] &&
+ object._highlightResult[property].value
+ ) {
+ return object._highlightResult[property].value;
+ }
+ return object[property];
+ },
+ /*
+ * Returns the snippeted value of the specified key in the specified object.
+ * If no highlighted value is available, will return the key value directly.
+ * Will add starting and ending ellipsis (…) if we detect that a sentence is
+ * incomplete
+ * eg.
+ * getSnippetedValue({
+ * _snippetResult: {
+ * text: {
+ * value: '
This is an unfinished sentence'
+ * }
+ * },
+ * text: 'This is an unfinished sentence'
+ * }, 'text');
+ * =>
+ * '
This is an unfinished sentence…'
+ * @param {object} object Hit object returned by the Algolia API
+ * @param {string} property Object key to look for
+ * @return {string}
+ **/
+ getSnippetedValue(object, property) {
+ if (!object._snippetResult || !object._snippetResult[property] || !object._snippetResult[property].value) {
+ return object[property];
+ }
+ let snippet = object._snippetResult[property].value;
- if (snippet[0] !== snippet[0].toUpperCase()) {
- snippet = `…${snippet}`;
- }
- if (['.', '!', '?'].indexOf(snippet[snippet.length - 1]) === -1) {
- snippet = `${snippet}…`;
- }
- return snippet;
- },
- /*
- * Deep clone an object.
- * Note: This will not clone functions and dates
- * @param {object} object Object to clone
- * @return {object}
- */
- deepClone(object) {
- return JSON.parse(JSON.stringify(object));
- },
+ if (snippet[0] !== snippet[0].toUpperCase()) {
+ snippet = `…${snippet}`;
+ }
+ if (['.', '!', '?'].indexOf(snippet[snippet.length - 1]) === -1) {
+ snippet = `${snippet}…`;
+ }
+ return snippet;
+ },
+ /*
+ * Deep clone an object.
+ * Note: This will not clone functions and dates
+ * @param {object} object Object to clone
+ * @return {object}
+ */
+ deepClone(object) {
+ return JSON.parse(JSON.stringify(object));
+ },
};
export default utils;
diff --git a/packages/artplayer-document/src/theme/SearchBar/styles.css b/packages/artplayer-document/src/theme/SearchBar/styles.css
index 047517ec0..e3b684a06 100644
--- a/packages/artplayer-document/src/theme/SearchBar/styles.css
+++ b/packages/artplayer-document/src/theme/SearchBar/styles.css
@@ -6,35 +6,35 @@
*/
.search-icon {
- background-image: var(--ifm-navbar-search-input-icon);
- height: auto;
- width: 24px;
- cursor: pointer;
- padding: 8px;
- line-height: 32px;
- background-repeat: no-repeat;
- background-position: center;
- display: none;
+ background-image: var(--ifm-navbar-search-input-icon);
+ height: auto;
+ width: 24px;
+ cursor: pointer;
+ padding: 8px;
+ line-height: 32px;
+ background-repeat: no-repeat;
+ background-position: center;
+ display: none;
}
.search-icon-hidden {
- visibility: hidden;
+ visibility: hidden;
}
@media (max-width: 360px) {
- .search-bar {
- width: 0 !important;
- background: none !important;
- padding: 0 !important;
- transition: none !important;
- }
+ .search-bar {
+ width: 0 !important;
+ background: none !important;
+ padding: 0 !important;
+ transition: none !important;
+ }
- .search-bar-expanded {
- width: 9rem !important;
- }
+ .search-bar-expanded {
+ width: 9rem !important;
+ }
- .search-icon {
- display: inline;
- vertical-align: sub;
- }
+ .search-icon {
+ display: inline;
+ vertical-align: sub;
+ }
}
diff --git a/packages/artplayer-plugin-ads/package.json b/packages/artplayer-plugin-ads/package.json
index 38f374bfb..db135aef2 100644
--- a/packages/artplayer-plugin-ads/package.json
+++ b/packages/artplayer-plugin-ads/package.json
@@ -1,24 +1,24 @@
{
- "license": "MIT",
- "version": "1.0.6",
- "name": "artplayer-plugin-ads",
- "types": "types/artplayer-plugin-ads.d.ts",
- "description": "Ads plugin for ArtPlayer",
- "main": "dist/artplayer-plugin-ads.js",
- "legacy": "dist/artplayer-plugin-ads.legacy.js",
- "author": "Harvey Zack
",
- "browserslist": "> 0.5%, last 2 versions, not dead",
- "homepage": "https://artplayer.org",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
- },
- "bugs": {
- "url": "https://github.com/zhw2590582/ArtPlayer/issues"
- },
- "keywords": [
- "html5",
- "video",
- "player"
- ]
-}
\ No newline at end of file
+ "license": "MIT",
+ "version": "1.0.6",
+ "name": "artplayer-plugin-ads",
+ "types": "types/artplayer-plugin-ads.d.ts",
+ "description": "Ads plugin for ArtPlayer",
+ "main": "dist/artplayer-plugin-ads.js",
+ "legacy": "dist/artplayer-plugin-ads.legacy.js",
+ "author": "Harvey Zack ",
+ "browserslist": "> 0.5%, last 2 versions, not dead",
+ "homepage": "https://artplayer.org",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/zhw2590582/ArtPlayer/issues"
+ },
+ "keywords": [
+ "html5",
+ "video",
+ "player"
+ ]
+}
diff --git a/packages/artplayer-plugin-ads/src/style.less b/packages/artplayer-plugin-ads/src/style.less
index c67c6a35c..d3dc8e481 100644
--- a/packages/artplayer-plugin-ads/src/style.less
+++ b/packages/artplayer-plugin-ads/src/style.less
@@ -77,4 +77,4 @@
width: 100%;
height: 100%;
}
-}
\ No newline at end of file
+}
diff --git a/packages/artplayer-plugin-ads/types/artplayer-plugin-ads.d.ts b/packages/artplayer-plugin-ads/types/artplayer-plugin-ads.d.ts
index 67786b1f5..07ca5d24a 100644
--- a/packages/artplayer-plugin-ads/types/artplayer-plugin-ads.d.ts
+++ b/packages/artplayer-plugin-ads/types/artplayer-plugin-ads.d.ts
@@ -32,7 +32,7 @@ type Option = {
/**
* 视频广告是否默认静音
*/
- muted?: boolean;
+ muted?: boolean;
};
type Ads = {
diff --git a/packages/artplayer-plugin-danmuku/package.json b/packages/artplayer-plugin-danmuku/package.json
index 1fc4cde6a..cc7b7d334 100644
--- a/packages/artplayer-plugin-danmuku/package.json
+++ b/packages/artplayer-plugin-danmuku/package.json
@@ -1,24 +1,24 @@
{
- "license": "MIT",
- "version": "4.4.11",
- "name": "artplayer-plugin-danmuku",
- "types": "types/artplayer-plugin-danmuku.d.ts",
- "description": "Danmuku plugin for ArtPlayer",
- "main": "dist/artplayer-plugin-danmuku.js",
- "legacy": "dist/artplayer-plugin-danmuku.legacy.js",
- "author": "Harvey Zack ",
- "browserslist": "> 0.5%, last 2 versions, not dead",
- "homepage": "https://artplayer.org",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
- },
- "bugs": {
- "url": "https://github.com/zhw2590582/ArtPlayer/issues"
- },
- "keywords": [
- "html5",
- "video",
- "player"
- ]
-}
\ No newline at end of file
+ "license": "MIT",
+ "version": "4.4.11",
+ "name": "artplayer-plugin-danmuku",
+ "types": "types/artplayer-plugin-danmuku.d.ts",
+ "description": "Danmuku plugin for ArtPlayer",
+ "main": "dist/artplayer-plugin-danmuku.js",
+ "legacy": "dist/artplayer-plugin-danmuku.legacy.js",
+ "author": "Harvey Zack ",
+ "browserslist": "> 0.5%, last 2 versions, not dead",
+ "homepage": "https://artplayer.org",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/zhw2590582/ArtPlayer/issues"
+ },
+ "keywords": [
+ "html5",
+ "video",
+ "player"
+ ]
+}
diff --git a/packages/artplayer-plugin-danmuku/src/style.less b/packages/artplayer-plugin-danmuku/src/style.less
index 0017a14d9..eb8da72e0 100644
--- a/packages/artplayer-plugin-danmuku/src/style.less
+++ b/packages/artplayer-plugin-danmuku/src/style.less
@@ -14,7 +14,9 @@
touch-action: manipulation;
-ms-high-contrast-adjust: none;
- *, *::before, *::after {
+ *,
+ *::before,
+ *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
@@ -50,7 +52,7 @@
width: 32px;
align-items: center;
justify-content: center;
-
+
.art-danmuku-style-panel {
display: none;
position: absolute;
@@ -59,24 +61,24 @@
bottom: 30px;
width: 200px;
padding-bottom: 10px;
-
+
.art-danmuku-style-panel-inner {
display: flex;
flex-direction: column;
padding: 10px 10px 0;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.9);
-
+
.art-danmuku-style-panel-title {
font-size: 13px;
margin-bottom: 10px;
}
-
+
.art-danmuku-style-panel-modes {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
-
+
.art-danmuku-style-panel-mode {
display: flex;
justify-content: center;
@@ -85,28 +87,28 @@
cursor: pointer;
color: #fff;
border: 1px solid #fff;
-
+
&.art-current {
background-color: #00a1d6;
border: 1px solid #00a1d6;
}
}
}
-
+
.art-danmuku-style-panel-colors {
display: flex;
gap: 5px;
flex-wrap: wrap;
margin-bottom: 10px;
justify-content: space-between;
-
+
.art-danmuku-style-panel-color {
cursor: pointer;
width: 20px;
height: 20px;
border: 1px solid #fff;
-
- &.art-current{
+
+ &.art-current {
position: relative;
box-shadow: 0 0 2px #fff;
&::before {
@@ -122,25 +124,24 @@
}
}
}
-
}
}
}
-
- &:hover .art-danmuku-style-panel{
+
+ &:hover .art-danmuku-style-panel {
display: flex;
}
-
+
.art-icon {
opacity: 0.75;
cursor: pointer;
-
+
&:hover {
opacity: 1;
}
}
}
-
+
.art-danmuku-input {
flex: 1;
display: flex;
@@ -150,8 +151,9 @@
width: 100%;
color: #ffffff;
background-color: transparent;
-
- &::placeholder, &::-webkit-input-placeholder {
+
+ &::placeholder,
+ &::-webkit-input-placeholder {
color: rgb(255 255 255 / 50%);
}
}
@@ -196,15 +198,16 @@
.art-danmuku-left {
border: 1px solid #dadada;
background: #f4f4f4;
-
+
.art-danmuku-style .art-icon svg {
fill: #666;
}
-
+
.art-danmuku-input {
color: #000000;
-
- &::placeholder, &::-webkit-input-placeholder {
+
+ &::placeholder,
+ &::-webkit-input-placeholder {
color: rgb(0 0 0 / 50%);
}
}
@@ -220,4 +223,4 @@
right: 0;
bottom: -40px;
width: 100%;
-}
\ No newline at end of file
+}
diff --git a/packages/artplayer-plugin-hls-quality/package.json b/packages/artplayer-plugin-hls-quality/package.json
index d4315a5d6..85c1a8c63 100644
--- a/packages/artplayer-plugin-hls-quality/package.json
+++ b/packages/artplayer-plugin-hls-quality/package.json
@@ -1,24 +1,24 @@
{
- "license": "MIT",
- "version": "1.0.0",
- "name": "artplayer-plugin-hls-quality",
- "types": "types/artplayer-plugin-hls-quality.d.ts",
- "description": "Iframe plugin for ArtPlayer",
- "main": "dist/artplayer-plugin-hls-quality.js",
- "legacy": "dist/artplayer-plugin-hls-quality.legacy.js",
- "author": "Harvey Zack ",
- "browserslist": "> 0.5%, last 2 versions, not dead",
- "homepage": "https://artplayer.org",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
- },
- "bugs": {
- "url": "https://github.com/zhw2590582/ArtPlayer/issues"
- },
- "keywords": [
- "html5",
- "video",
- "player"
- ]
-}
\ No newline at end of file
+ "license": "MIT",
+ "version": "1.0.0",
+ "name": "artplayer-plugin-hls-quality",
+ "types": "types/artplayer-plugin-hls-quality.d.ts",
+ "description": "Iframe plugin for ArtPlayer",
+ "main": "dist/artplayer-plugin-hls-quality.js",
+ "legacy": "dist/artplayer-plugin-hls-quality.legacy.js",
+ "author": "Harvey Zack ",
+ "browserslist": "> 0.5%, last 2 versions, not dead",
+ "homepage": "https://artplayer.org",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/zhw2590582/ArtPlayer/issues"
+ },
+ "keywords": [
+ "html5",
+ "video",
+ "player"
+ ]
+}
diff --git a/packages/artplayer-plugin-iframe/package.json b/packages/artplayer-plugin-iframe/package.json
index 09ecf6ae2..7b053f9f4 100644
--- a/packages/artplayer-plugin-iframe/package.json
+++ b/packages/artplayer-plugin-iframe/package.json
@@ -1,24 +1,24 @@
{
- "license": "MIT",
- "version": "1.0.0",
- "name": "artplayer-plugin-iframe",
- "types": "types/artplayer-plugin-iframe.d.ts",
- "description": "Iframe plugin for ArtPlayer",
- "main": "dist/artplayer-plugin-iframe.js",
- "legacy": "dist/artplayer-plugin-iframe.legacy.js",
- "author": "Harvey Zack ",
- "browserslist": "> 0.5%, last 2 versions, not dead",
- "homepage": "https://artplayer.org",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
- },
- "bugs": {
- "url": "https://github.com/zhw2590582/ArtPlayer/issues"
- },
- "keywords": [
- "html5",
- "video",
- "player"
- ]
-}
\ No newline at end of file
+ "license": "MIT",
+ "version": "1.0.0",
+ "name": "artplayer-plugin-iframe",
+ "types": "types/artplayer-plugin-iframe.d.ts",
+ "description": "Iframe plugin for ArtPlayer",
+ "main": "dist/artplayer-plugin-iframe.js",
+ "legacy": "dist/artplayer-plugin-iframe.legacy.js",
+ "author": "Harvey Zack ",
+ "browserslist": "> 0.5%, last 2 versions, not dead",
+ "homepage": "https://artplayer.org",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/zhw2590582/ArtPlayer.git"
+ },
+ "bugs": {
+ "url": "https://github.com/zhw2590582/ArtPlayer/issues"
+ },
+ "keywords": [
+ "html5",
+ "video",
+ "player"
+ ]
+}
diff --git a/packages/artplayer-template/next.js/.eslintrc.json b/packages/artplayer-template/next.js/.eslintrc.json
index bffb357a7..1c2aa65d7 100644
--- a/packages/artplayer-template/next.js/.eslintrc.json
+++ b/packages/artplayer-template/next.js/.eslintrc.json
@@ -1,3 +1,3 @@
{
- "extends": "next/core-web-vitals"
+ "extends": "next/core-web-vitals"
}
diff --git a/packages/artplayer-template/next.js/README.md b/packages/artplayer-template/next.js/README.md
index b12f3e33e..5fbb30d5a 100644
--- a/packages/artplayer-template/next.js/README.md
+++ b/packages/artplayer-template/next.js/README.md
@@ -22,8 +22,8 @@ The `pages/api` directory is mapped to `/api/*`. Files in this directory are tre
To learn more about Next.js, take a look at the following resources:
-- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
-- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
+- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
diff --git a/packages/artplayer-template/next.js/next.config.js b/packages/artplayer-template/next.js/next.config.js
index a843cbee0..b13dbe4e0 100644
--- a/packages/artplayer-template/next.js/next.config.js
+++ b/packages/artplayer-template/next.js/next.config.js
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
- reactStrictMode: true,
-}
+ reactStrictMode: true,
+};
-module.exports = nextConfig
+module.exports = nextConfig;
diff --git a/packages/artplayer-template/next.js/package.json b/packages/artplayer-template/next.js/package.json
index c4184c4bb..a83ca8534 100644
--- a/packages/artplayer-template/next.js/package.json
+++ b/packages/artplayer-template/next.js/package.json
@@ -1,21 +1,21 @@
{
- "name": "next.js",
- "version": "0.1.0",
- "private": true,
- "scripts": {
- "dev": "next dev",
- "build": "next build",
- "start": "next start",
- "lint": "next lint"
- },
- "dependencies": {
- "artplayer": "latest",
- "next": "12.1.6",
- "react": "18.1.0",
- "react-dom": "18.1.0"
- },
- "devDependencies": {
- "eslint": "8.14.0",
- "eslint-config-next": "12.1.6"
- }
+ "name": "next.js",
+ "version": "0.1.0",
+ "private": true,
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start",
+ "lint": "next lint"
+ },
+ "dependencies": {
+ "artplayer": "latest",
+ "next": "12.1.6",
+ "react": "18.1.0",
+ "react-dom": "18.1.0"
+ },
+ "devDependencies": {
+ "eslint": "8.14.0",
+ "eslint-config-next": "12.1.6"
+ }
}
diff --git a/packages/artplayer-template/next.js/pages/_app.js b/packages/artplayer-template/next.js/pages/_app.js
index 1e1cec924..bee613e3a 100644
--- a/packages/artplayer-template/next.js/pages/_app.js
+++ b/packages/artplayer-template/next.js/pages/_app.js
@@ -1,7 +1,7 @@
-import '../styles/globals.css'
+import '../styles/globals.css';
function MyApp({ Component, pageProps }) {
- return
+ return ;
}
-export default MyApp
+export default MyApp;
diff --git a/packages/artplayer-template/next.js/pages/api/hello.js b/packages/artplayer-template/next.js/pages/api/hello.js
index df63de88f..839be9fe1 100644
--- a/packages/artplayer-template/next.js/pages/api/hello.js
+++ b/packages/artplayer-template/next.js/pages/api/hello.js
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
export default function handler(req, res) {
- res.status(200).json({ name: 'John Doe' })
+ res.status(200).json({ name: 'John Doe' });
}
diff --git a/packages/artplayer-template/next.js/styles/Home.module.css b/packages/artplayer-template/next.js/styles/Home.module.css
index 32a57d52f..316b30d03 100644
--- a/packages/artplayer-template/next.js/styles/Home.module.css
+++ b/packages/artplayer-template/next.js/styles/Home.module.css
@@ -1,116 +1,116 @@
.container {
- padding: 0 2rem;
+ padding: 0 2rem;
}
.main {
- min-height: 100vh;
- padding: 4rem 0;
- flex: 1;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
+ min-height: 100vh;
+ padding: 4rem 0;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
}
.footer {
- display: flex;
- flex: 1;
- padding: 2rem 0;
- border-top: 1px solid #eaeaea;
- justify-content: center;
- align-items: center;
+ display: flex;
+ flex: 1;
+ padding: 2rem 0;
+ border-top: 1px solid #eaeaea;
+ justify-content: center;
+ align-items: center;
}
.footer a {
- display: flex;
- justify-content: center;
- align-items: center;
- flex-grow: 1;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-grow: 1;
}
.title a {
- color: #0070f3;
- text-decoration: none;
+ color: #0070f3;
+ text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
- text-decoration: underline;
+ text-decoration: underline;
}
.title {
- margin: 0;
- line-height: 1.15;
- font-size: 4rem;
+ margin: 0;
+ line-height: 1.15;
+ font-size: 4rem;
}
.title,
.description {
- text-align: center;
+ text-align: center;
}
.description {
- margin: 4rem 0;
- line-height: 1.5;
- font-size: 1.5rem;
+ margin: 4rem 0;
+ line-height: 1.5;
+ font-size: 1.5rem;
}
.code {
- background: #fafafa;
- border-radius: 5px;
- padding: 0.75rem;
- font-size: 1.1rem;
- font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
- Bitstream Vera Sans Mono, Courier New, monospace;
+ background: #fafafa;
+ border-radius: 5px;
+ padding: 0.75rem;
+ font-size: 1.1rem;
+ font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New,
+ monospace;
}
.grid {
- display: flex;
- align-items: center;
- justify-content: center;
- flex-wrap: wrap;
- max-width: 800px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-wrap: wrap;
+ max-width: 800px;
}
.card {
- margin: 1rem;
- padding: 1.5rem;
- text-align: left;
- color: inherit;
- text-decoration: none;
- border: 1px solid #eaeaea;
- border-radius: 10px;
- transition: color 0.15s ease, border-color 0.15s ease;
- max-width: 300px;
+ margin: 1rem;
+ padding: 1.5rem;
+ text-align: left;
+ color: inherit;
+ text-decoration: none;
+ border: 1px solid #eaeaea;
+ border-radius: 10px;
+ transition: color 0.15s ease, border-color 0.15s ease;
+ max-width: 300px;
}
.card:hover,
.card:focus,
.card:active {
- color: #0070f3;
- border-color: #0070f3;
+ color: #0070f3;
+ border-color: #0070f3;
}
.card h2 {
- margin: 0 0 1rem 0;
- font-size: 1.5rem;
+ margin: 0 0 1rem 0;
+ font-size: 1.5rem;
}
.card p {
- margin: 0;
- font-size: 1.25rem;
- line-height: 1.5;
+ margin: 0;
+ font-size: 1.25rem;
+ line-height: 1.5;
}
.logo {
- height: 1em;
- margin-left: 0.5rem;
+ height: 1em;
+ margin-left: 0.5rem;
}
@media (max-width: 600px) {
- .grid {
- width: 100%;
- flex-direction: column;
- }
+ .grid {
+ width: 100%;
+ flex-direction: column;
+ }
}
diff --git a/packages/artplayer-template/next.js/styles/globals.css b/packages/artplayer-template/next.js/styles/globals.css
index e5e2dcc23..24bdae79c 100644
--- a/packages/artplayer-template/next.js/styles/globals.css
+++ b/packages/artplayer-template/next.js/styles/globals.css
@@ -1,16 +1,16 @@
html,
body {
- padding: 0;
- margin: 0;
- font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
- Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
+ padding: 0;
+ margin: 0;
+ font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans,
+ Helvetica Neue, sans-serif;
}
a {
- color: inherit;
- text-decoration: none;
+ color: inherit;
+ text-decoration: none;
}
* {
- box-sizing: border-box;
+ box-sizing: border-box;
}
diff --git a/packages/artplayer-template/nuxt.js/Artplayer.vue b/packages/artplayer-template/nuxt.js/Artplayer.vue
index d5b2cbd30..0c29a4a6f 100644
--- a/packages/artplayer-template/nuxt.js/Artplayer.vue
+++ b/packages/artplayer-template/nuxt.js/Artplayer.vue
@@ -33,4 +33,4 @@ export default {
}
},
};
-
\ No newline at end of file
+
diff --git a/packages/artplayer-template/nuxt.js/app.vue b/packages/artplayer-template/nuxt.js/app.vue
index 3133c817a..01ece30d4 100644
--- a/packages/artplayer-template/nuxt.js/app.vue
+++ b/packages/artplayer-template/nuxt.js/app.vue
@@ -28,4 +28,4 @@ export default {
},
},
};
-
\ No newline at end of file
+
diff --git a/packages/artplayer-template/nuxt.js/nuxt.config.ts b/packages/artplayer-template/nuxt.js/nuxt.config.ts
index ac44f39e6..387b2ba44 100644
--- a/packages/artplayer-template/nuxt.js/nuxt.config.ts
+++ b/packages/artplayer-template/nuxt.js/nuxt.config.ts
@@ -1,6 +1,4 @@
-import { defineNuxtConfig } from 'nuxt'
+import { defineNuxtConfig } from 'nuxt';
// https://v3.nuxtjs.org/api/configuration/nuxt.config
-export default defineNuxtConfig({
-
-})
+export default defineNuxtConfig({});
diff --git a/packages/artplayer-template/nuxt.js/package.json b/packages/artplayer-template/nuxt.js/package.json
index 3c2f186cc..dc10b5269 100644
--- a/packages/artplayer-template/nuxt.js/package.json
+++ b/packages/artplayer-template/nuxt.js/package.json
@@ -1,15 +1,15 @@
{
- "private": true,
- "scripts": {
- "build": "nuxt build",
- "dev": "nuxt dev",
- "generate": "nuxt generate",
- "preview": "nuxt preview"
- },
- "devDependencies": {
- "nuxt": "3.0.0-rc.1"
- },
- "dependencies": {
- "artplayer": "latest"
- }
+ "private": true,
+ "scripts": {
+ "build": "nuxt build",
+ "dev": "nuxt dev",
+ "generate": "nuxt generate",
+ "preview": "nuxt preview"
+ },
+ "devDependencies": {
+ "nuxt": "3.0.0-rc.1"
+ },
+ "dependencies": {
+ "artplayer": "latest"
+ }
}
diff --git a/packages/artplayer-template/nuxt.js/tsconfig.json b/packages/artplayer-template/nuxt.js/tsconfig.json
index a7bfa186c..d1ddce884 100644
--- a/packages/artplayer-template/nuxt.js/tsconfig.json
+++ b/packages/artplayer-template/nuxt.js/tsconfig.json
@@ -1,4 +1,4 @@
{
- // https://v3.nuxtjs.org/concepts/typescript
- "extends": "./.nuxt/tsconfig.json"
+ // https://v3.nuxtjs.org/concepts/typescript
+ "extends": "./.nuxt/tsconfig.json"
}
diff --git a/packages/artplayer-template/react.js/package.json b/packages/artplayer-template/react.js/package.json
index 9e5fc41eb..d4c0158c1 100644
--- a/packages/artplayer-template/react.js/package.json
+++ b/packages/artplayer-template/react.js/package.json
@@ -1,39 +1,39 @@
{
- "name": "react.js",
- "version": "0.1.0",
- "private": true,
- "dependencies": {
- "@testing-library/jest-dom": "^5.16.4",
- "@testing-library/react": "^13.1.1",
- "@testing-library/user-event": "^13.5.0",
- "artplayer": "latest",
- "react": "^18.1.0",
- "react-dom": "^18.1.0",
- "react-scripts": "5.0.1",
- "web-vitals": "^2.1.4"
- },
- "scripts": {
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
- "eject": "react-scripts eject"
- },
- "eslintConfig": {
- "extends": [
- "react-app",
- "react-app/jest"
- ]
- },
- "browserslist": {
- "production": [
- ">0.2%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 1 chrome version",
- "last 1 firefox version",
- "last 1 safari version"
- ]
- }
+ "name": "react.js",
+ "version": "0.1.0",
+ "private": true,
+ "dependencies": {
+ "@testing-library/jest-dom": "^5.16.4",
+ "@testing-library/react": "^13.1.1",
+ "@testing-library/user-event": "^13.5.0",
+ "artplayer": "latest",
+ "react": "^18.1.0",
+ "react-dom": "^18.1.0",
+ "react-scripts": "5.0.1",
+ "web-vitals": "^2.1.4"
+ },
+ "scripts": {
+ "start": "react-scripts start",
+ "build": "react-scripts build",
+ "test": "react-scripts test",
+ "eject": "react-scripts eject"
+ },
+ "eslintConfig": {
+ "extends": [
+ "react-app",
+ "react-app/jest"
+ ]
+ },
+ "browserslist": {
+ "production": [
+ ">0.2%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
}
diff --git a/packages/artplayer-template/react.js/public/index.html b/packages/artplayer-template/react.js/public/index.html
index aa069f27c..ce6d2bcbe 100644
--- a/packages/artplayer-template/react.js/public/index.html
+++ b/packages/artplayer-template/react.js/public/index.html
@@ -1,21 +1,18 @@
-
-
-
-
-
-
-
-
-
-
- React App
-
-
-
-
-
-
+ -->