Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3128e233da | ||
|
|
704fe7732c | ||
|
|
5a2f1d2787 | ||
|
|
cefbade4a0 | ||
|
|
b22288492f | ||
|
|
dced5f8b34 | ||
|
|
8d95baabc3 | ||
|
|
7560631b8c | ||
|
|
a060398286 | ||
|
|
ee1ab0e034 | ||
|
|
13cc7ec64a | ||
|
|
5efa26463e | ||
|
|
a969686d88 | ||
|
|
31f8f9fe09 | ||
|
|
96333e00d8 | ||
|
|
59413e121c | ||
|
|
13282aaf5a | ||
|
|
86e36f176a | ||
|
|
60fe51272a | ||
|
|
6ab89f7358 | ||
|
|
b2db59d24a | ||
|
|
897aa0dd24 | ||
|
|
f0fe5d53eb | ||
|
|
d1cdc516ac | ||
|
|
153924a966 | ||
|
|
af4c007547 | ||
|
|
3f77cd1b4b | ||
|
|
1a951729ef | ||
|
|
18e49e8116 | ||
|
|
bad6c66f84 | ||
|
|
3307d1fd5a | ||
|
|
795b78e2a9 | ||
|
|
829d0e70f0 | ||
|
|
5b22d9537a | ||
|
|
8ca17bf0ae | ||
|
|
9315afa217 | ||
|
|
1939f33703 | ||
|
|
637a0ec98f | ||
|
|
cbc38dd78a | ||
|
|
40b2e14adc | ||
|
|
124240255c | ||
|
|
22e9022d83 | ||
|
|
93d39ca618 | ||
|
|
415a04a4a7 | ||
|
|
9d25c2b402 | ||
|
|
e4af4db6a7 | ||
|
|
2f71b0d70f | ||
|
|
9168f0b212 | ||
|
|
a8cbb56d93 | ||
|
|
1a3c4c5f79 | ||
|
|
89a19a16f0 | ||
|
|
0acc2482d5 | ||
|
|
1cc2a57d5c | ||
|
|
a6e4575b84 | ||
|
|
c81e5ba3a5 | ||
|
|
763e47ed0f | ||
|
|
904e214727 | ||
|
|
4722226658 | ||
|
|
54e9fb9ae2 | ||
|
|
0cf455ced3 | ||
|
|
7ff61b4660 | ||
|
|
e0faa3fe68 | ||
|
|
14701f2141 | ||
|
|
2cf7905d58 | ||
|
|
1d153e9a8d | ||
|
|
3da08e1bc7 | ||
|
|
06fc487482 | ||
|
|
a836852e48 | ||
|
|
5f40463713 | ||
|
|
2df60a78ff | ||
|
|
4a7736a8e0 | ||
|
|
563e796098 | ||
|
|
11525f2ee3 | ||
|
|
18a3e88e62 | ||
|
|
7a3146db6b | ||
|
|
0a3a20568e | ||
|
|
6a51c6b0ad | ||
|
|
c10e760141 | ||
|
|
247d626c3d | ||
|
|
6262ff96c3 | ||
|
|
652965352f | ||
|
|
898ba45bf6 | ||
|
|
88c7b5c2ff | ||
|
|
590388125a | ||
|
|
9e6105c8f1 | ||
|
|
e43e7f3359 | ||
|
|
65f2fd57de | ||
|
|
6f82f3f91d | ||
|
|
e982482a6d | ||
|
|
7f9325909b | ||
|
|
424ce9f39b | ||
|
|
1270167a3e | ||
|
|
be4d1d0437 | ||
|
|
d8ba5c266e | ||
|
|
44ca79ef62 | ||
|
|
97646bc729 | ||
|
|
a31fe1b5d5 | ||
|
|
48b81536a8 | ||
|
|
15f6f2759a | ||
|
|
ee90291897 | ||
|
|
baaaa4c56c | ||
|
|
2fcd44e8e7 | ||
|
|
1d859e2049 | ||
|
|
0c1c1273a6 | ||
|
|
707df15b2d | ||
|
|
042745f001 | ||
|
|
7c5d0f7385 | ||
|
|
d512d9f8f0 | ||
|
|
965fccb985 | ||
|
|
c933bd68e4 | ||
|
|
17b7386ad6 | ||
|
|
f9d4bbd752 | ||
|
|
7851ad373b | ||
|
|
c752982738 | ||
|
|
12c64e41fb | ||
|
|
20f3488830 | ||
|
|
2d6627225f | ||
|
|
de20a350e6 | ||
|
|
339ec6a163 | ||
|
|
066a29e170 | ||
|
|
2223c01d83 | ||
|
|
a8d102cdad | ||
|
|
355fdf623d | ||
|
|
ef5558e2d3 | ||
|
|
04ea075cc4 | ||
|
|
1c58255301 | ||
|
|
5769baa676 | ||
|
|
b3c2452758 | ||
|
|
9e36a1ba44 | ||
|
|
8c604e6e4d | ||
|
|
9f2038539e | ||
|
|
3965132252 | ||
|
|
c1758c604d | ||
|
|
224a7fe23c | ||
|
|
06be229b21 | ||
|
|
bdec289151 | ||
|
|
9cf1571ef8 | ||
|
|
2878705e72 | ||
|
|
50c293f6c3 | ||
|
|
8ef582f714 | ||
|
|
7a84c262da | ||
|
|
48ade99047 | ||
|
|
61cbcb430d | ||
|
|
d3cc1bd4fc | ||
|
|
a0f90bef50 | ||
|
|
1310e1f0a8 | ||
|
|
66bb5326ec | ||
|
|
5fb324abc5 | ||
|
|
2b83fc1b26 | ||
|
|
a67307d749 | ||
|
|
c91eab323e | ||
|
|
27dbd8dfbf | ||
|
|
da45181d18 | ||
|
|
0d420c6413 | ||
|
|
a51b0debd9 | ||
|
|
a6816d68fa | ||
|
|
d43a71b931 | ||
|
|
31d1949da0 | ||
|
|
8d6dcdf6aa | ||
|
|
6f84fcc8f2 | ||
|
|
8ad6550d12 | ||
|
|
2fbacf77a6 | ||
|
|
1644a7530f | ||
|
|
c3ddddc223 | ||
|
|
13fa706bbf | ||
|
|
abeb4b5326 | ||
|
|
b444b4fcc5 | ||
|
|
6c98b91aa5 | ||
|
|
282c8f79e0 | ||
|
|
022f36624a | ||
|
|
fcd7fbecfc | ||
|
|
b1276c26a8 | ||
|
|
af748fdebf | ||
|
|
853b15ba3c | ||
|
|
763cabdfe8 | ||
|
|
902fe20895 | ||
|
|
8be47d625e | ||
|
|
9be587559f | ||
|
|
a244879a3e | ||
|
|
18ca81e2ed | ||
|
|
da69b19b63 | ||
|
|
904358fbdf | ||
|
|
05cbe4dad6 | ||
|
|
cef60c4d9a | ||
|
|
8d1ae92e73 | ||
|
|
6bac8ad6e2 | ||
|
|
1ec9c5e2bf | ||
|
|
efa498d0d6 | ||
|
|
58d443375c | ||
|
|
effcb52e9a | ||
|
|
358c483077 | ||
|
|
07469bfb27 | ||
|
|
aa13d472cd | ||
|
|
77acbe47ba | ||
|
|
7bb66071d3 | ||
|
|
b2be95e131 | ||
|
|
cebb754cdf | ||
|
|
ea00e6c36b | ||
|
|
ce09c375c0 | ||
|
|
2f56243068 | ||
|
|
150e43d325 | ||
|
|
d0939d5b65 | ||
|
|
b2f30aa030 | ||
|
|
6c0a198f02 | ||
|
|
8dc8dc3a3e | ||
|
|
e0d8eea2fc | ||
|
|
29508485c8 | ||
|
|
08d195864b | ||
|
|
cdbf4b3816 | ||
|
|
6b716c622c | ||
|
|
743a812860 | ||
|
|
663081d2ac | ||
|
|
98942c8049 | ||
|
|
4aba07cf79 | ||
|
|
82c6c59875 | ||
|
|
c14f03f019 | ||
|
|
8ea78d5f99 | ||
|
|
79c68a5c39 | ||
|
|
db8df6015d | ||
|
|
1ba6de1555 | ||
|
|
ea111be661 | ||
|
|
35d9350b6f | ||
|
|
71d56e0a63 | ||
|
|
876d1b89cd | ||
|
|
1eb13d9121 | ||
|
|
06fbf2b3c7 | ||
|
|
908cde6893 | ||
|
|
fcfc4334f4 | ||
|
|
3cc0b40965 | ||
|
|
2db70b99ef | ||
|
|
8d1417f2fc | ||
|
|
1498c93921 | ||
|
|
f81225b248 | ||
|
|
09e1d66676 | ||
|
|
cb2116fa9c | ||
|
|
2560cee937 | ||
|
|
cabade015c | ||
|
|
b9e6232b59 | ||
|
|
4b0e607c14 | ||
|
|
4dbc42cef3 | ||
|
|
e5ba6fcb95 | ||
|
|
ccd167dd84 | ||
|
|
169bce0faa | ||
|
|
655c8dad70 | ||
|
|
6fb1b0eb6e | ||
|
|
fba16c2432 | ||
|
|
8d8258eb42 | ||
|
|
b62ec8a5db | ||
|
|
c2298bc5a8 | ||
|
|
2ac43c6c9e | ||
|
|
5e03c9b191 | ||
|
|
95d5f64057 | ||
|
|
2764cb6d51 | ||
|
|
1a5cf941a1 | ||
|
|
7d24eabe32 | ||
|
|
c81240205d | ||
|
|
6322e9446f | ||
|
|
385fc7bda2 | ||
|
|
8b16c0fc29 | ||
|
|
f6c76e9c8f | ||
|
|
dd8397f14e | ||
|
|
d17104ed3b | ||
|
|
ffbb4cc057 | ||
|
|
64b71850b4 | ||
|
|
760f7c1dfd | ||
|
|
2e168cb5e6 | ||
|
|
d6e9643220 | ||
|
|
b5cde4d611 | ||
|
|
e0b5da64fb | ||
|
|
35ecf4bc53 | ||
|
|
712c488332 | ||
|
|
47058616de | ||
|
|
98f0e80a33 | ||
|
|
d3d1c83eb8 | ||
|
|
c5355ed6d5 | ||
|
|
dc35807bfa | ||
|
|
b50dd1e4eb | ||
|
|
a72a51d00b | ||
|
|
81e2b441ff | ||
|
|
6b62ca261b | ||
|
|
1ee7d7e6a7 | ||
|
|
4503676cbf | ||
|
|
999636400e | ||
|
|
a9474b6bf1 | ||
|
|
6e44bee87b | ||
|
|
cadfa4efe5 | ||
|
|
6c2d5f62f6 | ||
|
|
896de568cc | ||
|
|
581b453ed2 | ||
|
|
3c939b3c37 | ||
|
|
a510b9b772 | ||
|
|
98c600c244 | ||
|
|
dc8337dc65 | ||
|
|
52b6693da2 | ||
|
|
1b69b28ba1 | ||
|
|
75bd703790 | ||
|
|
1f25803519 | ||
|
|
0af2403bb8 | ||
|
|
416e79705c | ||
|
|
9b9e1da1c7 | ||
|
|
899307696b | ||
|
|
73e58d356e | ||
|
|
5a159c8f52 | ||
|
|
1bab88147c | ||
|
|
5f9a5abfcc | ||
|
|
af2f30442d | ||
|
|
f1a71f5f6c | ||
|
|
89fecf5488 | ||
|
|
773714f739 | ||
|
|
6f34ea0da0 | ||
|
|
4c28b38825 | ||
|
|
6093d826a1 | ||
|
|
6695a128b8 | ||
|
|
13da0815ca | ||
|
|
6e2cb3ad5e | ||
|
|
88067817cd | ||
|
|
3f33e98421 | ||
|
|
524c3203ef | ||
|
|
cca41ae1fe | ||
|
|
0eb028fbd4 | ||
|
|
bbe0923064 | ||
|
|
0335c678d5 | ||
|
|
c95d379064 | ||
|
|
a2b6ce6d7c | ||
|
|
947e41cd88 | ||
|
|
29dca053b6 | ||
|
|
22f2b4714f | ||
|
|
dac68903c5 | ||
|
|
1aedc530d5 | ||
|
|
f88a1f0fda | ||
|
|
f82d6e85c8 | ||
|
|
950d6a3b3a | ||
|
|
e26f43e243 | ||
|
|
eb34a39429 | ||
|
|
4b207c6bfb | ||
|
|
335c9b28c3 | ||
|
|
ccd027b928 | ||
|
|
cbde597614 | ||
|
|
abff0e0331 | ||
|
|
aa156e1516 | ||
|
|
23237c5ed6 | ||
|
|
5d286e5d00 | ||
|
|
df54606294 | ||
|
|
6b95f054d8 | ||
|
|
4ec49ec5f1 | ||
|
|
8d91a5f515 | ||
|
|
ad03401d74 | ||
|
|
ea275dc405 | ||
|
|
1471e9ae5e | ||
|
|
90f1e5faa8 | ||
|
|
b64fe65164 | ||
|
|
952b66898a | ||
|
|
92893321b2 | ||
|
|
c8143b0979 | ||
|
|
d012920f34 | ||
|
|
4d537d3872 | ||
|
|
d9b38d8e72 | ||
|
|
c7d816192e | ||
|
|
44dec9f83e | ||
|
|
0fd8a85ea9 | ||
|
|
f6295c1fbc | ||
|
|
0bc9c88af2 | ||
|
|
ffd7a38b35 | ||
|
|
afcb601c84 | ||
|
|
573c549ce1 | ||
|
|
296a8122d8 | ||
|
|
ec1fa2f9d0 | ||
|
|
6824543951 | ||
|
|
d0fd5abcd3 | ||
|
|
5000d6ed26 | ||
|
|
d70a84773b | ||
|
|
046d679c81 | ||
|
|
339996a873 | ||
|
|
df3f633e78 | ||
|
|
58b68a2c12 | ||
|
|
4dfcba5266 | ||
|
|
f4d097b918 | ||
|
|
6056e7a0c6 | ||
|
|
941ab07c66 | ||
|
|
c89f99f8a3 | ||
|
|
c323cea07a | ||
|
|
a817034907 | ||
|
|
3de25525c4 | ||
|
|
b74eabc73b | ||
|
|
fa585e536a | ||
|
|
487e865017 | ||
|
|
9f9cb0e036 | ||
|
|
73462364b3 | ||
|
|
bf1a4f2234 | ||
|
|
8ee7488bb1 | ||
|
|
39ea75450c | ||
|
|
100785bd58 | ||
|
|
b73611b126 | ||
|
|
cd67baae94 | ||
|
|
d29a5b788f | ||
|
|
abaf47b380 | ||
|
|
cd9c897c30 | ||
|
|
8b28148cc6 | ||
|
|
ebc0835da4 | ||
|
|
00d8b77e89 | ||
|
|
8e825effdb | ||
|
|
8f608ef694 | ||
|
|
429330a7e2 | ||
|
|
7c72e3ecd8 | ||
|
|
86dd34dc37 | ||
|
|
dd6a2dafda | ||
|
|
ec52781540 | ||
|
|
de5c97dc52 | ||
|
|
495ff8625e | ||
|
|
9d730146c0 | ||
|
|
9bd1452030 | ||
|
|
d735bb4de7 | ||
|
|
8aac0ba52f | ||
|
|
b1819b3ea2 | ||
|
|
582114e79d | ||
|
|
d626ee601e | ||
|
|
43f8e9d935 | ||
|
|
eeaeb95557 | ||
|
|
14c3b52b1d | ||
|
|
65a9fab8d9 | ||
|
|
bd73f2535d | ||
|
|
bf22c92209 | ||
|
|
09ef4c975b | ||
|
|
57e48c0783 | ||
|
|
c857340d11 | ||
|
|
edf138730a | ||
|
|
5ed7f240fa | ||
|
|
62c05ef659 | ||
|
|
2385128abb | ||
|
|
328d580fb7 | ||
|
|
9a0a02bf56 | ||
|
|
7bed66fdaf | ||
|
|
c27d245003 | ||
|
|
e453033792 | ||
|
|
273c199df2 | ||
|
|
b84ae21907 | ||
|
|
cc71a27ad2 | ||
|
|
a04900bcba | ||
|
|
ca75dbd637 | ||
|
|
7fb29496fe | ||
|
|
d867a25a51 | ||
|
|
6fef6881be | ||
|
|
2ebdfb4a2d | ||
|
|
a056983047 | ||
|
|
3b172ffa93 | ||
|
|
9de6e12671 | ||
|
|
cfafcf4959 | ||
|
|
53c5502b0f | ||
|
|
8b88db6e71 | ||
|
|
3bb7a77b28 | ||
|
|
74bc9ba312 | ||
|
|
dea98cbf7c | ||
|
|
6cbc84b47f | ||
|
|
8a6e438d3b | ||
|
|
06b15dc278 | ||
|
|
60e64dd68e | ||
|
|
1dd4a90734 | ||
|
|
da2df1aa95 | ||
|
|
e269d89821 | ||
|
|
5c6245a8b8 | ||
|
|
a9a3796744 | ||
|
|
8495892a75 | ||
|
|
6da839465b | ||
|
|
59e3a43e3d | ||
|
|
1cae225112 | ||
|
|
af12acba9d | ||
|
|
64c21d04bd | ||
|
|
935accdad2 | ||
|
|
0aeb916e3d | ||
|
|
2f16d173da | ||
|
|
61913d1b75 | ||
|
|
e47674f346 | ||
|
|
f2947edacb | ||
|
|
f04493a8fa | ||
|
|
7d7dec5d93 | ||
|
|
1353ef0aaa | ||
|
|
18d3523799 | ||
|
|
008232ea14 | ||
|
|
94405a7240 | ||
|
|
95bbe6f3b2 | ||
|
|
965e3e008f | ||
|
|
078507356a | ||
|
|
769855be79 | ||
|
|
87d068dd68 | ||
|
|
48436c008d | ||
|
|
f457fa779c | ||
|
|
6ee14a9ff0 | ||
|
|
a5cda26b80 | ||
|
|
b787a3bb99 | ||
|
|
662531b35f | ||
|
|
b434fa0d79 | ||
|
|
966e25d13a | ||
|
|
09a6c67c75 | ||
|
|
00c8054a8b | ||
|
|
2d6ac77747 | ||
|
|
a2c3e0d019 | ||
|
|
80e04f7a4b | ||
|
|
a3c4dcd051 | ||
|
|
6fd9a4f950 | ||
|
|
aab55bf2fb | ||
|
|
e71a675219 | ||
|
|
b01e366f0a | ||
|
|
743662c5db | ||
|
|
8a9dc135ed | ||
|
|
bb2d871826 | ||
|
|
e7d0326dad | ||
|
|
5d5a90f195 | ||
|
|
7c86519e46 | ||
|
|
3baa3d5720 | ||
|
|
8ffa1ff2da | ||
|
|
381a7e657e | ||
|
|
1573364202 | ||
|
|
f85e300d77 | ||
|
|
fbe54980e3 | ||
|
|
32a502cef3 | ||
|
|
70a389ae37 | ||
|
|
3ffd48d464 | ||
|
|
7f8ea62e18 | ||
|
|
507ce40213 | ||
|
|
a36eb4ab02 | ||
|
|
a78880dac9 | ||
|
|
d6a36558c5 | ||
|
|
66e0519707 | ||
|
|
dc637e879f | ||
|
|
21a03468a3 | ||
|
|
9d2e1d1a6d | ||
|
|
806c95e8ea | ||
|
|
f539c69eb4 | ||
|
|
f859640be2 | ||
|
|
9602263820 | ||
|
|
fe34da0743 | ||
|
|
1aeb1a4378 | ||
|
|
0b2b9393a8 | ||
|
|
6b93f3c4c6 | ||
|
|
57d862f25c | ||
|
|
2e994ae82f | ||
|
|
dd1ec7905c | ||
|
|
258abf82fa | ||
|
|
33e73810cb | ||
|
|
ba5e680887 | ||
|
|
c17b098dac | ||
|
|
376b1433a4 | ||
|
|
904f7f6e93 | ||
|
|
38f78292a3 | ||
|
|
943a79d244 | ||
|
|
bf1620acbc | ||
|
|
283baaa68f | ||
|
|
135b1b7536 | ||
|
|
f8a7187530 | ||
|
|
18fbb79dab | ||
|
|
e00fab0bfe | ||
|
|
f13aebd720 | ||
|
|
4f3d5e0240 | ||
|
|
c16f2647e7 | ||
|
|
667cdcf7e8 | ||
|
|
b8153a5a29 | ||
|
|
38e989bc05 | ||
|
|
72925f3987 | ||
|
|
0fc6c7ca63 | ||
|
|
912689a8fa | ||
|
|
dfd55731c1 | ||
|
|
495123d415 | ||
|
|
7251e67524 | ||
|
|
f7a222f7b9 | ||
|
|
9179c3a00e | ||
|
|
6948f1da88 | ||
|
|
3c8bf2e092 | ||
|
|
4208e62138 | ||
|
|
48c64bfc9d | ||
|
|
5bcc78e2f7 | ||
|
|
d2d5875f5e | ||
|
|
c960a89976 | ||
|
|
1c83fc1774 | ||
|
|
348aabf44c | ||
|
|
a2125a2634 | ||
|
|
32b2f4792a | ||
|
|
3afe2e1640 | ||
|
|
94aaf29da8 | ||
|
|
42eb35571d | ||
|
|
4658d3f4b4 | ||
|
|
8ad0605e1a | ||
|
|
765402662f | ||
|
|
39f8c157ac | ||
|
|
6cc89edcd9 | ||
|
|
7264d0b3a3 | ||
|
|
efb5f69dab | ||
|
|
3a50f7ea86 | ||
|
|
52458bb95e | ||
|
|
f63ae33be7 | ||
|
|
b7e740ae61 | ||
|
|
6da0ede757 | ||
|
|
9d0b1a3a24 | ||
|
|
f356188c47 | ||
|
|
0f3218340f | ||
|
|
f4c2e11b86 | ||
|
|
637af75769 | ||
|
|
d0110453c0 | ||
|
|
e0d2ffe0bf | ||
|
|
84c9b539c3 | ||
|
|
2a330db120 | ||
|
|
6b095af945 | ||
|
|
1414c5d542 | ||
|
|
0553eb8aa3 | ||
|
|
8a27565164 | ||
|
|
411e15776f | ||
|
|
056b57eb1b | ||
|
|
ad2aafe07f | ||
|
|
f2658673dc | ||
|
|
c6869686c3 | ||
|
|
f8400002c2 | ||
|
|
2e0d70292b | ||
|
|
50d1457e7e | ||
|
|
3f451aa047 | ||
|
|
9f90774b4f | ||
|
|
96d0786838 | ||
|
|
f12d099aad | ||
|
|
9a9665aac5 | ||
|
|
7cdf6ce904 | ||
|
|
8ffa4174ae | ||
|
|
39301b2e14 | ||
|
|
465fb64cda | ||
|
|
f4c5531b80 | ||
|
|
01e16b042c | ||
|
|
03605262bd | ||
|
|
e33934d982 | ||
|
|
f931f0dda2 | ||
|
|
0eaf9b9b3b | ||
|
|
c3bc0f5270 | ||
|
|
bb74e686cf | ||
|
|
b42e9b99c7 | ||
|
|
02c63e55e8 | ||
|
|
56eba5626e | ||
|
|
06fa463bdd | ||
|
|
c9dfc883ab | ||
|
|
d535423dd8 | ||
|
|
b64d5d5744 | ||
|
|
ca31357292 | ||
|
|
7fc370b6d9 | ||
|
|
17dc3af41f | ||
|
|
99614d0717 | ||
|
|
a47bfb9d31 | ||
|
|
f489454c3a | ||
|
|
e06252c80f | ||
|
|
156519546f | ||
|
|
6d3e0b4567 | ||
|
|
0e4e3da5ee | ||
|
|
5078533ad8 | ||
|
|
0ba8efc2b9 | ||
|
|
3396a741dd | ||
|
|
73f6cd7493 | ||
|
|
4de2718432 | ||
|
|
fdc0bd31dc | ||
|
|
6515953b93 | ||
|
|
a942ca2ea0 | ||
|
|
a26fffdd69 | ||
|
|
5c6cfcbe3e | ||
|
|
efd82ab889 | ||
|
|
16cc6f6fb0 | ||
|
|
b7565cae54 | ||
|
|
00b51c32ba | ||
|
|
cc2027832e | ||
|
|
c2bbe15e79 | ||
|
|
2b3d305412 | ||
|
|
81a577d4a6 | ||
|
|
5bfe0f7cfb | ||
|
|
3e429add87 | ||
|
|
6deccca9be | ||
|
|
5c067c2c47 | ||
|
|
acdb272393 | ||
|
|
6c61a5678b | ||
|
|
ba7109ec11 | ||
|
|
d414d5ca21 | ||
|
|
416c7e850d | ||
|
|
e0afd92180 | ||
|
|
00ea9c4ca4 | ||
|
|
848c6ab131 | ||
|
|
d62405e8ff | ||
|
|
0130455888 | ||
|
|
b943bcde99 | ||
|
|
dc8405403c | ||
|
|
02009e854d | ||
|
|
d1da9f3de8 | ||
|
|
43a90ae379 | ||
|
|
efbd7c08f4 | ||
|
|
0e716da80d | ||
|
|
a63cc35df0 | ||
|
|
6d1a167e4d | ||
|
|
bfcfc449aa | ||
|
|
02c45caa38 | ||
|
|
970e7e3b89 | ||
|
|
bdb050f0a7 | ||
|
|
8dfe97b905 | ||
|
|
2f1e7a0b55 | ||
|
|
946a2da8a9 | ||
|
|
450e4ac879 | ||
|
|
3fb41eedf7 | ||
|
|
e96146b19f | ||
|
|
06226a9e65 | ||
|
|
3c0ea56c11 | ||
|
|
8653940a76 | ||
|
|
addee9646a | ||
|
|
0c77a594ba | ||
|
|
bf2a996769 | ||
|
|
15a58a563e | ||
|
|
00f3b410a4 | ||
|
|
2bbf1a04f6 | ||
|
|
6e721d6928 | ||
|
|
5f67ddf983 | ||
|
|
2543739c9a | ||
|
|
9feeb5845c | ||
|
|
df9fab27eb | ||
|
|
ae8a916118 | ||
|
|
db774e088d | ||
|
|
0b1a02c750 | ||
|
|
0d99e6d70b | ||
|
|
24e9c67718 | ||
|
|
4ffc46a2c4 | ||
|
|
12097914dd | ||
|
|
2a17e1b727 | ||
|
|
b14d4efd92 | ||
|
|
3d0a935ba1 | ||
|
|
32b43ac5db | ||
|
|
7c3f7f2696 | ||
|
|
63c178e177 | ||
|
|
bd813b27ed | ||
|
|
b330fbf7f1 | ||
|
|
c397bb7f81 | ||
|
|
be923b2a70 | ||
|
|
2fde15477f | ||
|
|
8a9f70720a | ||
|
|
c7c9e0a311 | ||
|
|
9c4daf3c1d | ||
|
|
057bfb06c7 | ||
|
|
ec45141ced | ||
|
|
cdd125aa45 | ||
|
|
7de1939472 | ||
|
|
ac45375763 | ||
|
|
525bb269d9 | ||
|
|
746e059a31 | ||
|
|
2eb76650ba | ||
|
|
044e75fb73 | ||
|
|
29215f040f | ||
|
|
be7b646c31 | ||
|
|
bdef8b311d | ||
|
|
87ffa4073b | ||
|
|
017d2cd712 | ||
|
|
6971a2ce07 | ||
|
|
b9523e1d38 | ||
|
|
663037cb95 | ||
|
|
c162d8493b | ||
|
|
729c734b56 | ||
|
|
8d79acdbd5 | ||
|
|
1667457188 | ||
|
|
5f384fb04d | ||
|
|
748ce304e6 | ||
|
|
d6e35781ca | ||
|
|
36bd1bdc20 | ||
|
|
a380836d75 | ||
|
|
cce1eda7eb | ||
|
|
c882814fb0 | ||
|
|
8619fa1b8b | ||
|
|
88533c1023 | ||
|
|
d4b9fc4d29 | ||
|
|
3cd470a83c | ||
|
|
fa18560b2e | ||
|
|
7f3a79edc5 | ||
|
|
aba956d4a4 | ||
|
|
bf0f7bfcaa | ||
|
|
cf33cd01cc | ||
|
|
998526c8d6 | ||
|
|
8214e20531 | ||
|
|
11a08a8a56 | ||
|
|
adf3ff79bd | ||
|
|
6341150f6f | ||
|
|
d992d2066f | ||
|
|
d1bf74cbcb | ||
|
|
28ff3b5875 | ||
|
|
3b0197f9b5 | ||
|
|
c711f4d997 | ||
|
|
fd9bc5ab20 | ||
|
|
203ad0d3a0 | ||
|
|
0454f785be | ||
|
|
34c95dbe70 | ||
|
|
475645d11d | ||
|
|
eea72af62e | ||
|
|
b12507cdb3 | ||
|
|
f6ef3da5aa | ||
|
|
0fb3dba760 | ||
|
|
08a29ba6aa | ||
|
|
f75e01be3b | ||
|
|
e9d7c0cfdc | ||
|
|
8570a86f54 | ||
|
|
59e7335b84 | ||
|
|
16586d8d7e | ||
|
|
4ecdb6b2d9 | ||
|
|
5c037ad08f | ||
|
|
6d0f3cad14 | ||
|
|
b621061417 | ||
|
|
5d00320c1a | ||
|
|
8d52cf8bba | ||
|
|
d8e1e597e2 | ||
|
|
ab0533995e | ||
|
|
d46701e9eb | ||
|
|
7eb63eff91 | ||
|
|
157a0e7048 | ||
|
|
ac1ba12767 | ||
|
|
4b61098945 | ||
|
|
42ad972374 | ||
|
|
65db437799 | ||
|
|
53cbde0ff0 | ||
|
|
d26826401a | ||
|
|
2d65e94195 | ||
|
|
17c34330b5 | ||
|
|
6ff85de301 | ||
|
|
54b68b067b | ||
|
|
6767487d7e | ||
|
|
9a72dcb231 | ||
|
|
c242390fe9 | ||
|
|
1364f2b2e5 | ||
|
|
bac873deeb | ||
|
|
0f56ffbef8 | ||
|
|
16efac5ac1 | ||
|
|
cd001655e4 | ||
|
|
49fe680c87 | ||
|
|
992dab34ae | ||
|
|
9fe5c5d021 | ||
|
|
f121991369 | ||
|
|
c1bf612dd3 | ||
|
|
7f1e1dc255 | ||
|
|
eed28c1d21 | ||
|
|
ae548e93c8 | ||
|
|
c25038b74c | ||
|
|
3dc1e30bb3 | ||
|
|
1b91760be2 | ||
|
|
ccf1999e6d | ||
|
|
650d1abef3 | ||
|
|
4fbb3442e0 | ||
|
|
2a933206dc | ||
|
|
7d766ac1d5 | ||
|
|
1d40d1c46b | ||
|
|
b5694fea89 | ||
|
|
9dba43c2c6 | ||
|
|
620638a56e | ||
|
|
4338cb2217 | ||
|
|
e96778746a | ||
|
|
b97e49bead | ||
|
|
1388df955f | ||
|
|
a0bc4d3a39 | ||
|
|
8148973d39 | ||
|
|
ddcf432717 | ||
|
|
cee1b18b83 | ||
|
|
f8ba38812a | ||
|
|
0aa018db6d |
No files matched your search
@@ -1,11 +1,14 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["@babel/plugin-external-helpers", "@babel/plugin-transform-runtime"]
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-external-helpers",
|
||||
"@babel/plugin-transform-runtime"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
last 2 version
|
||||
@@ -1,14 +1,10 @@
|
||||
# http://editorconfig.org/
|
||||
# See editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[{**/{actual,fixtures,expected,templates}/**,*.md}]
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
trim_trailing_whitespace = true
|
||||
@@ -0,0 +1,7 @@
|
||||
/docs
|
||||
/dist
|
||||
/test
|
||||
/scripts
|
||||
/node_modules
|
||||
/packages/**/node_modules
|
||||
/packages/**/dist
|
||||
@@ -1,219 +1,21 @@
|
||||
{
|
||||
"root": true,
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"globalReturn": true,
|
||||
"impliedStrict": true
|
||||
"parser": "babel-eslint",
|
||||
"extends": [
|
||||
"airbnb-base",
|
||||
"prettier"
|
||||
],
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"rules": {
|
||||
"no-shadow": 0,
|
||||
"no-param-reassign": 0,
|
||||
"prefer-object-spread": 0,
|
||||
"prefer-destructuring": 0,
|
||||
"import/named": 0
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"expect": true
|
||||
},
|
||||
"env": {
|
||||
"es6": true,
|
||||
"amd": true,
|
||||
"node": true,
|
||||
"mocha": true,
|
||||
"worker": true,
|
||||
"jquery": true,
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"serviceworker": true,
|
||||
"shared-node-browser": true
|
||||
},
|
||||
"rules": {
|
||||
"no-await-in-loop": 2,
|
||||
"no-compare-neg-zero": 2,
|
||||
"no-cond-assign": 2,
|
||||
"no-console": 0,
|
||||
"no-constant-condition": [2, { "checkLoops": false }],
|
||||
"no-debugger": 2,
|
||||
"no-dupe-args": 2,
|
||||
"no-dupe-keys": 2,
|
||||
"no-duplicate-case": 2,
|
||||
"no-empty": 1,
|
||||
"no-empty-character-class": 2,
|
||||
"no-ex-assign": 2,
|
||||
"no-extra-boolean-cast": 2,
|
||||
"no-extra-parens": 2,
|
||||
"no-extra-semi": 2,
|
||||
"no-func-assign": 2,
|
||||
"no-inner-declarations": 2,
|
||||
"no-invalid-regexp": 2,
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-obj-calls": 2,
|
||||
"no-regex-spaces": 1,
|
||||
"no-sparse-arrays": 2,
|
||||
"no-template-curly-in-string": 2,
|
||||
"no-unexpected-multiline": 2,
|
||||
"no-unreachable": 2,
|
||||
"no-unsafe-finally": 2,
|
||||
"no-unsafe-negation": 2,
|
||||
"use-isnan": 2,
|
||||
"valid-jsdoc": [2, { "requireReturn": false }],
|
||||
"valid-typeof": 2,
|
||||
|
||||
"accessor-pairs": 1,
|
||||
"array-callback-return": 1,
|
||||
"block-scoped-var": 1,
|
||||
"class-methods-use-this": 0,
|
||||
"curly": 1,
|
||||
"default-case": 1,
|
||||
"dot-location": [1, "property"],
|
||||
"eqeqeq": [1, "smart"],
|
||||
"guard-for-in": 1,
|
||||
"no-alert": 2,
|
||||
"no-caller": 1,
|
||||
"no-div-regex": 1,
|
||||
"no-else-return": 1,
|
||||
"no-empty-function": 1,
|
||||
"no-empty-pattern": 1,
|
||||
"no-eq-null": 1,
|
||||
"no-eval": 0,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-bind": 1,
|
||||
"no-extra-label": 1,
|
||||
"no-fallthrough": 1,
|
||||
"no-floating-decimal": 1,
|
||||
"no-global-assign": 2,
|
||||
"no-implicit-coercion": 1,
|
||||
"no-implied-eval": 2,
|
||||
"no-invalid-this": 1,
|
||||
"no-iterator": 2,
|
||||
"no-labels": 1,
|
||||
"no-lone-blocks": 1,
|
||||
"no-loop-func": 2,
|
||||
"no-multi-spaces": 1,
|
||||
"no-multi-str": 1,
|
||||
"no-new-func": 0,
|
||||
"no-new-wrappers": 1,
|
||||
"no-octal": 1,
|
||||
"no-octal-escape": 1,
|
||||
"no-param-reassign": 1,
|
||||
"no-proto": 1,
|
||||
"no-redeclare": 1,
|
||||
"no-return-assign": 1,
|
||||
"no-return-await": 1,
|
||||
"no-script-url": 2,
|
||||
"no-self-assign": 1,
|
||||
"no-self-compare": 1,
|
||||
"no-sequences": 1,
|
||||
"no-throw-literal": 1,
|
||||
"no-unmodified-loop-condition": 1,
|
||||
"no-unused-expressions": 0,
|
||||
"no-unused-labels": 1,
|
||||
"no-useless-call": 1,
|
||||
"no-useless-concat": 1,
|
||||
"no-useless-escape": 1,
|
||||
"no-useless-return": 1,
|
||||
"no-void": 1,
|
||||
"no-with": 2,
|
||||
"prefer-promise-reject-errors": 1,
|
||||
"require-await": 2,
|
||||
"vars-on-top": 1,
|
||||
"wrap-iife": [1, "any"],
|
||||
"yoda": 2,
|
||||
|
||||
"strict": 2,
|
||||
|
||||
"no-catch-shadow": 2,
|
||||
"no-delete-var": 2,
|
||||
"no-label-var": 2,
|
||||
"no-shadow": 2,
|
||||
"no-shadow-restricted-names": 2,
|
||||
"no-undef": 2,
|
||||
"no-undef-init": 2,
|
||||
"no-undefined": 0,
|
||||
"no-unused-vars": 2,
|
||||
"no-use-before-define": 2,
|
||||
|
||||
"callback-return": 0,
|
||||
"global-require": 1,
|
||||
"handle-callback-err": 1,
|
||||
"no-mixed-requires": [1, { "allowCall": true }],
|
||||
"no-new-require": 2,
|
||||
"no-path-concat": 2,
|
||||
"no-process-env": 0,
|
||||
"no-process-exit": 2,
|
||||
|
||||
"array-bracket-spacing": 1,
|
||||
"block-spacing": 1,
|
||||
"brace-style": 1,
|
||||
"camelcase": 1,
|
||||
"capitalized-comments": 0,
|
||||
"comma-dangle": 1,
|
||||
"comma-spacing": 1,
|
||||
"comma-style": 1,
|
||||
"computed-property-spacing": 1,
|
||||
"consistent-this": [1, "that", "self"],
|
||||
"eol-last": 1,
|
||||
"func-call-spacing": 1,
|
||||
"func-names": 1,
|
||||
"indent": [1, 2, { "SwitchCase": 1 }],
|
||||
"key-spacing": 1,
|
||||
"keyword-spacing": 1,
|
||||
"linebreak-style": 1,
|
||||
"lines-around-comment": 1,
|
||||
"new-cap": 0,
|
||||
"new-parens": 1,
|
||||
"no-array-constructor": 1,
|
||||
"no-continue": 1,
|
||||
"no-inline-comments": 1,
|
||||
"no-mixed-spaces-and-tabs": 2,
|
||||
"no-multi-assign": 1,
|
||||
"no-multiple-empty-lines": 1,
|
||||
"no-negated-condition": 0,
|
||||
"no-nested-ternary": 2,
|
||||
"no-new-object": 1,
|
||||
"no-tabs": 2,
|
||||
"no-trailing-spaces": 1,
|
||||
"no-unneeded-ternary": 1,
|
||||
"no-whitespace-before-property": 1,
|
||||
"object-curly-spacing": 0,
|
||||
"object-property-newline": [1, { "allowMultiplePropertiesPerLine": true }],
|
||||
"one-var": [1, "never"],
|
||||
"operator-assignment": 1,
|
||||
"operator-linebreak": 1,
|
||||
"padded-blocks": 0,
|
||||
"quotes": [1, "single"],
|
||||
"require-jsdoc": 0,
|
||||
"semi": 1,
|
||||
"semi-spacing": 1,
|
||||
"space-before-blocks": 1,
|
||||
"space-before-function-paren": [1, "never"],
|
||||
"space-in-parens": 1,
|
||||
"space-infix-ops": 1,
|
||||
"space-unary-ops": [1, { "words": true, "nonwords": false }],
|
||||
"spaced-comment": [1, "always"],
|
||||
"wrap-regex": 1,
|
||||
|
||||
"arrow-body-style": 1,
|
||||
"arrow-parens": 0,
|
||||
"arrow-spacing": 1,
|
||||
"constructor-super": 2,
|
||||
"generator-star-spacing": 1,
|
||||
"no-class-assign": 2,
|
||||
"no-confusing-arrow": 0,
|
||||
"no-const-assign": 2,
|
||||
"no-dupe-class-members": 2,
|
||||
"no-duplicate-imports": 2,
|
||||
"no-new-symbol": 1,
|
||||
"no-this-before-super": 2,
|
||||
"no-useless-computed-key": 1,
|
||||
"no-useless-constructor": 1,
|
||||
"no-useless-rename": 1,
|
||||
"no-var": 1,
|
||||
"prefer-const": 1,
|
||||
"prefer-destructuring": 1,
|
||||
"prefer-spread": 0,
|
||||
"prefer-template": 1,
|
||||
"require-yield": 2,
|
||||
"rest-spread-spacing": 1,
|
||||
"symbol-description": 2,
|
||||
"template-curly-spacing": 1,
|
||||
"yield-star-spacing": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report an issue or unexpected behaviour with Artplayer
|
||||
---
|
||||
|
||||
### Expected behaviour
|
||||
|
||||
### Actual behaviour
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
### Environment
|
||||
|
||||
- Browser:
|
||||
- Version:
|
||||
- Operating System:
|
||||
- Version:
|
||||
|
||||
### Console errors (if any)
|
||||
|
||||
### Link to where the bug is happening
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
name: New feature
|
||||
about: Request new functionality
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
name: Improvement
|
||||
about: Request a change that isn't a bug or new feature
|
||||
---
|
||||
@@ -0,0 +1 @@
|
||||
PLEASE USE OUR SPECIFIC ISSUE TEMPLATES for bug reports, features and improvement suggestions.
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Node CI
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: npm install, lint, build, and test
|
||||
run: |
|
||||
git config --global user.email "you@example.com"
|
||||
git config --global user.name "Your Name"
|
||||
npm install
|
||||
npm install packages/* && npx lerna bootstrap --hoist
|
||||
npm run lint
|
||||
npm run build:all
|
||||
npm run test
|
||||
npm run sizereport
|
||||
env:
|
||||
CI: true
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"useTabs": false,
|
||||
"tabWidth": 4,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 120
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"packages/artplayer/dist/artplayer.js": {
|
||||
"bundled": 177549,
|
||||
"minified": 103704,
|
||||
"gzipped": 24566
|
||||
},
|
||||
"packages/artplayer-plugin-backlight/dist/artplayer-plugin-backlight.js": {
|
||||
"bundled": 4642,
|
||||
"minified": 1999,
|
||||
"gzipped": 961
|
||||
},
|
||||
"packages/artplayer-tool-github/dist/artplayer-tool-github.js": {
|
||||
"bundled": 12660,
|
||||
"minified": 12305,
|
||||
"gzipped": 4307
|
||||
},
|
||||
"packages/artplayer-plugin-gif/dist/artplayer-plugin-gif.js": {
|
||||
"bundled": 98490,
|
||||
"minified": 28883,
|
||||
"gzipped": 10422
|
||||
},
|
||||
"packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.js": {
|
||||
"bundled": 15973,
|
||||
"minified": 7709,
|
||||
"gzipped": 2786
|
||||
},
|
||||
"packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js": {
|
||||
"bundled": 23511,
|
||||
"minified": 12515,
|
||||
"gzipped": 4067
|
||||
},
|
||||
"packages/artplayer-vue/dist/artplayer-vue.js": {
|
||||
"bundled": 179108,
|
||||
"minified": 104630,
|
||||
"gzipped": 24709
|
||||
},
|
||||
"packages/artplayer-react/dist/artplayer-react.js": {
|
||||
"bundled": 261037,
|
||||
"minified": 133184,
|
||||
"gzipped": 33776
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,16 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- stable
|
||||
- stable
|
||||
|
||||
before_script:
|
||||
- npm install
|
||||
- npm i packages/* && lerna bootstrap --hoist
|
||||
|
||||
script:
|
||||
- npm run lint
|
||||
- npm run build:all
|
||||
- npm run test
|
||||
|
||||
after_success:
|
||||
- npm run sizereport
|
||||
@@ -0,0 +1,122 @@
|
||||
# ArtPlayer.js
|
||||
|
||||
> :art: ArtPlayer.js 是一个现代全功能的 HTML5 视频播放器
|
||||
|
||||
[](https://www.travis-ci.org/zhw2590582/ArtPlayer)
|
||||

|
||||

|
||||

|
||||
[](https://www.npmjs.com/package/artplayer)
|
||||
[](https://www.codacy.com/app/zhw2590582/ArtPlayer?utm_source=github.com&utm_medium=referral&utm_content=zhw2590582/ArtPlayer&utm_campaign=Badge_Grade)
|
||||
[](https://david-dm.org/zhw2590582/artplayer)
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- <b>大小</b> - `artplayer.js` ≈ `100kb`
|
||||
- <b>字幕</b> - 支持 `.VTT`, `.ASS` 和 `.SRT` 格式
|
||||
- <b>自定义</b> - `右键菜单`, `业务图层`, `视频控制器` 和 `设置面板`
|
||||
- <b>控制器</b> - `画质切换`, `字幕切换`, `播放速度`, `长宽比`, `视频翻转`, `全屏`, `画中画`, `截图`, `缩略图`, `自适应尺寸`, `高亮` 和 `热键`...
|
||||
- <b>内建</b> - `打开本地字幕`, `打开本地视频`, `迷你进度条`, `网络监测` 和 `字幕时间偏移`
|
||||
- <b>集成</b> - 容易与其它依赖集成:`flv.js`, `hls.js`, `dash.js`, `shaka-player`, `webtorrent`...
|
||||
- <b>代码</b> - 纯 `ES6` 和 `SASS`, 高解耦的代码, 清晰的结构, 容易跟踪 `Bug` 和添加新功能
|
||||
- <b>文档</b> - 详尽的接口文档和丰富的代码演示
|
||||
- <b>接口</b> - 丰富的接口和响应事件, 容易对接到业务或者自定义插件
|
||||
- <b>多语言</b> - 支持控件的国际化
|
||||
|
||||
## 生态
|
||||
|
||||
| 项目 | 描述 | 演示 |
|
||||
| --------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [artplayer-plugin-danmuku](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-danmuku) | 弹幕库插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku) |
|
||||
| [artplayer-plugin-gif](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-gif) | GIF 生成插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif) |
|
||||
| [artplayer-plugin-backlight](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-backlight) | 背光插件 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight) |
|
||||
| [artplayer-tool-thumbnail](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-thumbnail) | 缩略图生成工具 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail) |
|
||||
| [artplayer-tool-github](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-github) | Github 弹幕库工具 | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github) | |
|
||||
| [artplayer-react](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-react) | React 组件 | [demo](https://codesandbox.io/s/n74859y9rl) |
|
||||
| [artplayer-vue](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-vue) | Vue 组件 | [demo](https://codesandbox.io/s/6z76lm109n) |
|
||||
|
||||
## 演示
|
||||
|
||||
[打开 Github Pages 演示](https://artplayer.org/)
|
||||
|
||||
## 文档
|
||||
|
||||
[打开 Github Pages 文档](https://artplayer.org/document)
|
||||
|
||||
## 安装
|
||||
|
||||
通过 `npm` 安装:
|
||||
|
||||
```bash
|
||||
$ npm install artplayer
|
||||
```
|
||||
|
||||
或者通过 `yarn` 安装:
|
||||
|
||||
```bash
|
||||
$ yarn add artplayer
|
||||
```
|
||||
|
||||
```js
|
||||
import Artplayer from 'artplayer';
|
||||
```
|
||||
|
||||
或者直接引入`umd`文件:
|
||||
|
||||
```html
|
||||
<script src="path/to/artplayer.js"></script>
|
||||
```
|
||||
|
||||
将会导出全局变量到`window.Artplayer`.
|
||||
|
||||
## 使用
|
||||
|
||||
```html
|
||||
<div class="artplayer-app"></div>
|
||||
```
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
});
|
||||
```
|
||||
|
||||
## 贡献
|
||||
|
||||
安装依赖:
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
$ npm run bootstrap
|
||||
```
|
||||
|
||||
运行开发人员模式,然后选择要开发的项目:
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
开启网页服务器:
|
||||
|
||||
```bash
|
||||
$ npm start
|
||||
```
|
||||
|
||||
## 捐助
|
||||
|
||||
我们通过这些渠道接受捐赠:
|
||||
|
||||
- [Paypal](https://www.paypal.me/harveyzack)
|
||||
- [微信支付](./images/wechatpay.jpg)
|
||||
- [支付宝](./images/alipay.jpg)
|
||||
|
||||
## QQ 群
|
||||
|
||||

|
||||
|
||||
## 证书
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
@@ -1,5 +1,124 @@
|
||||
# ArtPlayer
|
||||
ArtPlayer is a modern HTML5 video player
|
||||
# ArtPlayer.js
|
||||
|
||||
## Status
|
||||
⚠️ This project is WIP and not ready for production use yet!
|
||||
- [中文介绍](./README-CN.md)
|
||||
|
||||
> :art: ArtPlayer.js is a modern and full featured HTML5 video player
|
||||
|
||||
[](https://www.travis-ci.org/zhw2590582/ArtPlayer)
|
||||

|
||||

|
||||

|
||||
[](https://www.npmjs.com/package/artplayer)
|
||||
[](https://www.codacy.com/app/zhw2590582/ArtPlayer?utm_source=github.com&utm_medium=referral&utm_content=zhw2590582/ArtPlayer&utm_campaign=Badge_Grade)
|
||||
[](https://david-dm.org/zhw2590582/artplayer)
|
||||
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
- <b>Size</b> - `artplayer.js` ≈ `100kb`
|
||||
- <b>Subtitle</b> - Support for `.VTT`, `.ASS` and `.SRT` formats
|
||||
- <b>Customizable</b> - `Right Click Menu`, `Business Layer`, `Video Controller` and `Settings Panel`
|
||||
- <b>Controller</b> - `Quality Switch`, `Subtitle Switch`, `Play Speed`, `Aspect Ratio`, `Video Flip`, `Fullscreen`, `Picture In Picture`, `Screenshot`, `Thumbnail`, `Adaptive Size`, `Highlight` and `Hotkey`...
|
||||
- <b>Built-in</b> - `Open Local Subtitles`, `Open Local Video`, `Mini Progress Bar`, `Network Detection` and `Subtitle Time Offset`
|
||||
- <b>Integration</b> - Easy to integration with other dependencies: `flv.js`, `hls.js`, `dash.js`, `shaka-player`, `webtorrent`...
|
||||
- <b>Code</b> - Vanilla `ES6` and `SASS`, Highly decoupled code, clear structure, easy to track bugs and add new features
|
||||
- <b>Document</b> - Detailed interface documentation and rich code demo
|
||||
- <b>API</b> - Rich interface and response events, easy to interface with business or custom plugin
|
||||
- <b>I18N</b> - support for internationalization of controls
|
||||
|
||||
## Ecosystem
|
||||
|
||||
| Project | Description | Demo |
|
||||
| --------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [artplayer-plugin-danmuku](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-danmuku) | Danmuku plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku) |
|
||||
| [artplayer-plugin-gif](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-gif) | Gif plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif) |
|
||||
| [artplayer-plugin-backlight](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-backlight) | Backlight plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight) |
|
||||
| [artplayer-tool-thumbnail](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-thumbnail) | Thumbnail tool | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail) |
|
||||
| [artplayer-tool-github](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-github) | Github Danmuku tool | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github) | |
|
||||
| [artplayer-react](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-react) | React Component | [demo](https://codesandbox.io/s/n74859y9rl) |
|
||||
| [artplayer-vue](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-vue) | Vue Component | [demo](https://codesandbox.io/s/6z76lm109n) |
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/) from Github Pages
|
||||
|
||||
## Document
|
||||
|
||||
[Checkout the Document](https://artplayer.org/document) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`:
|
||||
|
||||
```bash
|
||||
$ npm install artplayer
|
||||
```
|
||||
|
||||
Or install with `yarn`:
|
||||
|
||||
```bash
|
||||
$ yarn add artplayer
|
||||
```
|
||||
|
||||
```js
|
||||
import Artplayer from 'artplayer';
|
||||
```
|
||||
|
||||
Or umd builds are also available:
|
||||
|
||||
```html
|
||||
<script src="path/to/artplayer.js"></script>
|
||||
```
|
||||
|
||||
Will expose the global variable to `window.Artplayer`.
|
||||
|
||||
## Usage
|
||||
|
||||
```html
|
||||
<div class="artplayer-app"></div>
|
||||
```
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
});
|
||||
```
|
||||
|
||||
## Contribution
|
||||
|
||||
Installation dependency:
|
||||
|
||||
```bash
|
||||
$ npm install
|
||||
$ npm run bootstrap
|
||||
```
|
||||
|
||||
Run the developer mode and select the project you want to develop:
|
||||
|
||||
```bash
|
||||
$ npm run dev
|
||||
```
|
||||
|
||||
Open web server:
|
||||
|
||||
```bash
|
||||
$ npm start
|
||||
```
|
||||
|
||||
## Donations
|
||||
|
||||
We accept donations through these channels:
|
||||
|
||||
- [Paypal](https://www.paypal.me/harveyzack)
|
||||
- [WeChat Pay](./images/wechatpay.jpg)
|
||||
- [Alipay](./images/alipay.jpg)
|
||||
|
||||
## QQ Group
|
||||
|
||||

|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-plugin-backlight.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,(function(){"use strict";function t(t){for(var e=[],o=0;o<10;o+=1)for(var n=0;n<5;n+=1)0!==o&&9!==o&&0!==n&&4!==n||e.push(t(o,n,10,5));return e}return function(e){var o=e.constructor.utils.setStyles,n=e.template,a=n.$player,r=n.$video,i=e.player,c=document.createElement("div");c.classList.add("artplayer-backlight"),o(c,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var l,s=(l=c,t((function(t,e,o,n){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/o,"%"),a.style.top="".concat(100*e/n,"%"),a.style.width="".concat(100/o,"%"),a.style.height="".concat(100/n,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",l.appendChild(a),{$box:a,left:0===t,right:t===o-1,top:0===e,bottom:e===n-1}}))),u=document.createElement("canvas");return a.insertBefore(c,r),function o(){window.requestAnimationFrame((function(){if(i.playing){var n=r.clientWidth,a=r.clientHeight;(function(e,o,n,a){var r=e.getContext("2d");return e.width=n,e.height=a,r.drawImage(o,0,0),t((function(t,e,o,i){for(var c=n/o,l=a/i,s=t*c,u=e*l,d=r.getImageData(s,u,c,l).data,f=0,h=0,p=0,g=0,y=d.length;g<y;g+=4)f+=d[g],h+=d[g+1],p+=d[g+2];return{r:f=Math.floor(f/(d.length/4)),g:h=Math.floor(h/(d.length/4)),b:p=Math.floor(p/(d.length/4))}}))})(u,r,n,a).forEach((function(t,e){var o=t.r,n=t.g,a=t.b,r=s[e],i=r.$box,c=r.left,l=r.right,u=r.top,d=r.bottom,f=c?"-64px":l?"64px":"0",h=u?"-64px":d?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px"),i.style.boxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px")}))}e.isDestroy||o()}))}(),{name:"artplayerPluginBacklight"}}}));
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginDanmuku=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var i=function(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t},r={"zh-cn":{"Danmu opacity":"弹幕透明度","Danmu speed":"弹幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"弹幕文本不能为空","The length of the danmu does not exceed":"弹幕文本字数不能超过","Danmu speed synchronous playback multiple":"弹幕速度同步播放倍数"},"zh-tw":{"Danmu opacity":"彈幕透明度","Danmu speed":"彈幕速度","Danmu size":"弹幕大小","Danmu text cannot be empty":"彈幕文本不能為空","The length of the danmu does not exceed":"彈幕文本字數不能超過","Danmu speed synchronous playback multiple":"彈幕速度同步播放倍數"}};function a(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-opacity",index:10,html:'<div class="art-setting-header">'.concat(e.get("Danmu opacity"),': <span class="art-value">100</span>%</div><div class="art-setting-range"><input type="range" value="1" min="0.1" max="1" step="0.1"></div>'),mounted:function(e){var i=e.querySelector("input[type=range]"),r=e.querySelector(".art-value");n(i,"change",(function(){var e=i.value;r.innerText=100*Number(e),t.plugins.artplayerPluginDanmuku.config({opacity:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){i.value!==t.opacity&&(i.value=t.opacity,r.innerText=100*t.opacity)}))}}}function o(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-size",index:11,html:'<div class="art-setting-header">'.concat(e.get("Danmu size"),': <span class="art-value">25</span>px</div><div class="art-setting-range"><input type="range" value="25" min="14" max="30" step="1"></div>'),mounted:function(e){var i=e.querySelector("input[type=range]"),r=e.querySelector(".art-value");n(i,"change",(function(){var e=i.value;r.innerText=e,t.plugins.artplayerPluginDanmuku.config({fontSize:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){i.value!==t.fontSize&&(i.value=t.fontSize,r.innerText=t.fontSize)}))}}}function u(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-speed",index:12,html:'<div class="art-setting-header">'.concat(e.get("Danmu speed"),': <span class="art-value">5</span>s</div><div class="art-setting-range"><input type="range" value="5" min="1" max="10" step="1"></div>'),mounted:function(e){var i=e.querySelector("input[type=range]"),r=e.querySelector(".art-value");n(i,"change",(function(){var e=i.value;r.innerText=e,t.plugins.artplayerPluginDanmuku.config({speed:Number(e)})})),t.on("artplayerPluginDanmuku:config",(function(t){i.value!==t.speed&&(i.value=t.speed,r.innerText=t.speed)}))}}}function s(t){var e=t.i18n,n=t.events.proxy;return{name:"danmuku-synchronousPlayback",index:13,html:'<label class="art-setting-checkbox"><input type="checkbox"/>'.concat(e.get("Danmu speed synchronous playback multiple"),"</label>"),mounted:function(e){var i=e.querySelector("input[type=checkbox]");n(i,"change",(function(){t.plugins.artplayerPluginDanmuku.config({synchronousPlayback:i.checked})})),t.on("artplayerPluginDanmuku:config",(function(t){i.checked!==t.synchronousPlayback&&(i.checked=t.synchronousPlayback)}))}}}function l(t,e,n){return t.filter((function(t){return t.$state===e})).map(n)}function c(t,e){var n=t.getBoundingClientRect();return e?n[e]:n}var p=function(t){if(Array.isArray(t))return t};var f=function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var n=[],i=!0,r=!1,a=void 0;try{for(var o,u=t[Symbol.iterator]();!(i=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);i=!0);}catch(t){r=!0,a=t}finally{try{i||null==u.return||u.return()}finally{if(r)throw a}}return n}};var m=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")};var h=function(t,e){return p(t)||f(t,e)||m()};function d(t){switch(t){case 1:case 2:case 3:return 0;case 4:case 5:return 1;default:return 0}}function y(t){return fetch(t).then((function(t){return t.text()})).then((function(t){return function(t){if("string"!=typeof t)return[];var e=t.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);return e.length?e.map((function(t){var e=t.match(/<d p="(.+)">(.+)<\/d>/),n=h(e,3),i=n[1],r=n[2],a=i.split(",");return 8===a.length&&r.trim()?{text:r,time:Number(a[0]),mode:d(Number(a[1])),fontSize:Number(a[2]),color:"#".concat(Number(a[3]).toString(16)),timestamp:Number(a[4]),pool:Number(a[5]),userID:a[6],rowID:Number(a[7])}:null})):[]}(t)}))}function g(t,e){var n=h(t.option.margiLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-plugin-gif.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).artplayerPluginGif=t()}(this,(function(){"use strict";var e=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function t(e,t){return e(t={exports:{}},t.exports),t.exports}var r=t((function(e,t){!function(t,r,i,n){var o,a,s={URL:t.URL||t.webkitURL||t.mozURL||t.msURL,getUserMedia:(a=i.getUserMedia||i.webkitGetUserMedia||i.mozGetUserMedia||i.msGetUserMedia,a?a.bind(i):a),requestAnimFrame:t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,requestTimeout:function(e,t){if(e=e||s.noop,t=t||0,!s.requestAnimFrame)return setTimeout(e,t);var r=(new Date).getTime(),i=new Object,n=s.requestAnimFrame;return i.value=n((function o(){(new Date).getTime()-r>=t?e.call():i.value=n(o)})),i},Blob:t.Blob||t.BlobBuilder||t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder,btoa:(o=t.btoa||function(e){for(var t="",r=0,i=e.length,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=void 0,a=void 0,s=void 0,c=void 0,d=void 0,l=void 0,u=void 0;r<i;)c=(o=e.charCodeAt(r++))>>2,d=(3&o)<<4|(a=e.charCodeAt(r++))>>4,l=(15&a)<<2|(s=e.charCodeAt(r++))>>6,u=63&s,isNaN(a)?l=u=64:isNaN(s)&&(u=64),t=t+n.charAt(c)+n.charAt(d)+n.charAt(l)+n.charAt(u);return t},o?o.bind(t):s.noop),isObject:function(e){return e&&"[object Object]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return s.isObject(e)&&!Object.keys(e).length},isArray:function(e){return e&&Array.isArray(e)},isFunction:function(e){return e&&"function"==typeof e},isElement:function(e){return e&&1===e.nodeType},isString:function(e){return"string"==typeof e||"[object String]"===Object.prototype.toString.call(e)},isSupported:{canvas:function(){var e=r.createElement("canvas");return e&&e.getContext&&e.getContext("2d")},webworkers:function(){return t.Worker},blob:function(){return s.Blob},Uint8Array:function(){return t.Uint8Array},Uint32Array:function(){return t.Uint32Array},videoCodecs:function(){var e=r.createElement("video"),t={mp4:!1,h264:!1,ogv:!1,ogg:!1,webm:!1};try{e&&e.canPlayType&&(t.mp4=""!==e.canPlayType('video/mp4; codecs="mp4v.20.8"'),t.h264=""!==(e.canPlayType('video/mp4; codecs="avc1.42E01E"')||e.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')),t.ogv=""!==e.canPlayType('video/ogg; codecs="theora"'),t.ogg=""!==e.canPlayType('video/ogg; codecs="theora"'),t.webm=-1!==e.canPlayType('video/webm; codecs="vp8, vorbis"'))}catch(e){}return t}()},noop:function(){},each:function(e,t){var r=void 0,i=void 0;if(s.isArray(e))for(r=-1,i=e.length;++r<i&&!1!==t(r,e[r]););else if(s.isObject(e))for(r in e)if(e.hasOwnProperty(r)&&!1===t(r,e[r]))break},mergeOptions:function(e,t){if(s.isObject(e)&&s.isObject(t)&&Object.keys){var r={};return s.each(e,(function(t,i){r[t]=e[t]})),s.each(t,(function(i,n){var o=t[i];s.isObject(o)&&e[i]?r[i]=s.mergeOptions(e[i],o):r[i]=o})),r}},setCSSAttr:function(e,t,r){s.isElement(e)&&(s.isString(t)&&s.isString(r)?e.style[t]=r:s.isObject(t)&&s.each(t,(function(t,r){e.style[t]=r})))},removeElement:function(e){s.isElement(e)&&e.parentNode&&e.parentNode.removeChild(e)},createWebWorker:function(e){if(!s.isString(e))return{};try{var t=new s.Blob([e],{type:"text/javascript"}),r=s.URL.createObjectURL(t);return{objectUrl:r,worker:new Worker(r)}}catch(e){return""+e}},getExtension:function(e){return e.substr(e.lastIndexOf(".")+1,e.length)},getFontSize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!r.body||!1===e.resizeFont)return e.fontSize;var t=e.text,i=e.gifWidth,n=parseInt(e.fontSize,10),o=parseInt(e.minFontSize,10),a=r.createElement("div"),s=r.createElement("span");for(a.setAttribute("width",i),a.appendChild(s),s.innerHTML=t,s.style.fontSize=n+"px",s.style.textIndent="-9999px",s.style.visibility="hidden",r.body.appendChild(s);s.offsetWidth>i&&n>=o;)s.style.fontSize=--n+"px";return r.body.removeChild(s),n+"px"},webWorkerError:!1},c=Object.freeze({default:s}),d={validate:function(e){e=s.isObject(e)?e:{};var t={};return s.each(d.validators,(function(r,i){var n=i.errorCode;if(!e[n]&&!i.condition)return(t=i).error=!0,!1})),delete t.condition,t},isValid:function(e){var t=!0!==d.validate(e).error;return t},validators:[{condition:s.isFunction(s.getUserMedia),errorCode:"getUserMedia",errorMsg:"The getUserMedia API is not supported in your browser"},{condition:s.isSupported.canvas(),errorCode:"canvas",errorMsg:"Canvas elements are not supported in your browser"},{condition:s.isSupported.webworkers(),errorCode:"webworkers",errorMsg:"The Web Workers API is not supported in your browser"},{condition:s.isFunction(s.URL),errorCode:"window.URL",errorMsg:"The window.URL API is not supLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-react.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerReact=e()}(this,(function(){"use strict";var t=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o};var e=function(e,n){if(null==e)return{};var r,o,i=t(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],n.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i};var n=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var o=r((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var c=function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),t};var s=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var l=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?s(t):e},u=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),p=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var f=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)},d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;function b(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var v=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,o=b(t),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))h.call(n,a)&&(o[a]=n[a]);if(d){r=d(n);for(var c=0;c<r.length;c++)y.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},m="function"==typeof Symbol&&Symbol.for,g=m?Symbol.for("react.element"):60103,w=m?Symbol.for("react.portal"):60106,x=m?Symbol.for("react.fragment"):60107,O=m?Symbol.for("react.strict_mode"):60108,k=m?Symbol.for("react.profiler"):60114,j=m?Symbol.for("react.provider"):60109,P=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.forward_ref"):60112,E=m?Symbol.for("react.suspense"):60113,C=m?Symbol.for("react.memo"):60115,R=m?Symbol.for("react.lazy"):60116,$="function"==typeof Symbol&&Symbol.iterator;function D(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A={};function _(t,e,n){this.props=t,this.context=e,this.refs=A,this.updater=n||T}function z(){}function L(t,e,n){this.props=t,this.context=e,this.refs=A,this.updater=n||T}_.prototype.isReactComponent={},_.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error(D(85));this.updater.enqueueSetState(this,t,e,"setState")},_.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},z.prototype=_.prototype;var q=L.prototype=new z;q.constructor=L,v(q,_.prototype),q.isPureReactComponent=!0;var M={current:null},F={current:null},I=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function V(t,e,n){var r,o={},i=null,a=null;if(null!=e)for(r in void 0!==e.ref&&(a=e.ref),void 0!==e.key&&(i=""+e.key),e)I.call(e,r)&&!N.hasOwnProperty(r)&&(o[r]=e[r]);var c=arguments.length-2;if(1===c)oLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-tool-github.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolGithub=e()}(this,(function(){"use strict";"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;return function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){t.exports=function(){var t,e=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},r=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),o.forEach((function(r){e(t,r,n[r])}))}return t},n=(function(t){var e=function(t){var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(t,e,r){var n=f;return function(o,i){if(n===l)throw new Error("Generator is already running");if(n===p){if("throw"===o)throw i;return S()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=O(a,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=l;var u=s(t,e,r);if("normal"===u.type){if(n=r.done?p:h,u.arg===y)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=p,r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",l="executing",p="completed",y={};function d(){}function g(){}function v(){}var m={};m[i]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==r&&n.call(b,i)&&(m=b);var x=v.prototype=d.prototype=Object.create(m);function k(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function L(t){var e;this._invoke=function(r,o){function i(){return new Promise((function(e,i){!function e(r,o,i,a){var c=s(t[r],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then((function(t){e("next",t,i,a)}),(function(t){e("throw",t,i,a)})):Promise.resolve(f).then((function(t){u.value=t,i(u)}),(function(t){return e("throw",t,i,a)}))}a(c.arg)}(r,o,e,i)}))}return e=e?e.then(i,i):i()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return y;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(t){if(t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:S}}function S(){return{value:e,done:!0}}return g.prototype=x.constructor=v,v.constructor=g,v[c]=g.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(L.prototype),L.prototype[a]=function(){return this},t.AsyncIterator=L,t.async=function(e,r,n,o){var i=new L(u(e,r,n,o));return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(x),x[c]="Generator",x[i]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sentLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-tool-thumbnail.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerToolThumbnail=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var n=function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?r(t):e},s=o((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),u=o((function(t){function e(n,o){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,o)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};function h(){}h.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function i(){o.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}};var c=h,f=h;function p(t){return new Promise((function(e){return setTimeout(e,t)}))}function d(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}return c.TinyEmitter=f,function(e){function o(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t(this,o),(e=a(this,s(o).call(this))).processing=!1,e.option={},e.setup(Object.assign({},o.DEFAULTS,n)),e.video=o.creatVideo(),e.inputChange=e.inputChange.bind(r(e)),e.ondrop=e.ondrop.bind(r(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",o.ondragover),e.option.fileInput.addEventListener("drop",o.ondrop),e}return l(o,e),n(o,[{key:"ondrop",value:function(t){t.preventDefault();var e=t.dataTransfer.files[0];this.loadVideo(e)}},{key:"setup",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,e);var n=this.option,o=n.fileInput,i=n.delay,r=n.number,a=n.width,s=n.height,u=n.column;if(this.errorHandle(o instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==o.tagName||"file"!==o.type){o.style.position="relative";var l=document.createElement("input");l.type="file",l.style.position="absolute",l.style.width="100%",l.style.height="100%",l.style.left="0",l.style.top="0",l.style.right="0",l.style.bottom="0",l.style.opacity="0",o.appendChild(l),this.option.fileInput=l}return["delay","number","width","height","column"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.delay=d(i,10,1e3),this.option.number=d(r,10,1e3),this.option.width=d(a,10,1e3),this.option.height=d(s,10,1e3),this.option.column=d(u,1,1e3),this}},{key:"inputChange",value:function(){var t=this.option.fileInput.files[0];this.loadVideo(t)}},{key:"loadVideo",value:function(t){var e=this,n=this.option.delay;if(t){var o=this.video.canPlayType(t.type);this.errorHandle("maybe"===o||"probably"===o,"Playback of this file format is not supported: ".concat(t.type));var i=URL.createObjectURL(t);this.videoUrl=i,this.file=t,this.emit("file",this.file),this.video.src=i,p(n).then((function(){e.emit("video",e.video)})).catch((function(t){throw e.emit("error",t.message),t}))}}},{key:"start",value:function(){var t=this,e=this.option,n=e.width,o=e.height,i=e.number,r=e.delay;this.density=i/this.video.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var a=this.creatScreenshotDate(),s=this.creatCanvas(),u=s.getContext("2d");this.emit("canvas",s);var l,h=a.map((function(e,a){return function(){return t.viLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-vue.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerVue=e()}(this,(function(){"use strict";var t=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=o((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var a=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var s=function(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?a(t):e},c=o((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),l=o((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var u=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)};function p(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}p(".art-video-player{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;margin:0 auto;z-index:10;width:100%;height:100%;outline:0;zoom:1;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none}.art-video-player *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.5}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player>object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:rgba(0,0,0,.7)!important}}");p(".art-video-player .art-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;cursor:pointer}");p(".art-video-player .art-subtitle{display:none;position:absolute;z-index:20;bottom:40px;width:100%;padding:0 20px;text-align:center;color:#fff;font-size:20px;pointer-events:none;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.art-video-player .art-subtitle p{margin:5px 0}.art-video-player.art-subtitle-show .art-subtitle{display:block}");p(".art-video-player .art-danmuku{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}");p(".art-video-player .art-layers{display:none;position:absolute;z-index:40;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}");p(".art-video-player .art-mask{display:none;z-index:50;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-mask,.art-video-player .art-mask .art-state{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justifLine truncated
|
||||
@@ -1,16 +0,0 @@
|
||||
.artplayer-video-player .artplayer-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;outline:0;cursor:pointer}
|
||||
.artplayer-video-player{position:relative;width:100%;height:100%;overflow:hidden;outline:0;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:manipulation;-ms-high-contrast-adjust:none}.artplayer-video-player *{box-sizing:border-box}.artplayer-video-player .art-icon{display:inline-block;line-height:1.5}.artplayer-video-player .art-icon svg{fill:#fff}
|
||||
.artplayer-video-player .artplayer-subtitle{position:absolute;z-index:20;bottom:40px;width:100%;padding:0 20px;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px;pointer-events:none}.artplayer-video-player .artplayer-subtitle p{margin:5px 0}
|
||||
.artplayer-video-player .artplayer-layers{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.artplayer-video-player .artplayer-layers .art-layer{position:absolute;pointer-events:all}
|
||||
.artplayer-video-player .artplayer-mask{display:none;position:absolute;z-index:40;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.artplayer-video-player .artplayer-mask .art-icon-playBig{position:absolute;right:30px;bottom:65px;opacity:.6}
|
||||
.artplayer-video-player .artplayer-loading{display:none;position:absolute;z-index:60;left:0;top:0;right:0;bottom:0;width:100%;height:100%;align-items:center;justify-content:center;pointer-events:none}
|
||||
.artplayer-video-player .artplayer-notice{display:none;font-size:14px;position:absolute;z-index:70;left:0;top:0;padding:10px;width:100%;pointer-events:none}.artplayer-video-player .artplayer-notice .artplayer-notice-inner{display:inline-block;padding:5px 10px;color:#fff;background:rgba(0,0,0,.6);border-radius:3px}
|
||||
.artplayer-video-player .artplayer-bottom{position:absolute;z-index:50;left:0;right:0;bottom:0;height:100px;padding:60px 10px 0;opacity:0;visibility:hidden;transition:all .2s ease-in-out;pointer-events:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom}.artplayer-video-player .artplayer-bottom .artplayer-progress{position:relative;pointer-events:all}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress{position:relative;height:5px;padding:1px 0;cursor:pointer}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner{position:relative;height:100%;background:hsla(0,0%,100%,.2)}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:0;background:hsla(0,0%,100%,.4)}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-played{position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;height:100%;width:0}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;height:0}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{display:inline-block;position:absolute;left:0;top:0;width:7px;height:3px;background:#fff;border-radius:3px}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{display:none;position:absolute;z-index:40;top:-5px;left:-6.5px;width:13px;height:13px;border-radius:50%}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-indicator.show-indicator{display:block}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress:hover .art-progress-indicator,.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress:hover .art-progress-tip{display:block}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-thumbnails{display:none;position:absolute;bottom:8px;left:0;pointer-events:none;background-color:rgba(0,0,0,.7)}.artplayer-video-player .artplayer-bottom .artplayer-controls{position:relative;pointer-events:all;display:flex;align-items:center;justify-content:space-between;height:36px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control{opacity:.9;float:left;font-size:12px;height:36px;line-height:36px;cursor:pointer}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control .art-icon{display:flex;align-items:center;justify-content:center;float:left;height:36px;width:36px;padding:7px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control:hover{opacity:1}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel{position:relative;float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);overflow:hidden}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{position:absolute;top:50%;left:0;width:12px;height:12px;border-radius:12px;margin-top:-6px;background:#fff}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{left:-54px;background:#fff}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{left:6px;background:hsla(0,0%,100%,.2)}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after,.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{content:"";position:absolute;display:block;top:50%;height:3px;margin-top:-2px;width:60px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel.art-volume-panel-hover{width:60px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-time{padding:0 10px}.artplayer-video-playeLine truncated
|
||||
.artplayer-video-player .artplayer-contextmenu{display:none;position:absolute;z-index:110;left:0;top:0;min-width:200px;padding:5px 0;background:rgba(0,0,0,.8);border-radius:3px}.artplayer-video-player .artplayer-contextmenu .art-menu{cursor:pointer;font-size:13px;display:block;color:#fff;padding:7px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.artplayer-video-player .artplayer-contextmenu .art-menu a{color:#fff;text-decoration:none}.artplayer-video-player .artplayer-contextmenu .art-menu span{display:inline-block;padding:0 7px}.artplayer-video-player .artplayer-contextmenu .art-menu span.current,.artplayer-video-player .artplayer-contextmenu .art-menu span:hover{color:#00c9ff}.artplayer-video-player .artplayer-contextmenu .art-menu:hover{background-color:hsla(0,0%,100%,.1)}.artplayer-video-player .artplayer-contextmenu .art-menu:last-child{border-bottom:none}
|
||||
.artplayer-video-player .artplayer-info{display:none;position:absolute;left:10px;top:10px;z-index:90;width:350px;min-height:150px;padding:10px;color:#fff;font-size:12px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;background:rgba(0,0,0,.7)}.artplayer-video-player .artplayer-info .art-info-item{display:flex;margin-bottom:5px}.artplayer-video-player .artplayer-info .art-info-item .art-info-title{width:100px;text-align:right}.artplayer-video-player .artplayer-info .art-info-item .art-info-content{flex:1;padding-left:5px}.artplayer-video-player .artplayer-info .artplayer-info-close{position:absolute;top:5px;right:5px;cursor:pointer}
|
||||
.artplayer-video-player .artplayer-setting{display:none;position:absolute;z-index:80;left:0;top:0;height:100%;width:100%;align-items:center;justify-content:center;pointer-events:none}.artplayer-video-player .artplayer-setting .artplayer-setting-inner{position:relative;width:350px;height:250px;font-size:12px;background:rgba(0,0,0,.8);border-radius:3px;pointer-events:all;overflow:hidden}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body{overflow-x:hidden;overflow-y:auto;width:365px;height:100%}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting{border-bottom:1px solid hsla(0,0%,100%,.1);padding:12px 35px 12px 20px}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting .art-setting-header{color:#fff;margin-bottom:10px}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting .art-setting-body{color:hsla(0,0%,100%,.8)}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-close{position:absolute;top:0;right:0;width:20px;height:20px;line-height:20px;text-align:center;color:hsla(0,0%,100%,.8);background:rgba(0,0,0,.5);font-size:20px;cursor:pointer}
|
||||
.artplayer-video-player.artplayer-hide-cursor *{cursor:none!important}
|
||||
.artplayer-video-player[data-aspect-ratio] video{box-sizing:content-box;-o-object-fit:fill;object-fit:fill}
|
||||
.artplayer-video-player.artplayer-web-fullscreen{position:fixed;z-index:9999;width:100%;height:100%;left:0;top:0;right:0;bottom:0}
|
||||
.artplayer-video-player .artplayer-pip-header{display:none;position:absolute;z-index:100;left:0;top:0;right:0;height:35px;line-height:35px;color:#fff;background:rgba(0,0,0,.5);align-items:center;justify-content:space-between;opacity:0;visibility:hidden;transition:all .2s ease-in-out}.artplayer-video-player .artplayer-pip-header .artplayer-pip-title{flex:1;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:move}.artplayer-video-player .artplayer-pip-header .artplayer-pip-close{width:35px;text-align:center;font-size:22px;cursor:pointer}.artplayer-video-player.is-dragging{opacity:.7}.artplayer-video-player.artplayer-pip{position:fixed;right:20px;bottom:20px;width:400px;height:225px;box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2)}.artplayer-video-player.artplayer-pip .artplayer-pip-header{display:flex}.artplayer-video-player.artplayer-pip.artplayer-hover .artplayer-pip-header{opacity:1;visibility:visible}.artplayer-video-player.artplayer-pip .artplayer-mask{align-items:center;justify-content:center}.artplayer-video-player.artplayer-pip .artplayer-mask .art-icon-playBig{position:static}.artplayer-video-player.artplayer-pip .artplayer-bottom,.artplayer-video-player.artplayer-pip .artplayer-contextmenu,.artplayer-video-player.artplayer-pip .artplayer-danmu,.artplayer-video-player.artplayer-pip .artplayer-info,.artplayer-video-player.artplayer-pip .artplayer-layers,.artplayer-video-player.artplayer-pip .artplayer-notice,.artplayer-video-player.artplayer-pip .artplayer-setting,.artplayer-video-player.artplayer-pip .artplayer-subtitle{display:none!important}
|
||||
button[data-balloon]{overflow:visible}[data-balloon]{position:relative;cursor:pointer}[data-balloon]:after{font-family:sans-serif!important;font-weight:400!important;font-style:normal!important;text-shadow:none!important;font-size:12px!important;background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(data-balloon);padding:.5em 1em;white-space:nowrap}[data-balloon]:after,[data-balloon]:before{filter:alpha(opactiy=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-moz-opacity:0;-khtml-opacity:0;opacity:0;pointer-events:none;transition:all .18s ease-out .18s;position:absolute;z-index:10}[data-balloon]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;content:""}[data-balloon]:hover:after,[data-balloon]:hover:before,[data-balloon][data-balloon-visible]:after,[data-balloon][data-balloon-visible]:before{filter:alpha(opactiy=100);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";-moz-opacity:1;-khtml-opacity:1;opacity:1;pointer-events:auto}[data-balloon].font-awesome:after{font-family:FontAwesome}[data-balloon][data-balloon-break]:after{white-space:pre}[data-balloon][data-balloon-blunt]:after,[data-balloon][data-balloon-blunt]:before{transition:none}[data-balloon][data-balloon-pos=up]:after{margin-bottom:11px}[data-balloon][data-balloon-pos=up]:after,[data-balloon][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up]:before{margin-bottom:5px}[data-balloon][data-balloon-pos=up]:hover:after,[data-balloon][data-balloon-pos=up]:hover:before,[data-balloon][data-balloon-pos=up][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=up-left]:after{left:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-left]:after,[data-balloon][data-balloon-pos=up-left]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-left]:before{left:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-left]:hover:after,[data-balloon][data-balloon-pos=up-left]:hover:before,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=up-right]:after{right:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-right]:after,[data-balloon][data-balloon-pos=up-right]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-right]:before{right:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-right]:hover:after,[data-balloon][data-balloon-pos=up-right]:hover:before,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down]:after{margin-top:11px}[data-balloon][data-balloon-pos=down]:after,[data-balloon][data-balloon-pos=down]:before{left:50%;top:100%;-webkit-transform:translate(-50%,-10px);transform:translate(-50%,-10px)}[data-balloon][data-balloon-pos=down]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;margin-top:5px}[data-balloon][data-balloon-pos=down]:hover:after,[data-balloon][data-balloon-pos=down]:hover:before,[data-balloon][data-balloon-pos=down][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=down-left]:after{left:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;left:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]Line truncated
|
||||
@@ -1,8 +1,8 @@
|
||||
/*!
|
||||
* ArtPlayer.js v1.0.0
|
||||
* artplayer.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2018 Harvey Zack
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.artplayer={})}(this,function(t){"use strict";var Ot=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var r=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t,e){return t(e={exports:{}},e.exports),e.exports}var l=e(function(e){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=i=function(t){return n(t)}:e.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":n(t)},i(t)}e.exports=i});var a=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var s=function(t,e){return!e||"object"!==l(e)&&"function"!=typeof e?a(t):e},c=e(function(e){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n}),u=e(function(n){function i(t,e){return n.exports=i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}n.exports=i});var h=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)};var d=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var f=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(t){d(e,t,n[t])})}return e};var n=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}};var p=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var v=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var y=function(t){return n(t)||p(t)||v()};var m=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},g=e(function(i){function r(t,e,n){return!function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}()?i.exports=r=function(t,e,n){var i=[null];i.push.apply(i,e);var r=new(Function.bind.apply(t,i));return n&&u(r,n.prototype),r}:i.exports=r=Reflect.construct,r.apply(null,arguments)}i.exports=r}),b=function(t){function i(t,e){var n;return Ot(this,i),n=s(this,c(i).call(this,t)),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(a(a(n)),e||n.constructor),n.name="ArtPlayerError",n}return h(i,t),i}(e(function(e){function i(t){var n="function"==typeof Map?new Map:void 0;return e.exports=i=function(t){if(null===t||!m(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return g(t,arguments,c(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),u(e,t)},i(t)}e.exports=i})(Error));function w(t,e){var n="function"==typeof t;if(n?!n():!t)throw new b(e)}function jt(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}function x(t){return t.includes("?")?x(t.split("?")[0]):t.includes("#")?x(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function At(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",e),t.lastElementChild}function $(t,e,n){var i=Array.from(t.children);e.dataset.index=n;var r=i.find(function(t){return Number(t.dataset.index)>=Number(n)});return r?r.insertAdjacentElement("beforebegin",e):At(t,e),e}function Dt(t,e,n){return t.style[e]=n,t}function k(e,n){return Object.keys(n).forEach(function(t){Dt(e,t,n[t])}),e}function Ht(t){var e=Math.floor(t/3600),n=Math.floor((t-3600*e)/60),i=Math.floor(t-3600*e-60*n);return(0<e?[e,n,i]:[n,i]).map(function(t){return t<10?"0".concat(t):String(t)}).join(":")}function E(){for(var t=function(t){return null!==t&&"object"===l(t)},e={},n=arguments.length,Line truncated
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Artplayer=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var n=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var o=r((function(t){function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(n)}t.exports=e}));var i=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?i(t):e},s=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),c=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)};function u(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}u(".art-video-player{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;margin:0 auto;z-index:10;width:100%;height:100%;outline:0;zoom:1;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none}.art-video-player *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.5}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player>object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:rgba(0,0,0,.7)!important}}");u(".art-video-player .art-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;cursor:pointer}");u(".art-video-player .art-subtitle{display:none;position:absolute;z-index:20;bottom:40px;width:100%;padding:0 20px;text-align:center;color:#fff;font-size:20px;pointer-events:none;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.art-video-player .art-subtitle p{margin:5px 0}.art-video-player.art-subtitle-show .art-subtitle{display:block}");u(".art-video-player .art-danmuku{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}");u(".art-video-player .art-layers{display:none;position:absolute;z-index:40;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}");u(".art-video-player .art-mask{display:none;z-index:50;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-mask,.art-video-player .art-mask .art-state{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute}.art-video-player .art-mask .art-state{right:30px;bottom:55px;width:60px;height:60px;opacity:Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
artplayer.org
|
||||
@@ -0,0 +1,346 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
/* Set height, width, borders, and global font properties here */
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0; /* Vertical padding around content */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
padding: 0 4px; /* Horizontal padding of content */
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.CodeMirror-linenumbers {}
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker { color: black; }
|
||||
.CodeMirror-guttermarker-subtle { color: #999; }
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% { background-color: transparent; }
|
||||
100% {}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab { display: inline-block; text-decoration: inherit; }
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: -50px; bottom: -20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0; bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default .cm-header {color: blue;}
|
||||
.cm-s-default .cm-quote {color: #090;}
|
||||
.cm-negative {color: #d44;}
|
||||
.cm-positive {color: #292;}
|
||||
.cm-header, .cm-strong {font-weight: bold;}
|
||||
.cm-em {font-style: italic;}
|
||||
.cm-link {text-decoration: underline;}
|
||||
.cm-strikethrough {text-decoration: line-through;}
|
||||
|
||||
.cm-s-default .cm-keyword {color: #708;}
|
||||
.cm-s-default .cm-atom {color: #219;}
|
||||
.cm-s-default .cm-number {color: #164;}
|
||||
.cm-s-default .cm-def {color: #00f;}
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
.cm-s-default .cm-variable-2 {color: #05a;}
|
||||
.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
|
||||
.cm-s-default .cm-comment {color: #a50;}
|
||||
.cm-s-default .cm-string {color: #a11;}
|
||||
.cm-s-default .cm-string-2 {color: #f50;}
|
||||
.cm-s-default .cm-meta {color: #555;}
|
||||
.cm-s-default .cm-qualifier {color: #555;}
|
||||
.cm-s-default .cm-builtin {color: #30a;}
|
||||
.cm-s-default .cm-bracket {color: #997;}
|
||||
.cm-s-default .cm-tag {color: #170;}
|
||||
.cm-s-default .cm-attribute {color: #00c;}
|
||||
.cm-s-default .cm-hr {color: #999;}
|
||||
.cm-s-default .cm-link {color: #00c;}
|
||||
|
||||
.cm-s-default .cm-error {color: #f00;}
|
||||
.cm-invalidchar {color: #f00;}
|
||||
|
||||
.CodeMirror-composing { border-bottom: 2px solid; }
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
|
||||
.CodeMirror-activeline-background {background: #e8f2ff;}
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the editor. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .CodeMirror */
|
||||
margin-bottom: -30px; margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0; top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0; left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0; bottom: 0;
|
||||
}
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute; left: 0; top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0; bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
.CodeMirror pre {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
.CodeMirror-wrap pre {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0; right: 0; top: 0; bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre { direction: rtl; }
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
.CodeMirror-measure pre { position: static; }
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected { background: #d9d9d9; }
|
||||
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
||||
.CodeMirror-crosshair { cursor: crosshair; }
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border { padding-right: .1px; }
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after { content: ''; }
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext { background: none; }
|
||||
@@ -0,0 +1 @@
|
||||
.consola-container{opacity:.9;display:flex;flex-direction:column;position:absolute;background-color:#242424}.consola-container.right{top:0;right:0;bottom:0;height:100%;width:0}.consola-container.bottom{left:0;right:0;bottom:0;width:100%;height:0}.consola-container .consola-tools{left:0;right:0;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;flex-direction:row;height:30px;padding:0 10px;color:hsla(0,0%,100%,.8);background-color:#141618;border-bottom:1px solid rgba(0,0,0,.3);font-size:12px;box-sizing:border-box}.consola-container .consola-tools .consola-clean{cursor:pointer}.consola-container .consola-wrap{flex:1;position:relative;z-index:1;overflow-y:auto;word-break:break-word;box-sizing:border-box}.consola-container .consola-wrap .method.method-log{position:relative;display:flex;color:hsla(0,0%,100%,.9);background-color:transparent;border-top:1px solid hsla(0,0%,100%,.05);border-bottom:1px solid hsla(0,0%,100%,.05);margin-top:-1px;margin-bottom:0;padding-left:10px;box-sizing:border-box}.consola-container .consola-wrap .method.method-log .method-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABpSURBVChTY6A92LNnj96uXbvKoVzsYMeOHVbbt29/D1T4eP/+/QJQYVSwe/duD6CCr0B8A8iWgwqjAqBk2NatW38B6bPbtm0TBYkBFbsA+c9ANFgRCBCtEASAAoSthgGiPAMD2IOHgQEA521bM7uG52wAAAAASUVORK5CYII=)}.consola-container .consola-wrap .method.method-info{position:relative;display:flex;color:hsla(0,0%,100%,.9);background-color:transparent;border-top:1px solid hsla(0,0%,100%,.05);border-bottom:1px solid hsla(0,0%,100%,.05);margin-top:-1px;margin-bottom:0;padding-left:10px;box-sizing:border-box}.consola-container .consola-wrap .method.method-info .method-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADISURBVChTY4ABp/AztmZBZ07qe538rO114rOa8+GTskYHbKHSEOARd6nLIOTsf61gIA46U6kVePYQiK3uc/K/hPG+LrCi8IyrtkZh5yCKgk/80w46ba0RdGYGhH/2v6rXyf88qtttGVwSLp2ECQLxeiAu1wo6uwpJ7L+o2f6TDA6xZz8jCyqFnuHXCj4djywmZXHoM/EK0azGqhBsNYpngL6VCTnGqRF4xgKo+D5IDO4ZEEAKnjcQBafvqwWf/YoSPDCAP8AZGAC7mLM81zgOTQAAAABJRU5ErkJggg==)}.consola-container .consola-wrap .method.method-warn{position:relative;display:flex;color:#ffdc9e;background-color:#332b00;border-top:1px solid #650;border-bottom:1px solid #650;margin-top:-1px;margin-bottom:1px;padding-left:10px;box-sizing:border-box}.consola-container .consola-wrap .method.method-warn .method-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACkSURBVChTbY7BCoJQFERn0Q/3BX1JuxQjsSCXiV8gtCgxhCIrKIRIqKDVzXl5w5cNHBjm6eGinXiAXu5inY2xYm/mbpIh+vcFhLA3sx0athNUhymEsP+10lAEEA17x8o/9wFuNGnYuVlWve0SQl7P0sBu3aq2R1Q/1JzSkYGd29eqNv2wjdnUuvNRciC/N+qe+7gidbA8zyHkOINsvA/sumcOkjcabcBmw2+mMgAAAABJRU5ErkJggg==)}.consola-container .consola-wrap .method.method-error{position:relative;display:flex;color:#ff8080;background-color:#290000;border-top:1px solid #5b0000;border-bottom:1px solid #5b0000;margin-top:-1px;margin-bottom:1px;padding-left:10px;box-sizing:border-box}.consola-container .consola-wrap .method.method-error .method-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADESURBVChTY4CB7ZI8tmfU5E6e01b+DMIgNkgMKg0BR9Vkux6YWPx/bemIgkFiIDmwogOaqrYPzazAEm8DwuGKYGyQHEgNw0VT05Mwib9v3v7/kJEHxiA2TDFIDcNNU4vPMFPACj58/P/v40cwGyYOUsNwy8IZRSFIEUgxskKQGoZrzp4ErQapYbgYHG371M4dLACTQGaD5EBqwD6/FpzQ9dTBE64IhkFiIDmwIhi4mlJqey8o4eR9r8jPIAxig8QgsgwMAFZz1YtGPXgjAAAAAElFTkSuQmCC)}.consola-container .consola-wrap .method.method-debug{position:relative;display:flex;color:#4d88ff;background-color:transparent;border-top:1px solid hsla(0,0%,100%,.05);border-bottom:1px solid hsla(0,0%,100%,.05);margin-top:-1px;margin-bottom:0;padding-left:10px;box-sizing:border-box}.consola-container .consola-wrap .method.method-debug .method-icon{background-image:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 459 459'%3e%3cpath fill='%234D88FF' d='M433.5 127.5h-71.4a177.7 177.7 0 0 0-45.9-51L357 35.7 321.3 0l-56.1 56.1c-10.2-2.6-23-5.1-35.7-5.1s-25.5 2.5-35.7 5.1L137.7 0 102 35.7l40.8 40.8a177.7 177.7 0 0 0-45.9 51H25.5v51H79c-2.5 7.7-2.5 17.9-2.5 25.5v25.5h-51v51h51V306a88 88 0 0 0 2.5 25.5H25.5v51h71.4A152.2 152.2 0 0 0 229.5 459c56.1 0 107.1-30.6 132.6-76.5h71.4v-51H380c2.5-7.7 2.5-17.9 2.5-25.5v-25.5h51v-51h-51V204c0-7.7 0-17.9-2.5-25.5h53.5v-51zm-153 204h-102v-51h102v51zm0-102h-102v-51h102v51z'/%3e%3c/svg%3e")}.consola-container .consola-wrap .method *{vertical-align:top;box-sizing:border-box;font-family:Consolas,Lucida Console,Courier New,monospace;white-space:pre-wrap;font-size:12px}.consola-container .consola-wrap .method .method-icon{width:10px;height:18px;background-image:noneLine truncated
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
|
||||
Name: dracula
|
||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
||||
|
||||
Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters {
|
||||
background-color: #282a36 !important;
|
||||
color: #f8f8f2 !important;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-dracula .CodeMirror-gutters { color: #282a36; }
|
||||
.cm-s-dracula .CodeMirror-cursor { border-left: solid thin #f8f8f0; }
|
||||
.cm-s-dracula .CodeMirror-linenumber { color: #6D8A88; }
|
||||
.cm-s-dracula .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula span.cm-comment { color: #6272a4; }
|
||||
.cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 { color: #f1fa8c; }
|
||||
.cm-s-dracula span.cm-number { color: #bd93f9; }
|
||||
.cm-s-dracula span.cm-variable { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-variable-2 { color: white; }
|
||||
.cm-s-dracula span.cm-def { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-operator { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-keyword { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-atom { color: #bd93f9; }
|
||||
.cm-s-dracula span.cm-meta { color: #f8f8f2; }
|
||||
.cm-s-dracula span.cm-tag { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-attribute { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-qualifier { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-property { color: #66d9ef; }
|
||||
.cm-s-dracula span.cm-builtin { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-variable-3, .cm-s-dracula span.cm-type { color: #ffb86c; }
|
||||
|
||||
.cm-s-dracula .CodeMirror-activeline-background { background: rgba(255,255,255,0.1); }
|
||||
.cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.artplayer-app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
body,
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Hiragino Sans GB, Microsoft YaHei, \5fae\8f6f\96c5\9ed1, tahoma, arial, simsun, \5b8b\4f53;
|
||||
-webkit-text-size-adjust: 100% !important;
|
||||
-moz-text-size-adjust: 100% !important;
|
||||
-ms-text-size-adjust: 100% !important;
|
||||
text-size-adjust: 100% !important;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #ccc;
|
||||
background: rgb(16, 17, 19);
|
||||
}
|
||||
|
||||
*,
|
||||
:after,
|
||||
:before {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #ccc;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 13px;
|
||||
height: 48px;
|
||||
width: 100%;
|
||||
padding: 0 0 0 20px;
|
||||
border-bottom: 1px solid rgb(17, 21, 24);
|
||||
background-color: rgb(28, 32, 34);
|
||||
}
|
||||
|
||||
.header .menus {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header .menus .item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu:hover .sub-menu{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu .sub-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
top: 45px;
|
||||
left: 0;
|
||||
width: 200px;
|
||||
padding: 0 10px;
|
||||
background: #2b2b2b;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu .sub-menu ul {
|
||||
padding: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu .sub-menu li {
|
||||
display: block;
|
||||
list-style: none;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.header .menus .has-sub-menu .sub-menu li.title {
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.header .run {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
color: #f1fa8c;
|
||||
border-left: 1px solid rgb(17, 21, 24);
|
||||
background-color: rgb(39, 41, 54);
|
||||
}
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.main .part-left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 40%;
|
||||
border-right: 1px solid rgb(17, 21, 24);
|
||||
}
|
||||
|
||||
.main .part-left .libs {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.main .part-left .libsInput {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 5px 10px;
|
||||
outline: none;
|
||||
resize: none;
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
color: #ccc;
|
||||
border-bottom: 1px solid rgb(17, 21, 24);
|
||||
background-color: rgb(28, 32, 34);
|
||||
}
|
||||
|
||||
.main .part-left .code {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.main .part-left .code .codeMirrorWrap {
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
height: 100%;
|
||||
width: calc(100% + 30px);
|
||||
padding: 10px 30px 10px 0;
|
||||
}
|
||||
|
||||
.main .part-right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.part-right .video-wrap {
|
||||
display: flex;
|
||||
height: 70%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-bottom: 1px solid rgb(17, 21, 24);
|
||||
}
|
||||
|
||||
.part-right .video-wrap .artplayer-app {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
width: 90%;
|
||||
height: 65%;
|
||||
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.part-right .console {
|
||||
position: relative;
|
||||
height: 30%;
|
||||
}
|
||||
|
||||
.popups {
|
||||
display: none;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.popups .popinner {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
background: #2b2b2b;
|
||||
border-radius: 3px;
|
||||
padding: 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: contain;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
autoSize: true,
|
||||
localVideo: true,
|
||||
moreVideoAttr: {
|
||||
crossOrigin: 'anonymous',
|
||||
},
|
||||
controls: [
|
||||
{
|
||||
name: 'open',
|
||||
position: 'right',
|
||||
html: 'Local Video',
|
||||
mounted: $open => {
|
||||
art.plugins.localVideo.attach($open);
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [artplayerPluginBacklight],
|
||||
});
|
||||
@@ -0,0 +1,26 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
autoSize: true,
|
||||
moreVideoAttr: {
|
||||
crossOrigin: 'anonymous',
|
||||
},
|
||||
layers: [
|
||||
{
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
width: '200px',
|
||||
height: '200px',
|
||||
margin: '-100px 0 0 -100px',
|
||||
border: '1px solid rgba(255, 255, 255, 0.1)',
|
||||
},
|
||||
mounted($layer) {
|
||||
art.plugins.artplayerPluginBlur.attach($layer);
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [artplayerPluginBlur],
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
autoSize: true,
|
||||
setting: true,
|
||||
playbackRate: true,
|
||||
fullscreenWeb: true,
|
||||
plugins: [artplayerPluginDanmuku({
|
||||
danmuku: url + '/danmuku/your-name.xml',
|
||||
speed: 5,
|
||||
maxlength: 50,
|
||||
margin: [10, 100],
|
||||
opacity: 1,
|
||||
fontSize: 25,
|
||||
synchronousPlayback: false,
|
||||
})],
|
||||
});
|
||||
@@ -0,0 +1,40 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||
title: '【新海诚动画】『秒速5センチメートル』',
|
||||
autoSize: true,
|
||||
localVideo: true,
|
||||
moreVideoAttr: {
|
||||
crossOrigin: 'anonymous',
|
||||
},
|
||||
controls: [
|
||||
{
|
||||
name: 'gif',
|
||||
position: 'right',
|
||||
html: 'Create GIF',
|
||||
mounted: $gif => {
|
||||
art.plugins.artplayerPluginGif.attach($gif);
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'open',
|
||||
position: 'right',
|
||||
html: 'Local Video',
|
||||
mounted: $open => {
|
||||
art.plugins.localVideo.attach($open);
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [artplayerPluginGif],
|
||||
});
|
||||
|
||||
var $popups = document.querySelector('.popups');
|
||||
var $popinner = document.querySelector('.popinner');
|
||||
art.on('artplayerPluginGif', image => {
|
||||
$popups.style.display = 'flex';
|
||||
var animatedImage = document.createElement('img');
|
||||
animatedImage.src = image;
|
||||
$popinner.innerHTML = '';
|
||||
$popinner.appendChild(animatedImage);
|
||||
});
|
||||
@@ -0,0 +1,69 @@
|
||||
// 使用 Github Issues Api 做弹幕接口
|
||||
// 接口每小时限制 5000 次请求,勿滥用
|
||||
var danmuku = new ArtplayerToolGithub({
|
||||
api: 'zhw2590582/github-issues-api-as-danmuku/issues/1',
|
||||
clientID: '749a95aad589f8849abe',
|
||||
clientSecret: '7bb6fa67ef6e525e5bd5fda46cd3925ecc4a3760',
|
||||
});
|
||||
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
autoSize: true,
|
||||
controls: [
|
||||
{
|
||||
name: 'danmuku',
|
||||
position: 'right',
|
||||
html: '发送弹幕',
|
||||
click: () => {
|
||||
if (window.location.href.includes('code=')) {
|
||||
art.notice.show = '正在登陆中,请稍等!!!';
|
||||
} else if (!danmuku.isLogin) {
|
||||
danmuku.login();
|
||||
} else {
|
||||
var text = prompt('请输入:', '弹幕内容');
|
||||
if (!text || !text.trim()) return;
|
||||
if (text.length >= 20) {
|
||||
art.notice.show = '弹幕字数不能大于20字!!!';
|
||||
return;
|
||||
}
|
||||
if (danmuku.remaining <= 10) {
|
||||
art.notice.show = '接口请求到达上限,请稍后再试!!!';
|
||||
return;
|
||||
}
|
||||
art.notice.show = '弹幕发送中...';
|
||||
danmuku
|
||||
.send({
|
||||
text: text,
|
||||
time: art.player.currentTime,
|
||||
color: '#' + Math.floor(Math.random() * 0xffffff).toString(16),
|
||||
})
|
||||
.then(data => {
|
||||
art.notice.show = `发送弹幕成功: ${danmuku.remaining} / ${danmuku.limit}`;
|
||||
art.plugins.artplayerPluginDanmuku.emit({
|
||||
...data,
|
||||
mode: 0,
|
||||
time: art.player.currentTime + 0.2,
|
||||
border: data.color,
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
art.notice.show = `发送弹幕失败: ${danmuku.remaining} / ${danmuku.limit}`;
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
artplayerPluginDanmuku({
|
||||
danmuku: () => danmuku.load(),
|
||||
speed: 5,
|
||||
opacity: 1,
|
||||
color: '#fff',
|
||||
size: 25,
|
||||
maxlength: 50,
|
||||
margin: [10, 100],
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,116 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||
title: 'One More Time One More Chance',
|
||||
poster: url + '/image/one-more-time-one-more-chance-poster.jpg',
|
||||
volume: 0.5,
|
||||
isLive: false,
|
||||
muted: false,
|
||||
autoplay: false,
|
||||
pip: true,
|
||||
autoSize: true,
|
||||
screenshot: true,
|
||||
setting: true,
|
||||
loop: true,
|
||||
flip: true,
|
||||
playbackRate: true,
|
||||
aspectRatio: true,
|
||||
fullscreen: true,
|
||||
fullscreenWeb: true,
|
||||
subtitleOffset: true,
|
||||
miniProgressBar: true,
|
||||
localVideo: true,
|
||||
localSubtitle: true,
|
||||
networkMonitor: false,
|
||||
autoPip: true,
|
||||
mutex: true,
|
||||
backdrop: true,
|
||||
theme: '#ffad00',
|
||||
lang: navigator.language.toLowerCase(),
|
||||
moreVideoAttr: {
|
||||
crossOrigin: 'anonymous',
|
||||
},
|
||||
contextmenu: [
|
||||
{
|
||||
html: 'Custom menu',
|
||||
click: function(contextmenu) {
|
||||
console.info('You clicked on the custom menu');
|
||||
contextmenu.show = false;
|
||||
},
|
||||
},
|
||||
],
|
||||
layers: [
|
||||
{
|
||||
html: `<img style="width: 100px" src="${url}/image/your-name.png">`,
|
||||
click: function() {
|
||||
console.info('You clicked on the custom layer');
|
||||
},
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '20px',
|
||||
right: '20px',
|
||||
opacity: '.9',
|
||||
},
|
||||
},
|
||||
],
|
||||
quality: [
|
||||
{
|
||||
default: true,
|
||||
name: 'SD 480P',
|
||||
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||
},
|
||||
{
|
||||
name: 'HD 720P',
|
||||
url: url + '/video/one-more-time-one-more-chance-720p.mp4',
|
||||
},
|
||||
],
|
||||
thumbnails: {
|
||||
url: url + '/image/one-more-time-one-more-chance-thumbnails.png',
|
||||
number: 100,
|
||||
width: 160,
|
||||
height: 90,
|
||||
column: 10,
|
||||
},
|
||||
subtitle: {
|
||||
url: url + '/subtitle/one-more-time-one-more-chance.srt',
|
||||
style: {
|
||||
color: '#03A9F4',
|
||||
},
|
||||
},
|
||||
highlight: [
|
||||
{
|
||||
time: 60,
|
||||
text: 'One more chance',
|
||||
},
|
||||
{
|
||||
time: 120,
|
||||
text: '谁でもいいはずなのに',
|
||||
},
|
||||
{
|
||||
time: 180,
|
||||
text: '夏の想い出がまわる',
|
||||
},
|
||||
{
|
||||
time: 240,
|
||||
text: 'こんなとこにあるはずもないのに',
|
||||
},
|
||||
{
|
||||
time: 300,
|
||||
text: '终わり',
|
||||
},
|
||||
],
|
||||
controls: [
|
||||
{
|
||||
position: 'right',
|
||||
html: 'Control',
|
||||
click: function() {
|
||||
console.info('You clicked on the custom control');
|
||||
},
|
||||
},
|
||||
],
|
||||
icons: {
|
||||
loading: '<img src="./assets/img/ploading.gif">',
|
||||
state: '<img src="./assets/img/state.png">',
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,45 @@
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/your-name.mp4',
|
||||
poster: url + '/image/one-more-time-one-more-chance-poster.jpg',
|
||||
autoSize: true,
|
||||
controls: [
|
||||
{
|
||||
name: 'playlist',
|
||||
position: 'right',
|
||||
html: 'Playlist',
|
||||
click: () => {
|
||||
art.plugins.artplayerPluginPlaylist.show();
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'prev',
|
||||
position: 'right',
|
||||
html: 'Prev',
|
||||
click: () => {
|
||||
art.plugins.artplayerPluginPlaylist.prev();
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'next',
|
||||
position: 'right',
|
||||
html: 'Next',
|
||||
click: () => {
|
||||
art.plugins.artplayerPluginPlaylist.next();
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
artplayerPluginPlaylist([
|
||||
{
|
||||
title: 'Your name',
|
||||
url: url + '/video/your-name.mp4',
|
||||
},
|
||||
{
|
||||
title: 'One more time one more chance',
|
||||
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||
},
|
||||
]),
|
||||
],
|
||||
});
|
||||
@@ -0,0 +1,62 @@
|
||||
var $popups = document.querySelector('.popups');
|
||||
var $popinner = document.querySelector('.popinner');
|
||||
var $artplayer = document.querySelector('.artplayer-app');
|
||||
|
||||
$artplayer.innerHTML = 'Drop video file here or click to upload.';
|
||||
var thumbnail = new ArtplayerToolThumbnail({
|
||||
fileInput: $artplayer,
|
||||
delay: 300, // 延迟
|
||||
number: 60, // 数量
|
||||
width: 160, // 宽度
|
||||
height: 90, // 高度
|
||||
column: 10, // 列数
|
||||
});
|
||||
|
||||
thumbnail.on('file', function(file) {
|
||||
console.log('Read video successfully: ' + file.name);
|
||||
});
|
||||
|
||||
thumbnail.on('video', function(video) {
|
||||
console.log('Video size: ' + video.videoWidth + ' x ' + video.videoHeight);
|
||||
console.log('Video duration: ' + video.duration + 's');
|
||||
thumbnail.start();
|
||||
});
|
||||
|
||||
thumbnail.on('canvas', function(canvas) {
|
||||
console.log('Build canvas successfully');
|
||||
console.log('Canvas size: ' + canvas.width + ' x ' + canvas.height);
|
||||
console.log('Preview density: ' + thumbnail.density + ' p/s');
|
||||
});
|
||||
|
||||
thumbnail.on('update', function(url, percentage) {
|
||||
console.log('Processing: ' + Math.floor(percentage.toFixed(2) * 100) + '%');
|
||||
$popups.style.display = 'flex';
|
||||
$popinner.style.backgroundImage = 'url(' + url + ')';
|
||||
});
|
||||
|
||||
thumbnail.on('download', function(name) {
|
||||
console.log('Start download preview: ' + name);
|
||||
});
|
||||
|
||||
thumbnail.on('done', function() {
|
||||
$popups.style.display = 'none';
|
||||
thumbnail.download();
|
||||
console.log('Build preview image complete');
|
||||
Artplayer.instances.forEach(function(art) {
|
||||
art.destroy(true);
|
||||
});
|
||||
|
||||
new Artplayer({
|
||||
container: $artplayer,
|
||||
url: thumbnail.videoUrl,
|
||||
poster: thumbnail.thumbnailUrl,
|
||||
thumbnails: {
|
||||
url: thumbnail.thumbnailUrl,
|
||||
number: thumbnail.option.number,
|
||||
width: thumbnail.option.width,
|
||||
height: thumbnail.option.height,
|
||||
column: thumbnail.option.column,
|
||||
},
|
||||
});
|
||||
console.log('Build player complete');
|
||||
});
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 15 KiB |
@@ -0,0 +1,183 @@
|
||||
(function() {
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
if (isMobile) {
|
||||
window.location.href = './mobile.html';
|
||||
return;
|
||||
}
|
||||
|
||||
var $codeMirror = document.querySelector('.codeMirrorWrap');
|
||||
var $lib = document.querySelector('.libsInput');
|
||||
var $run = document.querySelector('.run');
|
||||
var $popups = document.querySelector('.popups');
|
||||
var loaddLib = [];
|
||||
|
||||
consola.creat({
|
||||
target: '.console',
|
||||
size: '100%',
|
||||
zIndex: 99,
|
||||
});
|
||||
|
||||
var mirror = CodeMirror($codeMirror, {
|
||||
lineNumbers: true,
|
||||
mode: 'javascript',
|
||||
matchBrackets: true,
|
||||
styleActiveLine: true,
|
||||
theme: 'dracula',
|
||||
value: '',
|
||||
});
|
||||
|
||||
function initArt(art) {
|
||||
Artplayer.config.events.forEach(function(item) {
|
||||
art && art.on('video:' + item, function(event) {
|
||||
console.log('video: ' + event.type);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getURLParameters(url) {
|
||||
return (url.match(/([^?=&]+)(=([^&]*))/g) || []).reduce(function(a, v) {
|
||||
return (a[v.slice(0, v.indexOf('='))] = v.slice(v.indexOf('=') + 1)), a;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function getExt(url) {
|
||||
if (url.includes('?')) {
|
||||
return getExt(url.split('?')[0]);
|
||||
}
|
||||
|
||||
if (url.includes('#')) {
|
||||
return getExt(url.split('#')[0]);
|
||||
}
|
||||
|
||||
return url
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.split('.')
|
||||
.pop();
|
||||
}
|
||||
|
||||
function loadScript(url) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = url;
|
||||
script.onload = function() {
|
||||
resolve(url);
|
||||
};
|
||||
script.onerror = function() {
|
||||
reject(new Error('Loading script failed:' + url));
|
||||
};
|
||||
document.querySelector('head').appendChild(script);
|
||||
});
|
||||
}
|
||||
|
||||
function loadStyle(url) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'stylesheet';
|
||||
link.href = url;
|
||||
link.onload = function() {
|
||||
resolve(url);
|
||||
};
|
||||
link.onerror = function() {
|
||||
reject(new Error('Loading style failed:' + url));
|
||||
};
|
||||
document.querySelector('head').appendChild(link);
|
||||
});
|
||||
}
|
||||
|
||||
function loadLib(libs) {
|
||||
var libPromise = [];
|
||||
var libsDecode = decodeURIComponent(libs || '');
|
||||
libsDecode
|
||||
.split(/\r?\n/)
|
||||
.filter(function(url) {
|
||||
return !loaddLib.includes(url);
|
||||
})
|
||||
.forEach(function(url) {
|
||||
var ext = getExt(url);
|
||||
if (ext === 'js') {
|
||||
libPromise.push(loadScript(url));
|
||||
} else if (ext === 'css') {
|
||||
libPromise.push(loadStyle(url));
|
||||
}
|
||||
});
|
||||
$lib.value = libsDecode;
|
||||
return Promise.all(libPromise);
|
||||
}
|
||||
|
||||
function runExample(name) {
|
||||
fetch(`./assets/example/${name}.js`)
|
||||
.then(function(response) {
|
||||
return response.text();
|
||||
})
|
||||
.then(function(text) {
|
||||
mirror.setValue(text);
|
||||
runCode();
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.error(err.message);
|
||||
});
|
||||
}
|
||||
|
||||
function loadCode(code, example) {
|
||||
if (example) {
|
||||
runExample(example);
|
||||
} else if (code) {
|
||||
mirror.setValue(decodeURIComponent(code).trim());
|
||||
runCode();
|
||||
} else {
|
||||
runExample('index');
|
||||
}
|
||||
}
|
||||
|
||||
function runCode() {
|
||||
Artplayer.instances.forEach(function(art) {
|
||||
art.destroy(true);
|
||||
});
|
||||
var code = mirror.getValue();
|
||||
eval(code);
|
||||
initArt(Artplayer.instances[0]);
|
||||
console.info('Player initialization completed');
|
||||
}
|
||||
|
||||
function initApp() {
|
||||
var _getURLParameters = getURLParameters(window.location.href),
|
||||
code = _getURLParameters.code,
|
||||
libs = _getURLParameters.libs;
|
||||
example = _getURLParameters.example;
|
||||
|
||||
loadLib(libs)
|
||||
.then(function(result) {
|
||||
loaddLib = loaddLib.concat(result);
|
||||
loadCode(code, example);
|
||||
})
|
||||
.catch(function(err) {
|
||||
console.error(err.message);
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('error', function(err) {
|
||||
console.error(err.message);
|
||||
});
|
||||
|
||||
window.addEventListener('unhandledrejection', function(err) {
|
||||
console.error(err.message);
|
||||
});
|
||||
|
||||
$run.addEventListener('click', function(e) {
|
||||
var libs = encodeURIComponent($lib.value);
|
||||
var code = encodeURIComponent(mirror.getValue());
|
||||
var url = window.location.origin + window.location.pathname + '?libs=' + libs + '&code=' + code;
|
||||
history.pushState(null, null, url);
|
||||
initApp();
|
||||
});
|
||||
|
||||
$popups.addEventListener('click', function (e) {
|
||||
if (e.target === this) {
|
||||
this.style.display = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
initApp();
|
||||
})();
|
||||
@@ -0,0 +1 @@
|
||||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},r=c(n(1));n(2);var i=c(n(4));function c(e){return e&&e.__esModule?e:{default:e}}var l={},u={target:"body",position:"bottom",size:"300px",zIndex:99},a=["log","warn","error","info","debug"],s=void 0,f=void 0,d=void 0;l.creat=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e=o({},u,e),!document.querySelector(".consola-container"))return s=document.querySelector(e.target),i.default.insertHtml(s,"beforeend",'<div class="consola-container '+e.position+'" style="z-index: '+e.zIndex+"; "+("bottom"===e.position?"height":"width")+": "+e.size+'">\n <div class="consola-tools">\n <div class="consola-count">Console <span>0</span></div>\n <div class="consola-clean">Clean</div>\n </div>\n <div class="consola-wrap"></div>\n </div>'),f=s.querySelector(".consola-wrap"),d=s.querySelector(".consola-count span"),s.querySelector(".consola-clean").addEventListener("click",l.clean),function(e,t,n){var o=function(t){var o=e[t];e[t]=function(){o.apply(this,arguments),n(t,[].concat(Array.prototype.slice.call(arguments)))}},r=!0,i=!1,c=void 0;try{for(var l,u=t[Symbol.iterator]();!(r=(l=u.next()).done);r=!0){o(l.value)}}catch(e){i=!0,c=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw c}}}(window.console,a,function(e,t){i.default.insertHtml(f,"beforeend",'<div data-method="'+e+'" class="method method-'+e+'">\n <div class="method-icon"></div>\n <div class="method-text">'+function(e){var t=document.createElement("div");e=e.map(function(e){return(0,r.default)(e)}),t.textContent=e;var n=t.innerHTML;return t=null,n}(t)+"</div>\n </div>"),d.innerHTML=f.children.length,f.scrollTo(0,f.scrollHeight)}),l},l.clean=function(){return f.innerHTML="",d.innerHTML="0",l},window.consola=l,e.exports=l},function(e,t){e.exports=function e(t){switch(typeof t){case"undefined":return"undefined";case"object":let n=Object.prototype.toString.call(t).slice(8,-1).toLowerCase();switch(n){case"null":return"null";case"array":return"["+t.map(t=>e(t)).join(", ")+"]";case"object":return"{ "+Object.keys(t).map(n=>n+": "+e(t[n])).join(", ")+" }";default:try{return t.toString()}catch(e){return"[Unknown type: "+n+"]"}}default:return t.toString()}}},function(e,t,n){},,function(e,t,n){"use strict";function o(e){for(var t=e.length,n=[],o=0;o<t;o+=1)n.push(e[o]);return n}e.exports={select:function(e){return document.querySelector(e)},selectAll:function(e){return o((arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelectorAll(e))},find:function(e,t){return o(e.querySelectorAll(t))},removeClass:function(e,t){e.classList.remove(t)},addClass:function(e,t){e.classList.add(t)},hasClass:function(e,t){return e.classList.contains(t)},removeElement:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},closest:function(e,t){for(var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;e&&!n.call(e,t);)e=e.parentElement;return e},getStyle:function(e,t,n){var o=window.getComputedStyle(e,null).getPropertyValue(t);return n?Number.parseFloat(o,10):o},blur:function(){document.activeElement&&document.activeElement.blur()},insertHtml:function(e,t,n){var o=["beforebegin","afterbegin","beforeend","afterend"];if(!o.includes(t))throw new TypeError("'position' must be one of them: "+o.join("、"));e.insertAdjacentHTML(t,n)},setAttributes:function(e,t){Object.keys(t).forEach(function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)})},setStyles:function(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}}}])});
|
||||
@@ -0,0 +1,899 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
var jsonldMode = parserConfig.jsonld;
|
||||
var jsonMode = parserConfig.json || jsonldMode;
|
||||
var isTS = parserConfig.typescript;
|
||||
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
|
||||
|
||||
// Tokenizer
|
||||
|
||||
var keywords = function(){
|
||||
function kw(type) {return {type: type, style: "keyword"};}
|
||||
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d");
|
||||
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
||||
|
||||
return {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C,
|
||||
"debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C,
|
||||
"await": C
|
||||
};
|
||||
}();
|
||||
|
||||
var isOperatorChar = /[+\-*&%=<>!?|~^@]/;
|
||||
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
|
||||
|
||||
function readRegexp(stream) {
|
||||
var escaped = false, next, inSet = false;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped) {
|
||||
if (next == "/" && !inSet) return;
|
||||
if (next == "[") inSet = true;
|
||||
else if (inSet && next == "]") inSet = false;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
}
|
||||
|
||||
// Used as scratch variables to communicate multiple values without
|
||||
// consing up tons of objects.
|
||||
var type, content;
|
||||
function ret(tp, style, cont) {
|
||||
type = tp; content = cont;
|
||||
return style;
|
||||
}
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '"' || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
|
||||
return ret("number", "number");
|
||||
} else if (ch == "." && stream.match("..")) {
|
||||
return ret("spread", "meta");
|
||||
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
return ret(ch);
|
||||
} else if (ch == "=" && stream.eat(">")) {
|
||||
return ret("=>", "operator");
|
||||
} else if (ch == "0" && stream.match(/^(?:x[\da-f]+|o[0-7]+|b[01]+)n?/i)) {
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:n|(?:\.\d*)?(?:[eE][+\-]?\d+)?)?/);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
} else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
} else if (expressionAllowed(stream, state, 1)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
} else {
|
||||
stream.eat("=");
|
||||
return ret("operator", "operator", stream.current());
|
||||
}
|
||||
} else if (ch == "`") {
|
||||
state.tokenize = tokenQuasi;
|
||||
return tokenQuasi(stream, state);
|
||||
} else if (ch == "#") {
|
||||
stream.skipToEnd();
|
||||
return ret("error", "error");
|
||||
} else if (isOperatorChar.test(ch)) {
|
||||
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
||||
if (stream.eat("=")) {
|
||||
if (ch == "!" || ch == "=") stream.eat("=")
|
||||
} else if (/[<>*+\-]/.test(ch)) {
|
||||
stream.eat(ch)
|
||||
if (ch == ">") stream.eat(ch)
|
||||
}
|
||||
}
|
||||
return ret("operator", "operator", stream.current());
|
||||
} else if (wordRE.test(ch)) {
|
||||
stream.eatWhile(wordRE);
|
||||
var word = stream.current()
|
||||
if (state.lastType != ".") {
|
||||
if (keywords.propertyIsEnumerable(word)) {
|
||||
var kw = keywords[word]
|
||||
return ret(kw.type, kw.style, word)
|
||||
}
|
||||
if (word == "async" && stream.match(/^(\s|\/\*.*?\*\/)*[\[\(\w]/, false))
|
||||
return ret("async", "keyword", word)
|
||||
}
|
||||
return ret("variable", "variable", word)
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, next;
|
||||
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
|
||||
state.tokenize = tokenBase;
|
||||
return ret("jsonld-keyword", "meta");
|
||||
}
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == quote && !escaped) break;
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
if (!escaped) state.tokenize = tokenBase;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
|
||||
function tokenQuasi(stream, state) {
|
||||
var escaped = false, next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
return ret("quasi", "string-2", stream.current());
|
||||
}
|
||||
|
||||
var brackets = "([{}])";
|
||||
// This is a crude lookahead trick to try and notice that we're
|
||||
// parsing the argument patterns for a fat-arrow function before we
|
||||
// actually hit the arrow token. It only works if the arrow is on
|
||||
// the same line as the arguments and there's no strange noise
|
||||
// (comments) in between. Fallback is to only notice when we hit the
|
||||
// arrow, and not declare the arguments as locals for the arrow
|
||||
// body.
|
||||
function findFatArrow(stream, state) {
|
||||
if (state.fatArrowAt) state.fatArrowAt = null;
|
||||
var arrow = stream.string.indexOf("=>", stream.start);
|
||||
if (arrow < 0) return;
|
||||
|
||||
if (isTS) { // Try to skip TypeScript return type declarations after the arguments
|
||||
var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow))
|
||||
if (m) arrow = m.index
|
||||
}
|
||||
|
||||
var depth = 0, sawSomething = false;
|
||||
for (var pos = arrow - 1; pos >= 0; --pos) {
|
||||
var ch = stream.string.charAt(pos);
|
||||
var bracket = brackets.indexOf(ch);
|
||||
if (bracket >= 0 && bracket < 3) {
|
||||
if (!depth) { ++pos; break; }
|
||||
if (--depth == 0) { if (ch == "(") sawSomething = true; break; }
|
||||
} else if (bracket >= 3 && bracket < 6) {
|
||||
++depth;
|
||||
} else if (wordRE.test(ch)) {
|
||||
sawSomething = true;
|
||||
} else if (/["'\/]/.test(ch)) {
|
||||
return;
|
||||
} else if (sawSomething && !depth) {
|
||||
++pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sawSomething && !depth) state.fatArrowAt = pos;
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
|
||||
|
||||
function JSLexical(indented, column, type, align, prev, info) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.prev = prev;
|
||||
this.info = info;
|
||||
if (align != null) this.align = align;
|
||||
}
|
||||
|
||||
function inScope(state, varname) {
|
||||
for (var v = state.localVars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
for (var cx = state.context; cx; cx = cx.prev) {
|
||||
for (var v = cx.vars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
}
|
||||
}
|
||||
|
||||
function parseJS(state, style, type, content, stream) {
|
||||
var cc = state.cc;
|
||||
// Communicate our context to the combinators.
|
||||
// (Less wasteful than consing up a hundred closures on every call.)
|
||||
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
|
||||
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = true;
|
||||
|
||||
while(true) {
|
||||
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
|
||||
if (combinator(type, content)) {
|
||||
while(cc.length && cc[cc.length - 1].lex)
|
||||
cc.pop()();
|
||||
if (cx.marked) return cx.marked;
|
||||
if (type == "variable" && inScope(state, content)) return "variable-2";
|
||||
return style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combinator utils
|
||||
|
||||
var cx = {state: null, column: null, marked: null, cc: null};
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function inList(name, list) {
|
||||
for (var v = list; v; v = v.next) if (v.name == name) return true
|
||||
return false;
|
||||
}
|
||||
function register(varname) {
|
||||
var state = cx.state;
|
||||
cx.marked = "def";
|
||||
if (state.context) {
|
||||
if (state.lexical.info == "var" && state.context && state.context.block) {
|
||||
// FIXME function decls are also not block scoped
|
||||
var newContext = registerVarScoped(varname, state.context)
|
||||
if (newContext != null) {
|
||||
state.context = newContext
|
||||
return
|
||||
}
|
||||
} else if (!inList(varname, state.localVars)) {
|
||||
state.localVars = new Var(varname, state.localVars)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Fall through means this is global
|
||||
if (parserConfig.globalVars && !inList(varname, state.globalVars))
|
||||
state.globalVars = new Var(varname, state.globalVars)
|
||||
}
|
||||
function registerVarScoped(varname, context) {
|
||||
if (!context) {
|
||||
return null
|
||||
} else if (context.block) {
|
||||
var inner = registerVarScoped(varname, context.prev)
|
||||
if (!inner) return null
|
||||
if (inner == context.prev) return context
|
||||
return new Context(inner, context.vars, true)
|
||||
} else if (inList(varname, context.vars)) {
|
||||
return context
|
||||
} else {
|
||||
return new Context(context.prev, new Var(varname, context.vars), false)
|
||||
}
|
||||
}
|
||||
|
||||
function isModifier(name) {
|
||||
return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly"
|
||||
}
|
||||
|
||||
// Combinators
|
||||
|
||||
function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block }
|
||||
function Var(name, next) { this.name = name; this.next = next }
|
||||
|
||||
var defaultVars = new Var("this", new Var("arguments", null))
|
||||
function pushcontext() {
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, false)
|
||||
cx.state.localVars = defaultVars
|
||||
}
|
||||
function pushblockcontext() {
|
||||
cx.state.context = new Context(cx.state.context, cx.state.localVars, true)
|
||||
cx.state.localVars = null
|
||||
}
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars
|
||||
cx.state.context = cx.state.context.prev
|
||||
}
|
||||
popcontext.lex = true
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
if (state.lexical.type == "stat") indent = state.lexical.indented;
|
||||
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
|
||||
indent = outer.indented;
|
||||
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
||||
};
|
||||
result.lex = true;
|
||||
return result;
|
||||
}
|
||||
function poplex() {
|
||||
var state = cx.state;
|
||||
if (state.lexical.prev) {
|
||||
if (state.lexical.type == ")")
|
||||
state.indented = state.lexical.indented;
|
||||
state.lexical = state.lexical.prev;
|
||||
}
|
||||
}
|
||||
poplex.lex = true;
|
||||
|
||||
function expect(wanted) {
|
||||
function exp(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass();
|
||||
else return cont(exp);
|
||||
};
|
||||
return exp;
|
||||
}
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
||||
if (type == "debugger") return cont(expect(";"));
|
||||
if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
cx.state.cc.pop()();
|
||||
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
|
||||
}
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
||||
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), className, poplex); }
|
||||
if (type == "variable") {
|
||||
if (isTS && value == "declare") {
|
||||
cx.marked = "keyword"
|
||||
return cont(statement)
|
||||
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
|
||||
cx.marked = "keyword"
|
||||
if (value == "enum") return cont(enumdef);
|
||||
else if (value == "type") return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
|
||||
else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex)
|
||||
} else if (isTS && value == "namespace") {
|
||||
cx.marked = "keyword"
|
||||
return cont(pushlex("form"), expression, block, poplex)
|
||||
} else if (isTS && value == "abstract") {
|
||||
cx.marked = "keyword"
|
||||
return cont(statement)
|
||||
} else {
|
||||
return cont(pushlex("stat"), maybelabel);
|
||||
}
|
||||
}
|
||||
if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext,
|
||||
block, poplex, poplex, popcontext);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
|
||||
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
||||
if (type == "async") return cont(statement)
|
||||
if (value == "@") return cont(expression, statement)
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function maybeCatchBinding(type) {
|
||||
if (type == "(") return cont(funarg, expect(")"))
|
||||
}
|
||||
function expression(type, value) {
|
||||
return expressionInner(type, value, false);
|
||||
}
|
||||
function expressionNoComma(type, value) {
|
||||
return expressionInner(type, value, true);
|
||||
}
|
||||
function parenExpr(type) {
|
||||
if (type != "(") return pass()
|
||||
return cont(pushlex(")"), expression, expect(")"), poplex)
|
||||
}
|
||||
function expressionInner(type, value, noComma) {
|
||||
if (cx.state.fatArrowAt == cx.stream.start) {
|
||||
var body = noComma ? arrowBodyNoComma : arrowBody;
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
||||
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
|
||||
}
|
||||
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef, maybeop);
|
||||
if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); }
|
||||
if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
||||
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
||||
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
||||
if (type == "quasi") return pass(quasi, maybeop);
|
||||
if (type == "new") return cont(maybeTarget(noComma));
|
||||
if (type == "import") return cont(expression);
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expression);
|
||||
}
|
||||
|
||||
function maybeoperatorComma(type, value) {
|
||||
if (type == ",") return cont(expression);
|
||||
return maybeoperatorNoComma(type, value, false);
|
||||
}
|
||||
function maybeoperatorNoComma(type, value, noComma) {
|
||||
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
||||
var expr = noComma == false ? expression : expressionNoComma;
|
||||
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
||||
if (type == "operator") {
|
||||
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
|
||||
if (isTS && value == "<" && cx.stream.match(/^([^>]|<.*?>)*>\s*\(/, false))
|
||||
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
|
||||
if (value == "?") return cont(expression, expect(":"), expr);
|
||||
return cont(expr);
|
||||
}
|
||||
if (type == "quasi") { return pass(quasi, me); }
|
||||
if (type == ";") return;
|
||||
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
|
||||
if (type == ".") return cont(property, me);
|
||||
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
||||
if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) }
|
||||
if (type == "regexp") {
|
||||
cx.state.lastType = cx.marked = "operator"
|
||||
cx.stream.backUp(cx.stream.pos - cx.stream.start - 1)
|
||||
return cont(expr)
|
||||
}
|
||||
}
|
||||
function quasi(type, value) {
|
||||
if (type != "quasi") return pass();
|
||||
if (value.slice(value.length - 2) != "${") return cont(quasi);
|
||||
return cont(expression, continueQuasi);
|
||||
}
|
||||
function continueQuasi(type) {
|
||||
if (type == "}") {
|
||||
cx.marked = "string-2";
|
||||
cx.state.tokenize = tokenQuasi;
|
||||
return cont(quasi);
|
||||
}
|
||||
}
|
||||
function arrowBody(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expression);
|
||||
}
|
||||
function arrowBodyNoComma(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expressionNoComma);
|
||||
}
|
||||
function maybeTarget(noComma) {
|
||||
return function(type) {
|
||||
if (type == ".") return cont(noComma ? targetNoComma : target);
|
||||
else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma)
|
||||
else return pass(noComma ? expressionNoComma : expression);
|
||||
};
|
||||
}
|
||||
function target(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
|
||||
}
|
||||
function targetNoComma(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
}
|
||||
function property(type) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "async") {
|
||||
cx.marked = "property";
|
||||
return cont(objprop);
|
||||
} else if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params
|
||||
if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
|
||||
cx.state.fatArrowAt = cx.stream.pos + m[0].length
|
||||
return cont(afterprop);
|
||||
} else if (type == "number" || type == "string") {
|
||||
cx.marked = jsonldMode ? "property" : (cx.style + " property");
|
||||
return cont(afterprop);
|
||||
} else if (type == "jsonld-keyword") {
|
||||
return cont(afterprop);
|
||||
} else if (isTS && isModifier(value)) {
|
||||
cx.marked = "keyword"
|
||||
return cont(objprop)
|
||||
} else if (type == "[") {
|
||||
return cont(expression, maybetype, expect("]"), afterprop);
|
||||
} else if (type == "spread") {
|
||||
return cont(expressionNoComma, afterprop);
|
||||
} else if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(objprop);
|
||||
} else if (type == ":") {
|
||||
return pass(afterprop)
|
||||
}
|
||||
}
|
||||
function getterSetter(type) {
|
||||
if (type != "variable") return pass(afterprop);
|
||||
cx.marked = "property";
|
||||
return cont(functiondef);
|
||||
}
|
||||
function afterprop(type) {
|
||||
if (type == ":") return cont(expressionNoComma);
|
||||
if (type == "(") return pass(functiondef);
|
||||
}
|
||||
function commasep(what, end, sep) {
|
||||
function proceed(type, value) {
|
||||
if (sep ? sep.indexOf(type) > -1 : type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(function(type, value) {
|
||||
if (type == end || value == end) return pass()
|
||||
return pass(what)
|
||||
}, proceed);
|
||||
}
|
||||
if (type == end || value == end) return cont();
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type, value) {
|
||||
if (type == end || value == end) return cont();
|
||||
return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
function contCommasep(what, end, info) {
|
||||
for (var i = 3; i < arguments.length; i++)
|
||||
cx.cc.push(arguments[i]);
|
||||
return cont(pushlex(end, info), commasep(what, end), poplex);
|
||||
}
|
||||
function block(type) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type, value) {
|
||||
if (isTS) {
|
||||
if (type == ":") return cont(typeexpr);
|
||||
if (value == "?") return cont(maybetype);
|
||||
}
|
||||
}
|
||||
function mayberettype(type) {
|
||||
if (isTS && type == ":") {
|
||||
if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr)
|
||||
else return cont(typeexpr)
|
||||
}
|
||||
}
|
||||
function isKW(_, value) {
|
||||
if (value == "is") {
|
||||
cx.marked = "keyword"
|
||||
return cont()
|
||||
}
|
||||
}
|
||||
function typeexpr(type, value) {
|
||||
if (value == "keyof" || value == "typeof") {
|
||||
cx.marked = "keyword"
|
||||
return cont(value == "keyof" ? typeexpr : expressionNoComma)
|
||||
}
|
||||
if (type == "variable" || value == "void") {
|
||||
cx.marked = "type"
|
||||
return cont(afterType)
|
||||
}
|
||||
if (type == "string" || type == "number" || type == "atom") return cont(afterType);
|
||||
if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType)
|
||||
if (type == "{") return cont(pushlex("}"), commasep(typeprop, "}", ",;"), poplex, afterType)
|
||||
if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType)
|
||||
if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr)
|
||||
}
|
||||
function maybeReturnType(type) {
|
||||
if (type == "=>") return cont(typeexpr)
|
||||
}
|
||||
function typeprop(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property"
|
||||
return cont(typeprop)
|
||||
} else if (value == "?") {
|
||||
return cont(typeprop)
|
||||
} else if (type == ":") {
|
||||
return cont(typeexpr)
|
||||
} else if (type == "[") {
|
||||
return cont(expression, maybetype, expect("]"), typeprop)
|
||||
}
|
||||
}
|
||||
function typearg(type, value) {
|
||||
if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg)
|
||||
if (type == ":") return cont(typeexpr)
|
||||
return pass(typeexpr)
|
||||
}
|
||||
function afterType(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
if (value == "|" || type == "." || value == "&") return cont(typeexpr)
|
||||
if (type == "[") return cont(expect("]"), afterType)
|
||||
if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) }
|
||||
}
|
||||
function maybeTypeArgs(_, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType)
|
||||
}
|
||||
function typeparam() {
|
||||
return pass(typeexpr, maybeTypeDefault)
|
||||
}
|
||||
function maybeTypeDefault(_, value) {
|
||||
if (value == "=") return cont(typeexpr)
|
||||
}
|
||||
function vardef(_, value) {
|
||||
if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)}
|
||||
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
||||
}
|
||||
function pattern(type, value) {
|
||||
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) }
|
||||
if (type == "variable") { register(value); return cont(); }
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "[") return contCommasep(eltpattern, "]");
|
||||
if (type == "{") return contCommasep(proppattern, "}");
|
||||
}
|
||||
function proppattern(type, value) {
|
||||
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
|
||||
register(value);
|
||||
return cont(maybeAssign);
|
||||
}
|
||||
if (type == "variable") cx.marked = "property";
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "}") return pass();
|
||||
return cont(expect(":"), pattern, maybeAssign);
|
||||
}
|
||||
function eltpattern() {
|
||||
return pass(pattern, maybeAssign)
|
||||
}
|
||||
function maybeAssign(_type, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
}
|
||||
function vardefCont(type) {
|
||||
if (type == ",") return cont(vardef);
|
||||
}
|
||||
function maybeelse(type, value) {
|
||||
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
||||
}
|
||||
function forspec(type, value) {
|
||||
if (value == "await") return cont(forspec);
|
||||
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
||||
}
|
||||
function forspec1(type) {
|
||||
if (type == "var") return cont(vardef, expect(";"), forspec2);
|
||||
if (type == ";") return cont(forspec2);
|
||||
if (type == "variable") return cont(formaybeinof);
|
||||
return pass(expression, expect(";"), forspec2);
|
||||
}
|
||||
function formaybeinof(_type, value) {
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return cont(maybeoperatorComma, forspec2);
|
||||
}
|
||||
function forspec2(type, value) {
|
||||
if (type == ";") return cont(forspec3);
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return pass(expression, expect(";"), forspec3);
|
||||
}
|
||||
function forspec3(type) {
|
||||
if (type != ")") cont(expression);
|
||||
}
|
||||
function functiondef(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
|
||||
if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef)
|
||||
}
|
||||
function funarg(type, value) {
|
||||
if (value == "@") cont(expression, funarg)
|
||||
if (type == "spread") return cont(funarg);
|
||||
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
|
||||
return pass(pattern, maybetype, maybeAssign);
|
||||
}
|
||||
function classExpression(type, value) {
|
||||
// Class expressions may have an optional name.
|
||||
if (type == "variable") return className(type, value);
|
||||
return classNameAfter(type, value);
|
||||
}
|
||||
function className(type, value) {
|
||||
if (type == "variable") {register(value); return cont(classNameAfter);}
|
||||
}
|
||||
function classNameAfter(type, value) {
|
||||
if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter)
|
||||
if (value == "extends" || value == "implements" || (isTS && type == ",")) {
|
||||
if (value == "implements") cx.marked = "keyword";
|
||||
return cont(isTS ? typeexpr : expression, classNameAfter);
|
||||
}
|
||||
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
||||
}
|
||||
function classBody(type, value) {
|
||||
if (type == "async" ||
|
||||
(type == "variable" &&
|
||||
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) &&
|
||||
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
return cont(isTS ? classfield : functiondef, classBody);
|
||||
}
|
||||
if (type == "[")
|
||||
return cont(expression, maybetype, expect("]"), isTS ? classfield : functiondef, classBody)
|
||||
if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (type == ";") return cont(classBody);
|
||||
if (type == "}") return cont();
|
||||
if (value == "@") return cont(expression, classBody)
|
||||
}
|
||||
function classfield(type, value) {
|
||||
if (value == "?") return cont(classfield)
|
||||
if (type == ":") return cont(typeexpr, maybeAssign)
|
||||
if (value == "=") return cont(expressionNoComma)
|
||||
return pass(functiondef)
|
||||
}
|
||||
function afterExport(type, value) {
|
||||
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
|
||||
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
|
||||
if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
|
||||
return pass(statement);
|
||||
}
|
||||
function exportField(type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); }
|
||||
if (type == "variable") return pass(expressionNoComma, exportField);
|
||||
}
|
||||
function afterImport(type) {
|
||||
if (type == "string") return cont();
|
||||
if (type == "(") return pass(expression);
|
||||
return pass(importSpec, maybeMoreImports, maybeFrom);
|
||||
}
|
||||
function importSpec(type, value) {
|
||||
if (type == "{") return contCommasep(importSpec, "}");
|
||||
if (type == "variable") register(value);
|
||||
if (value == "*") cx.marked = "keyword";
|
||||
return cont(maybeAs);
|
||||
}
|
||||
function maybeMoreImports(type) {
|
||||
if (type == ",") return cont(importSpec, maybeMoreImports)
|
||||
}
|
||||
function maybeAs(_type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
|
||||
}
|
||||
function maybeFrom(_type, value) {
|
||||
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
|
||||
}
|
||||
function arrayLiteral(type) {
|
||||
if (type == "]") return cont();
|
||||
return pass(commasep(expressionNoComma, "]"));
|
||||
}
|
||||
function enumdef() {
|
||||
return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex)
|
||||
}
|
||||
function enummember() {
|
||||
return pass(pattern, maybeAssign);
|
||||
}
|
||||
|
||||
function isContinuedStatement(state, textAfter) {
|
||||
return state.lastType == "operator" || state.lastType == "," ||
|
||||
isOperatorChar.test(textAfter.charAt(0)) ||
|
||||
/[,.]/.test(textAfter.charAt(0));
|
||||
}
|
||||
|
||||
function expressionAllowed(stream, state, backUp) {
|
||||
return state.tokenize == tokenBase &&
|
||||
/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
||||
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
var state = {
|
||||
tokenize: tokenBase,
|
||||
lastType: "sof",
|
||||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && new Context(null, null, false),
|
||||
indented: basecolumn || 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
state.globalVars = parserConfig.globalVars;
|
||||
return state;
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = false;
|
||||
state.indented = stream.indentation();
|
||||
findFatArrow(stream, state);
|
||||
}
|
||||
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if (type == "comment") return style;
|
||||
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
||||
return parseJS(state, style, type, content, stream);
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == tokenComment) return CodeMirror.Pass;
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse) break;
|
||||
}
|
||||
while ((lexical.type == "stat" || lexical.type == "form") &&
|
||||
(firstChar == "}" || ((top = state.cc[state.cc.length - 1]) &&
|
||||
(top == maybeoperatorComma || top == maybeoperatorNoComma) &&
|
||||
!/^[,\.=+\-*:?[\(]/.test(textAfter))))
|
||||
lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
|
||||
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
||||
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
||||
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
||||
else return lexical.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
||||
blockCommentStart: jsonMode ? null : "/*",
|
||||
blockCommentEnd: jsonMode ? null : "*/",
|
||||
blockCommentContinue: jsonMode ? null : " * ",
|
||||
lineComment: jsonMode ? null : "//",
|
||||
fold: "brace",
|
||||
closeBrackets: "()[]{}''\"\"``",
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonldMode: jsonldMode,
|
||||
jsonMode: jsonMode,
|
||||
|
||||
expressionAllowed: expressionAllowed,
|
||||
|
||||
skipExpression: function(state) {
|
||||
var top = state.cc[state.cc.length - 1]
|
||||
if (top == expression || top == expressionNoComma) state.cc.pop()
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
|
||||
|
||||
CodeMirror.defineMIME("text/javascript", "javascript");
|
||||
CodeMirror.defineMIME("text/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/x-javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
|
||||
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
||||
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
||||
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
var vConsole = new VConsole();
|
||||
var url = 'https://zhw2590582.github.io/assets-cdn';
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: url + '/video/one-more-time-one-more-chance-480p.mp4',
|
||||
// whitelist: ['iPhone OS 11'],
|
||||
// whitelist: [(ua)=>{ return /iPhone OS 11/gi.test(ua); }],
|
||||
// whitelist: [/iPhone OS 11/gi]
|
||||
});
|
||||
|
||||
Artplayer.config.video.events.forEach(function(item) {
|
||||
art && art.on('video:' + item, function(event) {
|
||||
console.log('video: ' + event.type);
|
||||
});
|
||||
});
|
||||
|
||||
console.warn('ArtPlayer.js: 移动端功能尚未完成适配,请用电脑打开.')
|
||||
@@ -1 +0,0 @@
|
||||
.artplayerPluginDanmu{display:flex}
|
||||
@@ -1,16 +0,0 @@
|
||||
.artplayer-video-player .artplayer-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;outline:0;cursor:pointer}
|
||||
.artplayer-video-player .artplayer-subtitle{position:absolute;z-index:20;bottom:40px;width:100%;padding:0 20px;text-align:center;color:#fff;text-shadow:.5px .5px .5px rgba(0,0,0,.5);font-size:20px;pointer-events:none}.artplayer-video-player .artplayer-subtitle p{margin:5px 0}
|
||||
.artplayer-video-player{position:relative;width:100%;height:100%;overflow:hidden;outline:0;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:manipulation;-ms-high-contrast-adjust:none}.artplayer-video-player *{box-sizing:border-box}.artplayer-video-player .art-icon{display:inline-block;line-height:1.5}.artplayer-video-player .art-icon svg{fill:#fff}
|
||||
.artplayer-video-player .artplayer-layers{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.artplayer-video-player .artplayer-layers .art-layer{position:absolute;pointer-events:all}
|
||||
.artplayer-video-player .artplayer-mask{display:none;position:absolute;z-index:40;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.artplayer-video-player .artplayer-mask .art-icon-playBig{position:absolute;right:30px;bottom:65px;opacity:.6}
|
||||
.artplayer-video-player .artplayer-loading{display:none;position:absolute;z-index:60;left:0;top:0;right:0;bottom:0;width:100%;height:100%;align-items:center;justify-content:center;pointer-events:none}
|
||||
.artplayer-video-player .artplayer-notice{display:none;font-size:14px;position:absolute;z-index:70;left:0;top:0;padding:10px;width:100%;pointer-events:none}.artplayer-video-player .artplayer-notice .artplayer-notice-inner{display:inline-block;padding:5px 10px;color:#fff;background:rgba(0,0,0,.6);border-radius:3px}
|
||||
.artplayer-video-player .artplayer-bottom{position:absolute;z-index:50;left:0;right:0;bottom:0;height:100px;padding:60px 10px 0;opacity:0;visibility:hidden;transition:all .2s ease-in-out;pointer-events:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom}.artplayer-video-player .artplayer-bottom .artplayer-progress{position:relative;pointer-events:all}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress{position:relative;height:5px;padding:1px 0;cursor:pointer}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner{position:relative;height:100%;background:hsla(0,0%,100%,.2)}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:0;background:hsla(0,0%,100%,.4)}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-played{position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;height:100%;width:0}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;height:0}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{display:inline-block;position:absolute;left:0;top:0;width:7px;height:3px;background:#fff;border-radius:3px}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{display:none;position:absolute;z-index:40;top:-5px;left:-6.5px;width:13px;height:13px;border-radius:50%}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-indicator.show-indicator{display:block}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress .art-control-progress-inner .art-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress:hover .art-progress-indicator,.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-progress:hover .art-progress-tip{display:block}.artplayer-video-player .artplayer-bottom .artplayer-progress .art-control-thumbnails{display:none;position:absolute;bottom:8px;left:0;pointer-events:none;background-color:rgba(0,0,0,.7)}.artplayer-video-player .artplayer-bottom .artplayer-controls{position:relative;pointer-events:all;display:flex;align-items:center;justify-content:space-between;height:36px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control{opacity:.9;float:left;font-size:12px;height:36px;line-height:36px;cursor:pointer}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control .art-icon{display:flex;align-items:center;justify-content:center;float:left;height:36px;width:36px;padding:7px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control:hover{opacity:1}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel{position:relative;float:left;width:0;height:100%;transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);overflow:hidden}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{position:absolute;top:50%;left:0;width:12px;height:12px;border-radius:12px;margin-top:-6px;background:#fff}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{left:-54px;background:#fff}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{left:6px;background:hsla(0,0%,100%,.2)}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after,.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{content:"";position:absolute;display:block;top:50%;height:3px;margin-top:-2px;width:60px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-volume .art-volume-panel.art-volume-panel-hover{width:60px}.artplayer-video-player .artplayer-bottom .artplayer-controls .art-control-time{padding:0 10px}.artplayer-video-playeLine truncated
|
||||
.artplayer-video-player .artplayer-contextmenu{display:none;position:absolute;z-index:110;left:0;top:0;min-width:200px;padding:5px 0;background:rgba(0,0,0,.8);border-radius:3px}.artplayer-video-player .artplayer-contextmenu .art-menu{cursor:pointer;font-size:13px;display:block;color:#fff;padding:7px 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.artplayer-video-player .artplayer-contextmenu .art-menu a{color:#fff;text-decoration:none}.artplayer-video-player .artplayer-contextmenu .art-menu span{display:inline-block;padding:0 7px}.artplayer-video-player .artplayer-contextmenu .art-menu span.current,.artplayer-video-player .artplayer-contextmenu .art-menu span:hover{color:#00c9ff}.artplayer-video-player .artplayer-contextmenu .art-menu:hover{background-color:hsla(0,0%,100%,.1)}.artplayer-video-player .artplayer-contextmenu .art-menu:last-child{border-bottom:none}
|
||||
.artplayer-video-player .artplayer-info{display:none;position:absolute;left:10px;top:10px;z-index:90;width:350px;min-height:150px;padding:10px;color:#fff;font-size:12px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;background:rgba(0,0,0,.7)}.artplayer-video-player .artplayer-info .art-info-item{display:flex;margin-bottom:5px}.artplayer-video-player .artplayer-info .art-info-item .art-info-title{width:100px;text-align:right}.artplayer-video-player .artplayer-info .art-info-item .art-info-content{flex:1;padding-left:5px}.artplayer-video-player .artplayer-info .artplayer-info-close{position:absolute;top:5px;right:5px;cursor:pointer}
|
||||
.artplayer-video-player .artplayer-setting{display:none;position:absolute;z-index:80;left:0;top:0;height:100%;width:100%;align-items:center;justify-content:center;pointer-events:none}.artplayer-video-player .artplayer-setting .artplayer-setting-inner{position:relative;width:350px;height:250px;font-size:12px;background:rgba(0,0,0,.8);border-radius:3px;pointer-events:all;overflow:hidden}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body{overflow-x:hidden;overflow-y:auto;width:365px;height:100%}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting{border-bottom:1px solid hsla(0,0%,100%,.1);padding:12px 35px 12px 20px}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting .art-setting-header{color:#fff;margin-bottom:10px}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-body .art-setting .art-setting-body{color:hsla(0,0%,100%,.8)}.artplayer-video-player .artplayer-setting .artplayer-setting-inner .artplayer-setting-close{position:absolute;top:0;right:0;width:20px;height:20px;line-height:20px;text-align:center;color:hsla(0,0%,100%,.8);background:rgba(0,0,0,.5);font-size:20px;cursor:pointer}
|
||||
.artplayer-video-player.artplayer-hide-cursor *{cursor:none!important}
|
||||
.artplayer-video-player[data-aspect-ratio] video{box-sizing:content-box;-o-object-fit:fill;object-fit:fill}
|
||||
.artplayer-video-player.artplayer-web-fullscreen{position:fixed;z-index:9999;width:100%;height:100%;left:0;top:0;right:0;bottom:0}
|
||||
.artplayer-video-player .artplayer-pip-header{display:none;position:absolute;z-index:100;left:0;top:0;right:0;height:35px;line-height:35px;color:#fff;background:rgba(0,0,0,.5);align-items:center;justify-content:space-between;opacity:0;visibility:hidden;transition:all .2s ease-in-out}.artplayer-video-player .artplayer-pip-header .artplayer-pip-title{flex:1;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:move}.artplayer-video-player .artplayer-pip-header .artplayer-pip-close{width:35px;text-align:center;font-size:22px;cursor:pointer}.artplayer-video-player.is-dragging{opacity:.7}.artplayer-video-player.artplayer-pip{position:fixed;right:20px;bottom:20px;width:400px;height:225px;box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2)}.artplayer-video-player.artplayer-pip .artplayer-pip-header{display:flex}.artplayer-video-player.artplayer-pip.artplayer-hover .artplayer-pip-header{opacity:1;visibility:visible}.artplayer-video-player.artplayer-pip .artplayer-mask{align-items:center;justify-content:center}.artplayer-video-player.artplayer-pip .artplayer-mask .art-icon-playBig{position:static}.artplayer-video-player.artplayer-pip .artplayer-bottom,.artplayer-video-player.artplayer-pip .artplayer-contextmenu,.artplayer-video-player.artplayer-pip .artplayer-danmu,.artplayer-video-player.artplayer-pip .artplayer-info,.artplayer-video-player.artplayer-pip .artplayer-layers,.artplayer-video-player.artplayer-pip .artplayer-notice,.artplayer-video-player.artplayer-pip .artplayer-setting,.artplayer-video-player.artplayer-pip .artplayer-subtitle{display:none!important}
|
||||
button[data-balloon]{overflow:visible}[data-balloon]{position:relative;cursor:pointer}[data-balloon]:after{font-family:sans-serif!important;font-weight:400!important;font-style:normal!important;text-shadow:none!important;font-size:12px!important;background:rgba(17,17,17,.9);border-radius:4px;color:#fff;content:attr(data-balloon);padding:.5em 1em;white-space:nowrap}[data-balloon]:after,[data-balloon]:before{filter:alpha(opactiy=0);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-moz-opacity:0;-khtml-opacity:0;opacity:0;pointer-events:none;transition:all .18s ease-out .18s;position:absolute;z-index:10}[data-balloon]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M2.658 0h32.004c-6 0-11.627 12.002-16.002 12.002C14.285 12.002 8.594 0 2.658 0z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;content:""}[data-balloon]:hover:after,[data-balloon]:hover:before,[data-balloon][data-balloon-visible]:after,[data-balloon][data-balloon-visible]:before{filter:alpha(opactiy=100);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";-moz-opacity:1;-khtml-opacity:1;opacity:1;pointer-events:auto}[data-balloon].font-awesome:after{font-family:FontAwesome}[data-balloon][data-balloon-break]:after{white-space:pre}[data-balloon][data-balloon-blunt]:after,[data-balloon][data-balloon-blunt]:before{transition:none}[data-balloon][data-balloon-pos=up]:after{margin-bottom:11px}[data-balloon][data-balloon-pos=up]:after,[data-balloon][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,10px);transform:translate(-50%,10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up]:before{margin-bottom:5px}[data-balloon][data-balloon-pos=up]:hover:after,[data-balloon][data-balloon-pos=up]:hover:before,[data-balloon][data-balloon-pos=up][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=up-left]:after{left:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-left]:after,[data-balloon][data-balloon-pos=up-left]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-left]:before{left:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-left]:hover:after,[data-balloon][data-balloon-pos=up-left]:hover:before,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-left][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=up-right]:after{right:0;margin-bottom:11px}[data-balloon][data-balloon-pos=up-right]:after,[data-balloon][data-balloon-pos=up-right]:before{bottom:100%;-webkit-transform:translateY(10px);transform:translateY(10px);-webkit-transform-origin:top;transform-origin:top}[data-balloon][data-balloon-pos=up-right]:before{right:5px;margin-bottom:5px}[data-balloon][data-balloon-pos=up-right]:hover:after,[data-balloon][data-balloon-pos=up-right]:hover:before,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:after,[data-balloon][data-balloon-pos=up-right][data-balloon-visible]:before{-webkit-transform:translate(0);transform:translate(0)}[data-balloon][data-balloon-pos=down]:after{margin-top:11px}[data-balloon][data-balloon-pos=down]:after,[data-balloon][data-balloon-pos=down]:before{left:50%;top:100%;-webkit-transform:translate(-50%,-10px);transform:translate(-50%,-10px)}[data-balloon][data-balloon-pos=down]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;margin-top:5px}[data-balloon][data-balloon-pos=down]:hover:after,[data-balloon][data-balloon-pos=down]:hover:before,[data-balloon][data-balloon-pos=down][data-balloon-visible]:after,[data-balloon][data-balloon-pos=down][data-balloon-visible]:before{-webkit-transform:translate(-50%);transform:translate(-50%)}[data-balloon][data-balloon-pos=down-left]:after{left:0;margin-top:11px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]:before{background:no-repeat url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12'%3E%3Cpath fill='rgba(17,17,17,0.9)' d='M33.342 12H1.338c6 0 11.627-12.002 16.002-12.002C21.715-.002 27.406 12 33.342 12z'/%3E%3C/svg%3E");background-size:100% auto;width:18px;height:6px;left:5px;margin-top:5px;top:100%;-webkit-transform:translateY(-10px);transform:translateY(-10px)}[data-balloon][data-balloon-pos=down-left]Line truncated
|
||||
@@ -0,0 +1,25 @@
|
||||
(function () {
|
||||
window.runCode = function(hook) {
|
||||
hook.ready(function() {
|
||||
Array.from(document.querySelectorAll('.markdown-section a'))
|
||||
.filter(function(item) {
|
||||
return item.innerHTML === 'Run Code';
|
||||
})
|
||||
.forEach(function(item) {
|
||||
item.addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
var codeElement = item.parentElement.nextElementSibling;
|
||||
if (
|
||||
codeElement.tagName === 'PRE' &&
|
||||
codeElement.dataset.lang === 'js'
|
||||
) {
|
||||
var libs = item.href.split('/lib=')[1] || '';
|
||||
var code = encodeURIComponent(codeElement.innerText);
|
||||
var url = 'https://artplayer.org/?libs=' + libs + '&code=' + code;
|
||||
window.open(url);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
})();
|
||||
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ArtPlayer Document</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta name="keywords" content="artplayer,html5,video,player">
|
||||
<meta name="description" content="ArtPlayer is a modern HTML5 video player">
|
||||
<link rel="shortcut icon" href="./favicon.ico">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="./common.js"></script>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: 'ArtPlayer',
|
||||
repo: 'zhw2590582/ArtPlayer',
|
||||
maxLevel: 4,
|
||||
subMaxLevel: 2,
|
||||
plugins: [window.runCode]
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 554 KiB |
|
Before Width: | Height: | Size: 18 KiB |
@@ -1,25 +1,121 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>ArtPlayer</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0,minimal-ui">
|
||||
<meta name="keywords" content="artplayer,html5,video,player">
|
||||
<meta name="description" content="ArtPlayer is a modern HTML5 video player">
|
||||
<link rel="shortcut icon" href="./img/favicon.ico">
|
||||
<link rel="stylesheet" href="./css/normalize.css">
|
||||
<link rel="stylesheet" href="./css/index.css">
|
||||
<link rel="stylesheet" href="./css/artplayer.css">
|
||||
<meta charset="UTF-8" />
|
||||
<title>Artplayer.js</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<meta name="keywords" content="artplayer, player, js, html5, video" />
|
||||
<meta name="description" content="ArtPlayer.js is a modern and full featured HTML5 video player" />
|
||||
<link rel="shortcut icon" href="./assets/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="./assets/css/normalize.css" />
|
||||
<link rel="stylesheet" href="./assets/css/codemirror.css" />
|
||||
<link rel="stylesheet" href="./assets/css/dracula.css" />
|
||||
<link rel="stylesheet" href="./assets/css/consola.css" />
|
||||
<link rel="stylesheet" href="./assets/css/style.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="app">
|
||||
<div class="artplayer-app"></div>
|
||||
<section class="main">
|
||||
<div class="part-left">
|
||||
<header class="header">
|
||||
<a href="./" class="logo">Artplayer.js</a>
|
||||
<div class="menus">
|
||||
<div class="item has-sub-menu">
|
||||
Ecosystem
|
||||
<div class="sub-menu">
|
||||
<ul>
|
||||
<li class="title">Plugins</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif">artplayer-plugin-gif</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight">artplayer-plugin-backlight</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku">artplayer-plugin-danmuku</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="title">Tools</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail">artplayer-tool-thumbnail</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github">artplayer-tool-github</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="title">Component</li>
|
||||
<li><a href="https://codesandbox.io/s/n74859y9rl">artplayer-react</a></li>
|
||||
<li><a href="https://codesandbox.io/s/6z76lm109n">artplayer-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<a class="item" href="./document/">Document</a>
|
||||
<a class="item" href="https://github.com/zhw2590582/ArtPlayer">Github</a>
|
||||
<div class="item has-sub-menu">
|
||||
Donate
|
||||
<div class="sub-menu">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.paypal.me/harveyzack">Paypal</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/wechatpay.jpg">WeChat Pay</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/zhw2590582/ArtPlayer/blob/master/images/alipay.jpg">Alipay</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="run">Run Code</div>
|
||||
</header>
|
||||
<div class="libs">
|
||||
<textarea class="libsInput"
|
||||
placeholder="Other dependencies, support for js and css, multiple line breaks"
|
||||
spellcheck="false"></textarea>
|
||||
</div>
|
||||
<div class="code">
|
||||
<div class="codeMirrorWrap"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="part-right">
|
||||
<div class="video-wrap">
|
||||
<div class="artplayer-app"></div>
|
||||
</div>
|
||||
<div class="console"></div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="popups">
|
||||
<div class="popinner"></div>
|
||||
</div>
|
||||
<script src="./js/artplayer.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
<script src="./assets/js/codemirror.js"></script>
|
||||
<script src="./assets/js/javascript.js"></script>
|
||||
<script src="./assets/js/consola.js"></script>
|
||||
<script src="./uncompiled/artplayer.js"></script>
|
||||
<script src="./assets/js/common.js"></script>
|
||||
<script>
|
||||
var isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
window.location.hostname === '[::1]' ||
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
if (!isLocalhost) {
|
||||
var hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global['artplayer-plugin-danmu'] = {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var classCallCheck = _classCallCheck;
|
||||
|
||||
var ArtplayerPluginDanmu = function ArtplayerPluginDanmu() {
|
||||
classCallCheck(this, ArtplayerPluginDanmu);
|
||||
|
||||
console.log(this);
|
||||
};
|
||||
|
||||
window.ArtplayerPluginDanmu = ArtplayerPluginDanmu;
|
||||
|
||||
exports.default = ArtplayerPluginDanmu;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=artplayer-plugin-danmu.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"artplayer-plugin-danmu.js","sources":["../../packages/artplayer-plugin-danmu/node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/classCallCheck.js","../../packages/artplayer-plugin-danmu/src/index.js"],"sourcesContent":["function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","import './style/index.scss';\n\nclass ArtplayerPluginDanmu {\n constructor() {\n console.log(this);\n }\n}\n\nwindow.ArtplayerPluginDanmu = ArtplayerPluginDanmu;\nexport default ArtplayerPluginDanmu;\n"],"names":["ArtplayerPluginDanmu","console","log","window"],"mappings":";;;;;;EAAA,SAAS,eAAe,CAAC,QAAQ,EAAE,WAAW,EAAE;IAC9C,IAAI,EAAE,QAAQ,YAAY,WAAW,CAAC,EAAE;MACtC,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;KAC1D;GACF;;EAED,kBAAc,GAAG,eAAe;;MCJ1BA,uBACJ,gCAAc;EAAA;;EACZC,EAAAA,OAAO,CAACC,GAAR,CAAY,IAAZ;EACD;;EAGHC,MAAM,CAACH,oBAAP,GAA8BA,oBAA9B;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"artplayer.js","sources":["../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/classCallCheck.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/createClass.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/typeof.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/assertThisInitialized.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/possibleConstructorReturn.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/getPrototypeOf.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/setPrototypeOf.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/inherits.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/defineProperty.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/objectSpread.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/arrayWithoutHoles.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/iterableToArray.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/nonIterableSpread.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/toConsumableArray.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/isNativeFunction.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/construct.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/wrapNativeSuper.js","../../src/utils/index.js","../../node_modules/_option-validator@1.1.0@option-validator/dist/option-validator.js","../../src/scheme/validElement.js","../../src/scheme/index.js","../../src/config/mimeCodec.js","../../src/config/mse.js","../../src/config/video.js","../../src/config/index.js","../../node_modules/_tiny-emitter@2.0.2@tiny-emitter/index.js","../../src/template.js","../../src/i18n.js","../../src/player/mountUrlMix.js","../../src/player/attrInit.js","../../src/player/eventInit.js","../../src/player/playMix.js","../../src/player/pauseMin.js","../../src/player/toggleMix.js","../../src/player/seekMix.js","../../src/player/volumeMix.js","../../src/player/currentTimeMix.js","../../src/player/durationMix.js","../../src/player/switchMix.js","../../src/player/playbackRateMix.js","../../src/player/aspectRatioMix.js","../../src/player/screenshotMix.js","../../node_modules/_screenfull@3.3.3@screenfull/dist/screenfull.js","../../src/player/fullscreenMix.js","../../src/player/fullscreenWebMix.js","../../node_modules/_get-size@2.0.3@get-size/get-size.js","../../node_modules/_ev-emitter@1.1.1@ev-emitter/ev-emitter.js","../../node_modules/_unipointer@2.3.0@unipointer/unipointer.js","../../node_modules/_unidragger@2.3.0@unidragger/unidragger.js","../../node_modules/_draggabilly@2.2.0@draggabilly/draggabilly.js","../../src/player/pipMix.js","../../src/player/index.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/arrayWithHoles.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/iterableToArrayLimit.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/nonIterableRest.js","../../node_modules/_@babel_runtime@7.1.5@@babel/runtime/helpers/slicedToArray.js","../../src/icons/index.js","../../src/controls/fullscreen.js","../../src/controls/fullscreenWeb.js","../../src/controls/pip.js","../../src/controls/playAndPause.js","../../src/controls/progress.js","../../src/controls/subtitle.js","../../src/controls/time.js","../../src/controls/volume.js","../../src/controls/setting.js","../../src/controls/thumbnails.js","../../src/controls/screenshot.js","../../src/controls/quality.js","../../src/controls/index.js","../../src/contextmenu/playbackRate.js","../../src/contextmenu/aspectRatio.js","../../src/contextmenu/info.js","../../src/contextmenu/version.js","../../src/contextmenu/close.js","../../src/contextmenu/index.js","../../src/info.js","../../src/subtitle.js","../../src/events.js","../../src/hotkey.js","../../src/layers.js","../../src/loading.js","../../src/notice.js","../../src/mask.js","../../src/setting/common.js","../../src/setting/index.js","../../src/index.js"],"sourcesContent":["function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _typeof2(obj) { if Line truncated
|
||||
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Artplayer.js</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<meta name="keywords" content="artplayer, player, js, html5, video" />
|
||||
<meta name="description" content="ArtPlayer.js is a modern and full featured HTML5 video player" />
|
||||
<link rel="shortcut icon" href="./assets/img/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="./assets/css/normalize.css">
|
||||
<link rel="stylesheet" href="./assets/css/mobile.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="artplayer-app"></div>
|
||||
</div>
|
||||
<script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
|
||||
<script src="./uncompiled/artplayer.js"></script>
|
||||
<script src="./assets/js/mobile.js"></script>
|
||||
<script>
|
||||
var isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
window.location.hostname === '[::1]' ||
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
if (!isLocalhost) {
|
||||
var hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?b6c9b8bafbf5fe7225160101dafbbc7d';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,401 +0,0 @@
|
||||
1
|
||||
00:00:01,500 --> 00:00:03,950
|
||||
歌名:One More Time,One More Chance
|
||||
〖愿往事重来〗
|
||||
|
||||
2
|
||||
00:00:04,000 --> 00:00:05,950
|
||||
【新海诚动画】『秒速5センチメートル』
|
||||
《秒速5厘米》主题曲
|
||||
|
||||
3
|
||||
00:00:06,000 --> 00:00:08,950
|
||||
编曲:森俊之
|
||||
|
||||
4
|
||||
00:00:09,000 --> 00:00:11,950
|
||||
作词|作曲|演唱:山崎まさよし <山崎将义>
|
||||
|
||||
5
|
||||
00:00:12,000 --> 00:00:15,950
|
||||
|
||||
|
||||
6
|
||||
00:00:16,000 --> 00:00:20,250
|
||||
これ以上何をう失(し)なえば
|
||||
【还要再失去什么】
|
||||
|
||||
7
|
||||
00:00:20,300 --> 00:00:23,250
|
||||
心は许(ゆる)されるの
|
||||
【才能让心得到宽恕?】
|
||||
|
||||
8
|
||||
00:00:23,300 --> 00:00:27,250
|
||||
どれ程(ほど)の痛(いた)みならば
|
||||
【还要再怎样痛苦】
|
||||
|
||||
9
|
||||
00:00:27,300 --> 00:00:30,250
|
||||
もう一度君に会(あ)える
|
||||
【才能与你再次相见】
|
||||
|
||||
10
|
||||
00:00:30,300 --> 00:00:33,250
|
||||
One more time
|
||||
|
||||
11
|
||||
00:00:33,300 --> 00:00:37,950
|
||||
季节(きせつ)よ うつろわないで
|
||||
【不愿看到季节的变迁】
|
||||
|
||||
12
|
||||
00:00:38,000 --> 00:00:41,050
|
||||
One more time
|
||||
|
||||
13
|
||||
00:00:41,100 --> 00:00:45,250
|
||||
ふざけあった时间(じかん)よ
|
||||
【曾与你嬉闹的时光啊】
|
||||
|
||||
14
|
||||
00:00:45,300 --> 00:00:49,250
|
||||
くいちがうときはいつも
|
||||
【每次争执的时候】
|
||||
|
||||
15
|
||||
00:00:49,300 --> 00:00:53,100
|
||||
仆が先(さき)に折(お)れたね
|
||||
【总是我先让步】
|
||||
|
||||
16
|
||||
00:00:53,150 --> 00:00:56,250
|
||||
わがままな性格(せいかく)が
|
||||
【你那任性的性格】
|
||||
|
||||
17
|
||||
00:00:56,300 --> 00:00:59,250
|
||||
なおさら爱(いと)しくさせた
|
||||
【反而令你更加可爱】
|
||||
|
||||
18
|
||||
00:00:59,300 --> 00:01:02,950
|
||||
One more chance
|
||||
|
||||
19
|
||||
00:01:03,000 --> 00:01:07,250
|
||||
记忆(きおく)に足(あし)を取(と)られて
|
||||
【回忆绊住我的脚步】
|
||||
|
||||
20
|
||||
00:01:07,300 --> 00:01:10,250
|
||||
One more chance
|
||||
|
||||
21
|
||||
00:01:10,300 --> 00:01:14,950
|
||||
次(つぎ)の场所を选(えら)べない
|
||||
【无法选择下个地方】
|
||||
|
||||
22
|
||||
00:01:15,000 --> 00:01:18,250
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
23
|
||||
00:01:18,300 --> 00:01:21,950
|
||||
どっかに君の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
24
|
||||
00:01:22,000 --> 00:01:23,950
|
||||
向(むか)いのホーム
|
||||
【对面的月台上】
|
||||
|
||||
25
|
||||
00:01:24,000 --> 00:01:25,950
|
||||
路地裏(ろじうら)の窓(まど)
|
||||
【在小巷的窗口里】
|
||||
|
||||
26
|
||||
00:01:26,000 --> 00:01:29,250
|
||||
こんなとこにいるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
27
|
||||
00:01:29,300 --> 00:01:33,250
|
||||
愿(ねが)いがもしも叶(かな)うなら
|
||||
【若愿望能够实现】
|
||||
|
||||
28
|
||||
00:01:33,300 --> 00:01:36,550
|
||||
いますぐ君のもとへ
|
||||
【好想马上去到你身边】
|
||||
|
||||
29
|
||||
00:01:36,600 --> 00:01:40,250
|
||||
できないことは もう何もない
|
||||
【如今我再也不会有丝毫退缩】
|
||||
|
||||
30
|
||||
00:01:40,300 --> 00:01:47,300
|
||||
すべてかけて抱きしめてみせるよ
|
||||
【我会不顾一切将你紧紧拥抱】
|
||||
|
||||
31
|
||||
00:01:47,350 --> 00:01:51,950
|
||||
|
||||
|
||||
32
|
||||
00:01:52,000 --> 00:01:55,250
|
||||
|
||||
|
||||
33
|
||||
00:01:55,300 --> 00:01:59,250
|
||||
寂(さび)しさ纷(まぎ)らすだけなら
|
||||
【如果只是为了排遣寂寞】
|
||||
|
||||
34
|
||||
00:01:59,300 --> 00:02:02,950
|
||||
谁でもいいはずなのに
|
||||
【其实不管是谁都无所谓】
|
||||
|
||||
35
|
||||
00:02:03,000 --> 00:02:07,250
|
||||
星が落(お)ちそうな夜(よる)だから
|
||||
【唯有在星辰仿佛要坠落的夜晚】
|
||||
|
||||
36
|
||||
00:02:07,300 --> 00:02:10,250
|
||||
自分(じぶん)をいつわれない
|
||||
【我无法欺骗自己】
|
||||
|
||||
37
|
||||
00:02:10,300 --> 00:02:13,250
|
||||
One more time
|
||||
|
||||
38
|
||||
00:02:13,300 --> 00:02:17,250
|
||||
季节(きせつ)よ うつろわないで
|
||||
【不愿看到季节的变迁】
|
||||
|
||||
39
|
||||
00:02:17,300 --> 00:02:20,250
|
||||
One more time
|
||||
|
||||
40
|
||||
00:02:20,300 --> 00:02:24,600
|
||||
ふざけあった时间(じかん)よ
|
||||
【曾与你嬉闹的时光啊】
|
||||
|
||||
41
|
||||
00:02:24,650 --> 00:02:25,250
|
||||
|
||||
|
||||
42
|
||||
00:02:25,300 --> 00:02:29,050
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
43
|
||||
00:02:29,100 --> 00:02:32,250
|
||||
どっかに君(きみ)の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
44
|
||||
00:02:32,300 --> 00:02:34,250
|
||||
交差点(こうさてん)でも
|
||||
【每个十字路口】
|
||||
|
||||
45
|
||||
00:02:34,300 --> 00:02:36,250
|
||||
梦の中でも 【每次梦境之中】
|
||||
|
||||
46
|
||||
00:02:36,300 --> 00:02:39,950
|
||||
こんなとこにいるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
47
|
||||
00:02:40,000 --> 00:02:43,250
|
||||
奇迹(きせき)がもしも起(お)こるなら
|
||||
【若奇迹将会发生】
|
||||
|
||||
48
|
||||
00:02:43,300 --> 00:02:46,950
|
||||
今すぐ君に见せたい
|
||||
【我希望马上就能见到你】
|
||||
|
||||
49
|
||||
00:02:47,000 --> 00:02:50,250
|
||||
新しい朝(あさ) これからの仆
|
||||
【无论崭新的清晨 还是今后的自己】
|
||||
|
||||
50
|
||||
00:02:50,300 --> 00:02:57,250
|
||||
言えなかった「好き」という言叶も
|
||||
【或是那句没能说出口的「喜欢你」】
|
||||
|
||||
51
|
||||
00:02:57,300 --> 00:03:04,450
|
||||
|
||||
|
||||
52
|
||||
00:03:04,500 --> 00:03:05,950
|
||||
|
||||
|
||||
53
|
||||
00:03:06,000 --> 00:03:13,950
|
||||
夏の想い出がまわる
|
||||
【夏日的回忆在脑海中回旋】
|
||||
|
||||
54
|
||||
00:03:14,000 --> 00:03:20,950
|
||||
ふいに消(き)えた鼓动(こどう)
|
||||
【刹那间消失的悸动】
|
||||
|
||||
55
|
||||
00:03:21,000 --> 00:03:24,950
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
57
|
||||
00:03:25,000 --> 00:03:27,950
|
||||
どっかに君の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
58
|
||||
00:03:28,000 --> 00:03:29,950
|
||||
明(あ)け方(がた)の街(まち)
|
||||
【在拂晓的街头】
|
||||
|
||||
59
|
||||
00:03:30,000 --> 00:03:31,950
|
||||
桜木町(さくらぎちょう)で
|
||||
【在种满樱树的小镇】
|
||||
|
||||
60
|
||||
00:03:32,000 --> 00:03:35,950
|
||||
こんなとこに来(く)るはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
61
|
||||
00:03:36,000 --> 00:03:39,250
|
||||
愿(ねが)いがもしも叶(かな)うなら
|
||||
【若愿望能够实现】
|
||||
|
||||
62
|
||||
00:03:39,300 --> 00:03:43,050
|
||||
今すぐ君のもとへ
|
||||
【现在马上去到你身边】
|
||||
|
||||
63
|
||||
00:03:43,100 --> 00:03:46,800
|
||||
できないことは もう何(なに)もない
|
||||
【如今我再也不会有丝毫退缩】
|
||||
|
||||
64
|
||||
00:03:46,850 --> 00:03:50,600
|
||||
すべてかけて抱きしめてみせるよ
|
||||
【我会不顾一切紧紧将你拥抱】
|
||||
|
||||
65
|
||||
00:03:50,650 --> 00:03:54,250
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
66
|
||||
00:03:54,300 --> 00:03:57,700
|
||||
どっかに君のかけらを
|
||||
【寻觅着你的片断】
|
||||
|
||||
67
|
||||
00:03:57,750 --> 00:03:59,250
|
||||
旅先(たびさき)の店(みせ)
|
||||
【在旅途中的小店】
|
||||
|
||||
68
|
||||
00:03:59,300 --> 00:04:01,450
|
||||
新闻(しんぶん)の隅(すみ)
|
||||
【在报纸的角落】
|
||||
|
||||
69
|
||||
00:04:01,500 --> 00:04:04,950
|
||||
こんなとこにあるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
70
|
||||
00:04:05,000 --> 00:04:08,250
|
||||
奇迹(きせき)がもしも起(お)こるなら
|
||||
【若奇迹将会发生】
|
||||
|
||||
71
|
||||
00:04:08,300 --> 00:04:12,250
|
||||
今すぐ君に见せたい
|
||||
【我希望现在就能见到你】
|
||||
|
||||
72
|
||||
00:04:12,300 --> 00:04:16,050
|
||||
新しい朝(あさ) これからの仆
|
||||
【无论崭新的清晨 还是今后的自己】
|
||||
|
||||
73
|
||||
00:04:16,100 --> 00:04:19,400
|
||||
言えなかった「好き」という言叶も
|
||||
【或是那句没能说出口的「喜欢你」】
|
||||
|
||||
74
|
||||
00:04:19,450 --> 00:04:19,950
|
||||
|
||||
|
||||
75
|
||||
00:04:20,000 --> 00:04:22,950
|
||||
いつでも捜(さが)してしまう
|
||||
【总是在一直寻觅】
|
||||
|
||||
76
|
||||
00:04:23,000 --> 00:04:26,950
|
||||
どっかに君の笑颜(えがお)を
|
||||
【寻觅着你的笑容】
|
||||
|
||||
77
|
||||
00:04:27,000 --> 00:04:30,250
|
||||
急行(きゅうこう)待ちの 踏切(ふみきり)あたり
|
||||
【哪怕在等待列车通过的铁路道口】
|
||||
|
||||
78
|
||||
00:04:30,300 --> 00:04:34,250
|
||||
こんなとこにいるはずもないのに
|
||||
【虽然明明知道你不可能在那里】
|
||||
|
||||
79
|
||||
00:04:34,300 --> 00:04:37,950
|
||||
命(いのち)が缲(く)り返(かえ)すならば
|
||||
【如果生命能够重来】
|
||||
|
||||
80
|
||||
00:04:38,000 --> 00:04:41,050
|
||||
何度(なんど)も君のもとへ
|
||||
【无论几次我都要去你身边】
|
||||
|
||||
81
|
||||
00:04:41,100 --> 00:04:45,150
|
||||
欲(ほ)しいものなど もう何もない
|
||||
【那时我一定别无所求】
|
||||
|
||||
82
|
||||
00:04:45,200 --> 00:04:52,750
|
||||
君のほかに大切なものなど
|
||||
【再也没有什么比你更加重要】
|
||||
|
||||
83
|
||||
00:04:52,800 --> 00:05:10,950
|
||||
|
||||
|
||||
84
|
||||
00:05:11,000 --> 00:05:15,450
|
||||
|
||||
|
||||
85
|
||||
00:05:15,500 --> 00:05:25,500
|
||||
--终わり--
|
||||
|
||||
@@ -1,403 +0,0 @@
|
||||
WEBVTT
|
||||
|
||||
1
|
||||
00:00:01.500 --> 00:00:03.950
|
||||
歌名:One More Time,One More Chance
|
||||
〖愿往事重来〗
|
||||
|
||||
2
|
||||
00:00:04.000 --> 00:00:05.950
|
||||
【新海诚动画】『秒速5センチメートル』
|
||||
《秒速5厘米》主题曲
|
||||
|
||||
3
|
||||
00:00:06.000 --> 00:00:08.950
|
||||
编曲:森俊之
|
||||
|
||||
4
|
||||
00:00:09.000 --> 00:00:11.950
|
||||
作词|作曲|演唱:山崎まさよし <山崎将义>
|
||||
|
||||
5
|
||||
00:00:12.000 --> 00:00:15.950
|
||||
|
||||
|
||||
6
|
||||
00:00:16.000 --> 00:00:20.250
|
||||
これ以上何をう失(し)なえば
|
||||
【还要再失去什么】
|
||||
|
||||
7
|
||||
00:00:20.300 --> 00:00:23.250
|
||||
心は许(ゆる)されるの
|
||||
【才能让心得到宽恕?】
|
||||
|
||||
8
|
||||
00:00:23.300 --> 00:00:27.250
|
||||
どれ程(ほど)の痛(いた)みならば
|
||||
【还要再怎样痛苦】
|
||||
|
||||
9
|
||||
00:00:27.300 --> 00:00:30.250
|
||||
もう一度君に会(あ)える
|
||||
【才能与你再次相见】
|
||||
|
||||
10
|
||||
00:00:30.300 --> 00:00:33.250
|
||||
One more time
|
||||
|
||||
11
|
||||
00:00:33.300 --> 00:00:37.950
|
||||
季节(きせつ)よ うつろわないで
|
||||
【不愿看到季节的变迁】
|
||||
|
||||
12
|
||||
00:00:38.000 --> 00:00:41.050
|
||||
One more time
|
||||
|
||||
13
|
||||
00:00:41.100 --> 00:00:45.250
|
||||
ふざけあった时间(じかん)よ
|
||||
【曾与你嬉闹的时光啊】
|
||||
|
||||
14
|
||||
00:00:45.300 --> 00:00:49.250
|
||||
くいちがうときはいつも
|
||||
【每次争执的时候】
|
||||
|
||||
15
|
||||
00:00:49.300 --> 00:00:53.100
|
||||
仆が先(さき)に折(お)れたね
|
||||
【总是我先让步】
|
||||
|
||||
16
|
||||
00:00:53.150 --> 00:00:56.250
|
||||
わがままな性格(せいかく)が
|
||||
【你那任性的性格】
|
||||
|
||||
17
|
||||
00:00:56.300 --> 00:00:59.250
|
||||
なおさら爱(いと)しくさせた
|
||||
【反而令你更加可爱】
|
||||
|
||||
18
|
||||
00:00:59.300 --> 00:01:02.950
|
||||
One more chance
|
||||
|
||||
19
|
||||
00:01:03.000 --> 00:01:07.250
|
||||
记忆(きおく)に足(あし)を取(と)られて
|
||||
【回忆绊住我的脚步】
|
||||
|
||||
20
|
||||
00:01:07.300 --> 00:01:10.250
|
||||
One more chance
|
||||
|
||||
21
|
||||
00:01:10.300 --> 00:01:14.950
|
||||
次(つぎ)の场所を选(えら)べない
|
||||
【无法选择下个地方】
|
||||
|
||||
22
|
||||
00:01:15.000 --> 00:01:18.250
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
23
|
||||
00:01:18.300 --> 00:01:21.950
|
||||
どっかに君の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
24
|
||||
00:01:22.000 --> 00:01:23.950
|
||||
向(むか)いのホーム
|
||||
【对面的月台上】
|
||||
|
||||
25
|
||||
00:01:24.000 --> 00:01:25.950
|
||||
路地裏(ろじうら)の窓(まど)
|
||||
【在小巷的窗口里】
|
||||
|
||||
26
|
||||
00:01:26.000 --> 00:01:29.250
|
||||
こんなとこにいるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
27
|
||||
00:01:29.300 --> 00:01:33.250
|
||||
愿(ねが)いがもしも叶(かな)うなら
|
||||
【若愿望能够实现】
|
||||
|
||||
28
|
||||
00:01:33.300 --> 00:01:36.550
|
||||
いますぐ君のもとへ
|
||||
【好想马上去到你身边】
|
||||
|
||||
29
|
||||
00:01:36.600 --> 00:01:40.250
|
||||
できないことは もう何もない
|
||||
【如今我再也不会有丝毫退缩】
|
||||
|
||||
30
|
||||
00:01:40.300 --> 00:01:47.300
|
||||
すべてかけて抱きしめてみせるよ
|
||||
【我会不顾一切将你紧紧拥抱】
|
||||
|
||||
31
|
||||
00:01:47.350 --> 00:01:51.950
|
||||
|
||||
|
||||
32
|
||||
00:01:52.000 --> 00:01:55.250
|
||||
|
||||
|
||||
33
|
||||
00:01:55.300 --> 00:01:59.250
|
||||
寂(さび)しさ纷(まぎ)らすだけなら
|
||||
【如果只是为了排遣寂寞】
|
||||
|
||||
34
|
||||
00:01:59.300 --> 00:02:02.950
|
||||
谁でもいいはずなのに
|
||||
【其实不管是谁都无所谓】
|
||||
|
||||
35
|
||||
00:02:03.000 --> 00:02:07.250
|
||||
星が落(お)ちそうな夜(よる)だから
|
||||
【唯有在星辰仿佛要坠落的夜晚】
|
||||
|
||||
36
|
||||
00:02:07.300 --> 00:02:10.250
|
||||
自分(じぶん)をいつわれない
|
||||
【我无法欺骗自己】
|
||||
|
||||
37
|
||||
00:02:10.300 --> 00:02:13.250
|
||||
One more time
|
||||
|
||||
38
|
||||
00:02:13.300 --> 00:02:17.250
|
||||
季节(きせつ)よ うつろわないで
|
||||
【不愿看到季节的变迁】
|
||||
|
||||
39
|
||||
00:02:17.300 --> 00:02:20.250
|
||||
One more time
|
||||
|
||||
40
|
||||
00:02:20.300 --> 00:02:24.600
|
||||
ふざけあった时间(じかん)よ
|
||||
【曾与你嬉闹的时光啊】
|
||||
|
||||
41
|
||||
00:02:24.650 --> 00:02:25.250
|
||||
|
||||
|
||||
42
|
||||
00:02:25.300 --> 00:02:29.050
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
43
|
||||
00:02:29.100 --> 00:02:32.250
|
||||
どっかに君(きみ)の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
44
|
||||
00:02:32.300 --> 00:02:34.250
|
||||
交差点(こうさてん)でも
|
||||
【每个十字路口】
|
||||
|
||||
45
|
||||
00:02:34.300 --> 00:02:36.250
|
||||
梦の中でも 【每次梦境之中】
|
||||
|
||||
46
|
||||
00:02:36.300 --> 00:02:39.950
|
||||
こんなとこにいるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
47
|
||||
00:02:40.000 --> 00:02:43.250
|
||||
奇迹(きせき)がもしも起(お)こるなら
|
||||
【若奇迹将会发生】
|
||||
|
||||
48
|
||||
00:02:43.300 --> 00:02:46.950
|
||||
今すぐ君に见せたい
|
||||
【我希望马上就能见到你】
|
||||
|
||||
49
|
||||
00:02:47.000 --> 00:02:50.250
|
||||
新しい朝(あさ) これからの仆
|
||||
【无论崭新的清晨 还是今后的自己】
|
||||
|
||||
50
|
||||
00:02:50.300 --> 00:02:57.250
|
||||
言えなかった「好き」という言叶も
|
||||
【或是那句没能说出口的「喜欢你」】
|
||||
|
||||
51
|
||||
00:02:57.300 --> 00:03:04.450
|
||||
|
||||
|
||||
52
|
||||
00:03:04.500 --> 00:03:05.950
|
||||
|
||||
|
||||
53
|
||||
00:03:06.000 --> 00:03:13.950
|
||||
夏の想い出がまわる
|
||||
【夏日的回忆在脑海中回旋】
|
||||
|
||||
54
|
||||
00:03:14.000 --> 00:03:20.950
|
||||
ふいに消(き)えた鼓动(こどう)
|
||||
【刹那间消失的悸动】
|
||||
|
||||
55
|
||||
00:03:21.000 --> 00:03:24.950
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
56
|
||||
00:03:25.000 --> 00:03:27.950
|
||||
どっかに君の姿(すがた)を
|
||||
【寻觅着你的身影】
|
||||
|
||||
57
|
||||
00:03:28.000 --> 00:03:29.950
|
||||
明(あ)け方(がた)の街(まち)
|
||||
【在拂晓的街头】
|
||||
|
||||
58
|
||||
00:03:30.000 --> 00:03:31.950
|
||||
桜木町(さくらぎちょう)で
|
||||
【在种满樱树的小镇】
|
||||
|
||||
59
|
||||
00:03:32.000 --> 00:03:35.950
|
||||
こんなとこに来(く)るはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
60
|
||||
00:03:36.000 --> 00:03:39.250
|
||||
愿(ねが)いがもしも叶(かな)うなら
|
||||
【若愿望能够实现】
|
||||
|
||||
61
|
||||
00:03:39.300 --> 00:03:43.050
|
||||
今すぐ君のもとへ
|
||||
【现在马上去到你身边】
|
||||
|
||||
62
|
||||
00:03:43.100 --> 00:03:46.800
|
||||
できないことは もう何(なに)もない
|
||||
【如今我再也不会有丝毫退缩】
|
||||
|
||||
63
|
||||
00:03:46.850 --> 00:03:50.600
|
||||
すべてかけて抱きしめてみせるよ
|
||||
【我会不顾一切紧紧将你拥抱】
|
||||
|
||||
64
|
||||
00:03:50.650 --> 00:03:54.250
|
||||
いつでも捜(さが)しているよ
|
||||
【总是在一直寻觅】
|
||||
|
||||
65
|
||||
00:03:54.300 --> 00:03:57.700
|
||||
どっかに君のかけらを
|
||||
【寻觅着你的片断】
|
||||
|
||||
66
|
||||
00:03:57.750 --> 00:03:59.250
|
||||
旅先(たびさき)の店(みせ)
|
||||
【在旅途中的小店】
|
||||
|
||||
67
|
||||
00:03:59.300 --> 00:04:01.450
|
||||
新闻(しんぶん)の隅(すみ)
|
||||
【在报纸的角落】
|
||||
|
||||
68
|
||||
00:04:01.500 --> 00:04:04.950
|
||||
こんなとこにあるはずもないのに
|
||||
【尽管明知道你不可能在那里】
|
||||
|
||||
69
|
||||
00:04:05.000 --> 00:04:08.250
|
||||
奇迹(きせき)がもしも起(お)こるなら
|
||||
【若奇迹将会发生】
|
||||
|
||||
70
|
||||
00:04:08.300 --> 00:04:12.250
|
||||
今すぐ君に见せたい
|
||||
【我希望现在就能见到你】
|
||||
|
||||
71
|
||||
00:04:12.300 --> 00:04:16.050
|
||||
新しい朝(あさ) これからの仆
|
||||
【无论崭新的清晨 还是今后的自己】
|
||||
|
||||
72
|
||||
00:04:16.100 --> 00:04:19.400
|
||||
言えなかった「好き」という言叶も
|
||||
【或是那句没能说出口的「喜欢你」】
|
||||
|
||||
73
|
||||
00:04:19.450 --> 00:04:19.950
|
||||
|
||||
|
||||
74
|
||||
00:04:20.000 --> 00:04:22.950
|
||||
いつでも捜(さが)してしまう
|
||||
【总是在一直寻觅】
|
||||
|
||||
75
|
||||
00:04:23.000 --> 00:04:26.950
|
||||
どっかに君の笑颜(えがお)を
|
||||
【寻觅着你的笑容】
|
||||
|
||||
76
|
||||
00:04:27.000 --> 00:04:30.250
|
||||
急行(きゅうこう)待ちの 踏切(ふみきり)あたり
|
||||
【哪怕在等待列车通过的铁路道口】
|
||||
|
||||
77
|
||||
00:04:30.300 --> 00:04:34.250
|
||||
こんなとこにいるはずもないのに
|
||||
【虽然明明知道你不可能在那里】
|
||||
|
||||
78
|
||||
00:04:34.300 --> 00:04:37.950
|
||||
命(いのち)が缲(く)り返(かえ)すならば
|
||||
【如果生命能够重来】
|
||||
|
||||
79
|
||||
00:04:38.000 --> 00:04:41.050
|
||||
何度(なんど)も君のもとへ
|
||||
【无论几次我都要去你身边】
|
||||
|
||||
80
|
||||
00:04:41.100 --> 00:04:45.150
|
||||
欲(ほ)しいものなど もう何もない
|
||||
【那时我一定别无所求】
|
||||
|
||||
81
|
||||
00:04:45.200 --> 00:04:52.750
|
||||
君のほかに大切なものなど
|
||||
【再也没有什么比你更加重要】
|
||||
|
||||
82
|
||||
00:04:52.800 --> 00:05:10.950
|
||||
|
||||
|
||||
83
|
||||
00:05:11.000 --> 00:05:15.450
|
||||
|
||||
|
||||
84
|
||||
00:05:15.500 --> 00:05:25.500
|
||||
--终わり--
|
||||
|
||||
@@ -0,0 +1,142 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.artplayerPluginBacklight = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
function matrixCallback(callback) {
|
||||
var result = [];
|
||||
var x = 10;
|
||||
var y = 5;
|
||||
|
||||
for (var xIndex = 0; xIndex < x; xIndex += 1) {
|
||||
for (var yIndex = 0; yIndex < y; yIndex += 1) {
|
||||
if (xIndex === 0 || xIndex === x - 1 || yIndex === 0 || yIndex === y - 1) {
|
||||
result.push(callback(xIndex, yIndex, x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function getColors($canvas, $video, width, height) {
|
||||
var ctx = $canvas.getContext('2d');
|
||||
$canvas.width = width;
|
||||
$canvas.height = height;
|
||||
ctx.drawImage($video, 0, 0);
|
||||
return matrixCallback(function (xIndex, yIndex, x, y) {
|
||||
var itemW = width / x;
|
||||
var itemH = height / y;
|
||||
var itemX = xIndex * itemW;
|
||||
var itemY = yIndex * itemH;
|
||||
|
||||
var _ctx$getImageData = ctx.getImageData(itemX, itemY, itemW, itemH),
|
||||
data = _ctx$getImageData.data;
|
||||
|
||||
var r = 0;
|
||||
var g = 0;
|
||||
var b = 0;
|
||||
|
||||
for (var i = 0, l = data.length; i < l; i += 4) {
|
||||
r += data[i];
|
||||
g += data[i + 1];
|
||||
b += data[i + 2];
|
||||
}
|
||||
|
||||
r = Math.floor(r / (data.length / 4));
|
||||
g = Math.floor(g / (data.length / 4));
|
||||
b = Math.floor(b / (data.length / 4));
|
||||
return {
|
||||
r: r,
|
||||
g: g,
|
||||
b: b
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function creatMatrix(parent) {
|
||||
return matrixCallback(function (xIndex, yIndex, x, y) {
|
||||
var $box = document.createElement('div');
|
||||
$box.style.position = 'absolute';
|
||||
$box.style.left = "".concat(xIndex * 100 / x, "%");
|
||||
$box.style.top = "".concat(yIndex * 100 / y, "%");
|
||||
$box.style.width = "".concat(100 / x, "%");
|
||||
$box.style.height = "".concat(100 / y, "%");
|
||||
$box.style.webkitBorderRadius = '50%';
|
||||
$box.style.borderRadius = '50%';
|
||||
$box.style.webkitTransition = 'all .2s ease';
|
||||
$box.style.transition = 'all .2s ease';
|
||||
parent.appendChild($box);
|
||||
return {
|
||||
$box: $box,
|
||||
left: xIndex === 0,
|
||||
right: xIndex === x - 1,
|
||||
top: yIndex === 0,
|
||||
bottom: yIndex === y - 1
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function artplayerPluginBacklight(art) {
|
||||
var setStyles = art.constructor.utils.setStyles;
|
||||
var _art$template = art.template,
|
||||
$player = _art$template.$player,
|
||||
$video = _art$template.$video,
|
||||
player = art.player;
|
||||
var $backlight = document.createElement('div');
|
||||
$backlight.classList.add('artplayer-backlight');
|
||||
setStyles($backlight, {
|
||||
position: 'absolute',
|
||||
zIndex: 9,
|
||||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
});
|
||||
var matrix = creatMatrix($backlight);
|
||||
var $canvas = document.createElement('canvas');
|
||||
$player.insertBefore($backlight, $video);
|
||||
|
||||
(function loop() {
|
||||
window.requestAnimationFrame(function () {
|
||||
if (player.playing) {
|
||||
var clientWidth = $video.clientWidth,
|
||||
clientHeight = $video.clientHeight;
|
||||
var colors = getColors($canvas, $video, clientWidth, clientHeight);
|
||||
colors.forEach(function (_ref, index) {
|
||||
var r = _ref.r,
|
||||
g = _ref.g,
|
||||
b = _ref.b;
|
||||
var _matrix$index = matrix[index],
|
||||
$box = _matrix$index.$box,
|
||||
left = _matrix$index.left,
|
||||
right = _matrix$index.right,
|
||||
top = _matrix$index.top,
|
||||
bottom = _matrix$index.bottom; // eslint-disable-next-line no-nested-ternary
|
||||
|
||||
var x = left ? '-64px' : right ? '64px' : '0'; // eslint-disable-next-line no-nested-ternary
|
||||
|
||||
var y = top ? '-64px' : bottom ? '64px' : '0';
|
||||
$box.style.webkitBoxShadow = "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ") ").concat(x, " ").concat(y, " 128px");
|
||||
$box.style.boxShadow = "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ") ").concat(x, " ").concat(y, " 128px");
|
||||
});
|
||||
}
|
||||
|
||||
if (!art.isDestroy) {
|
||||
loop();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
return {
|
||||
name: 'artplayerPluginBacklight'
|
||||
};
|
||||
}
|
||||
|
||||
return artplayerPluginBacklight;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=artplayer-plugin-backlight.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-plugin-backlight.js","sources":["../../packages/artplayer-plugin-backlight/src/index.js"],"sourcesContent":["function matrixCallback(callback) {\n const result = [];\n const x = 10;\n const y = 5;\n for (let xIndex = 0; xIndex < x; xIndex += 1) {\n for (let yIndex = 0; yIndex < y; yIndex += 1) {\n if (xIndex === 0 || xIndex === x - 1 || yIndex === 0 || yIndex === y - 1) {\n result.push(callback(xIndex, yIndex, x, y));\n }\n }\n }\n return result;\n}\n\nfunction getColors($canvas, $video, width, height) {\n const ctx = $canvas.getContext('2d');\n $canvas.width = width;\n $canvas.height = height;\n ctx.drawImage($video, 0, 0);\n return matrixCallback((xIndex, yIndex, x, y) => {\n const itemW = width / x;\n const itemH = height / y;\n const itemX = xIndex * itemW;\n const itemY = yIndex * itemH;\n const { data } = ctx.getImageData(itemX, itemY, itemW, itemH);\n let r = 0;\n let g = 0;\n let b = 0;\n for (let i = 0, l = data.length; i < l; i += 4) {\n r += data[i];\n g += data[i + 1];\n b += data[i + 2];\n }\n r = Math.floor(r / (data.length / 4));\n g = Math.floor(g / (data.length / 4));\n b = Math.floor(b / (data.length / 4));\n return { r, g, b };\n });\n}\n\nfunction creatMatrix(parent) {\n return matrixCallback((xIndex, yIndex, x, y) => {\n const $box = document.createElement('div');\n $box.style.position = 'absolute';\n $box.style.left = `${xIndex * 100 / x}%`;\n $box.style.top = `${yIndex * 100 / y}%`;\n $box.style.width = `${100 / x}%`;\n $box.style.height = `${100 / y}%`;\n $box.style.webkitBorderRadius = '50%';\n $box.style.borderRadius = '50%';\n $box.style.webkitTransition = 'all .2s ease';\n $box.style.transition = 'all .2s ease';\n parent.appendChild($box);\n return {\n $box,\n left: xIndex === 0,\n right: xIndex === x - 1,\n top: yIndex === 0,\n bottom: yIndex === y - 1,\n };\n });\n}\n\nfunction artplayerPluginBacklight(art) {\n const { setStyles } = art.constructor.utils;\n const {\n template: { $player, $video },\n player,\n } = art;\n\n const $backlight = document.createElement('div');\n $backlight.classList.add('artplayer-backlight');\n setStyles($backlight, {\n position: 'absolute',\n zIndex: 9,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n });\n\n const matrix = creatMatrix($backlight);\n const $canvas = document.createElement('canvas');\n $player.insertBefore($backlight, $video);\n\n (function loop() {\n window.requestAnimationFrame(() => {\n if (player.playing) {\n const { clientWidth, clientHeight } = $video;\n const colors = getColors($canvas, $video, clientWidth, clientHeight);\n colors.forEach(({ r, g, b }, index) => {\n const { $box, left, right, top, bottom } = matrix[index];\n // eslint-disable-next-line no-nested-ternary\n const x = left ? '-64px' : right ? '64px' : '0';\n // eslint-disable-next-line no-nested-ternary\n const y = top ? '-64px' : bottom ? '64px' : '0';\n $box.style.webkitBoxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;\n $box.style.boxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;\n }); \n };\n\n if (!art.isDestroy) {\n loop();\n }\n });\n })();\n\n return {\n name: 'artplayerPluginBacklight',\n };\n}\n\nexport default artplayerPluginBacklight;"],"names":["matrixCallback","callback","result","x","y","xIndex","yIndex","push","getColors","$canvas","$video","width","height","ctx","getContext","drawImage","itemW","itemH","itemX","itemY","getImageData","data","r","g","b","i","l","length","Math","floor","creatMatrix","parent","$box","document","createElement","style","position","left","top","webkitBorderRadius","borderRadius","webkitTransition","transition","appendChild","right","bottom","artplayerPluginBacklight","art","setStyles","constructor","utils","template","$player","player","$backlight","classList","add","zIndex","matrix","insertBefore","loop","window","requestAnimationFrame","playing","clientWidth","clientHeight","colors","forEach","index","webkitBoxShadow","boxShadow","isDestroy","name"],"mappings":";;;;;;IAAA,SAASA,cAAT,CAAwBC,QAAxB,EAAkC;IAC9B,MAAMC,MAAM,GAAG,EAAf;IACA,MAAMC,CAAC,GAAG,EAAV;IACA,MAAMC,CAAC,GAAG,CAAV;;IACA,OAAK,IAAIC,MAAM,GAAG,CAAlB,EAAqBA,MAAM,GAAGF,CAA9B,EAAiCE,MAAM,IAAI,CAA3C,EAA8C;IAC1C,SAAK,IAAIC,MAAM,GAAG,CAAlB,EAAqBA,Line truncated
|
||||
@@ -0,0 +1,701 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.artplayerPluginDanmuku = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
var defineProperty = _defineProperty;
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var classCallCheck = _classCallCheck;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
var createClass = _createClass;
|
||||
|
||||
var i18n = {
|
||||
'zh-cn': {
|
||||
'Danmu opacity': '弹幕透明度',
|
||||
'Danmu speed': '弹幕速度',
|
||||
'Danmu size': '弹幕大小',
|
||||
'Danmu text cannot be empty': '弹幕文本不能为空',
|
||||
'The length of the danmu does not exceed': '弹幕文本字数不能超过',
|
||||
'Danmu speed synchronous playback multiple': '弹幕速度同步播放倍数'
|
||||
},
|
||||
'zh-tw': {
|
||||
'Danmu opacity': '彈幕透明度',
|
||||
'Danmu speed': '彈幕速度',
|
||||
'Danmu size': '弹幕大小',
|
||||
'Danmu text cannot be empty': '彈幕文本不能為空',
|
||||
'The length of the danmu does not exceed': '彈幕文本字數不能超過',
|
||||
'Danmu speed synchronous playback multiple': '彈幕速度同步播放倍數'
|
||||
}
|
||||
};
|
||||
|
||||
function opacity(art) {
|
||||
var i18n = art.i18n,
|
||||
proxy = art.events.proxy;
|
||||
return {
|
||||
name: 'danmuku-opacity',
|
||||
index: 10,
|
||||
html: "\n <div class=\"art-setting-header\">\n ".concat(i18n.get('Danmu opacity'), ": <span class=\"art-value\">100</span>%\n </div>\n <div class=\"art-setting-range\">\n <input type=\"range\" value=\"1\" min=\"0.1\" max=\"1\" step=\"0.1\">\n </div>\n "),
|
||||
mounted: function mounted($setting) {
|
||||
var $range = $setting.querySelector('input[type=range]');
|
||||
var $value = $setting.querySelector('.art-value');
|
||||
proxy($range, 'change', function () {
|
||||
var value = $range.value;
|
||||
$value.innerText = Number(value) * 100;
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
opacity: Number(value)
|
||||
});
|
||||
});
|
||||
art.on('artplayerPluginDanmuku:config', function (config) {
|
||||
if ($range.value !== config.opacity) {
|
||||
$range.value = config.opacity;
|
||||
$value.innerText = config.opacity * 100;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
function size(art) {
|
||||
var i18n = art.i18n,
|
||||
proxy = art.events.proxy;
|
||||
return {
|
||||
name: 'danmuku-size',
|
||||
index: 11,
|
||||
html: "\n <div class=\"art-setting-header\">\n ".concat(i18n.get('Danmu size'), ": <span class=\"art-value\">25</span>px\n </div>\n <div class=\"art-setting-range\">\n <input type=\"range\" value=\"25\" min=\"14\" max=\"30\" step=\"1\">\n </div>\n "),
|
||||
mounted: function mounted($setting) {
|
||||
var $range = $setting.querySelector('input[type=range]');
|
||||
var $value = $setting.querySelector('.art-value');
|
||||
proxy($range, 'change', function () {
|
||||
var value = $range.value;
|
||||
$value.innerText = value;
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
fontSize: Number(value)
|
||||
});
|
||||
});
|
||||
art.on('artplayerPluginDanmuku:config', function (config) {
|
||||
if ($range.value !== config.fontSize) {
|
||||
$range.value = config.fontSize;
|
||||
$value.innerText = config.fontSize;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
function speed(art) {
|
||||
var i18n = art.i18n,
|
||||
proxy = art.events.proxy;
|
||||
return {
|
||||
name: 'danmuku-speed',
|
||||
index: 12,
|
||||
html: "\n <div class=\"art-setting-header\">\n ".concat(i18n.get('Danmu speed'), ": <span class=\"art-value\">5</span>s\n </div>\n <div class=\"art-setting-range\">\n <input type=\"range\" value=\"5\" min=\"1\" max=\"10\" step=\"1\">\n </div>\n "),
|
||||
mounted: function mounted($setting) {
|
||||
var $range = $setting.querySelector('input[type=range]');
|
||||
var $value = $setting.querySelector('.art-value');
|
||||
proxy($range, 'change', function () {
|
||||
var value = $range.value;
|
||||
$value.innerText = value;
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
speed: Number(value)
|
||||
});
|
||||
});
|
||||
art.on('artplayerPluginDanmuku:config', function (config) {
|
||||
if ($range.value !== config.speed) {
|
||||
$range.value = config.speed;
|
||||
$value.innerText = config.speed;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
function synchronousPlayback(art) {
|
||||
var i18n = art.i18n,
|
||||
proxy = art.events.proxy;
|
||||
return {
|
||||
name: 'danmuku-synchronousPlayback',
|
||||
index: 13,
|
||||
html: "\n <label class=\"art-setting-checkbox\">\n <input type=\"checkbox\"/>".concat(i18n.get('Danmu speed synchronous playback multiple'), "\n </label>\n "),
|
||||
mounted: function mounted($setting) {
|
||||
var $checkbox = $setting.querySelector('input[type=checkbox]');
|
||||
proxy($checkbox, 'change', function () {
|
||||
art.plugins.artplayerPluginDanmuku.config({
|
||||
synchronousPlayback: $checkbox.checked
|
||||
});
|
||||
});
|
||||
art.on('artplayerPluginDanmuku:config', function (config) {
|
||||
if ($checkbox.checked !== config.synchronousPlayback) {
|
||||
$checkbox.checked = config.synchronousPlayback;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function filter(queue, state, callback) {
|
||||
return queue.filter(function (danmu) {
|
||||
return danmu.$state === state;
|
||||
}).map(callback);
|
||||
}
|
||||
function getRect(ref, key) {
|
||||
var result = ref.getBoundingClientRect();
|
||||
return key ? result[key] : result;
|
||||
}
|
||||
function getDanmuRef(queue) {
|
||||
var result = queue.find(function (danmu) {
|
||||
return danmu.$ref && danmu.$state === 'wait';
|
||||
});
|
||||
|
||||
if (result) {
|
||||
var _$ref = result.$ref;
|
||||
result.$ref = null;
|
||||
return _$ref;
|
||||
}
|
||||
|
||||
var $ref = document.createElement('div');
|
||||
$ref.style.cssText = "\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-family: SimHei, \"Microsoft JhengHei\", Arial, Helvetica, sans-serif;\n font-weight: normal;\n line-height: 1.125;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ";
|
||||
return $ref;
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
var arrayWithHoles = _arrayWithHoles;
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
||||
return;
|
||||
}
|
||||
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"] != null) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
var iterableToArrayLimit = _iterableToArrayLimit;
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
|
||||
var nonIterableRest = _nonIterableRest;
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
||||
}
|
||||
|
||||
var slicedToArray = _slicedToArray;
|
||||
|
||||
function getMode(key) {
|
||||
switch (key) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
return 0;
|
||||
|
||||
case 4:
|
||||
case 5:
|
||||
return 1;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
function bilibiliDanmuParseFromXml(xmlString) {
|
||||
if (typeof xmlString !== 'string') return [];
|
||||
var srtList = xmlString.match(/<d([\S ]*?>[\S ]*?)<\/d>/gi);
|
||||
return srtList.length ? srtList.map(function (item) {
|
||||
var _item$match = item.match(/<d p="(.+)">(.+)<\/d>/),
|
||||
_item$match2 = slicedToArray(_item$match, 3),
|
||||
attrStr = _item$match2[1],
|
||||
text = _item$match2[2];
|
||||
|
||||
var attr = attrStr.split(',');
|
||||
return attr.length === 8 && text.trim() ? {
|
||||
text: text,
|
||||
time: Number(attr[0]),
|
||||
mode: getMode(Number(attr[1])),
|
||||
fontSize: Number(attr[2]),
|
||||
color: "#".concat(Number(attr[3]).toString(16)),
|
||||
timestamp: Number(attr[4]),
|
||||
pool: Number(attr[5]),
|
||||
userID: attr[6],
|
||||
rowID: Number(attr[7])
|
||||
} : null;
|
||||
}) : [];
|
||||
}
|
||||
function bilibiliDanmuParseFromUrl(url) {
|
||||
return fetch(url).then(function (res) {
|
||||
return res.text();
|
||||
}).then(function (xmlString) {
|
||||
return bilibiliDanmuParseFromXml(xmlString);
|
||||
});
|
||||
}
|
||||
|
||||
function calculatedTop(danmus) {
|
||||
var top = 0;
|
||||
var topMap = {};
|
||||
|
||||
for (var index = 0; index < danmus.length; index += 1) {
|
||||
var item = danmus[index];
|
||||
|
||||
if (topMap[item.top]) {
|
||||
topMap[item.top].push(item);
|
||||
} else {
|
||||
topMap[item.top] = [item];
|
||||
}
|
||||
}
|
||||
|
||||
var topMapKeys = Object.keys(topMap);
|
||||
var maxDiff = 0;
|
||||
|
||||
for (var _index = 1; _index < danmus.length; _index += 1) {
|
||||
var _item = danmus[_index];
|
||||
var prev = danmus[_index - 1];
|
||||
var prevTop = prev.top + prev.height;
|
||||
var diff = _item.top - prevTop;
|
||||
|
||||
if (diff > maxDiff) {
|
||||
top = prevTop;
|
||||
maxDiff = diff;
|
||||
}
|
||||
}
|
||||
|
||||
if (top === 0) {
|
||||
var maxRight = 0;
|
||||
|
||||
for (var _index2 = 0; _index2 < topMapKeys.length; _index2 += 1) {
|
||||
var minRight = danmus[0].width;
|
||||
var topKey = topMapKeys[_index2];
|
||||
var danmuArr = topMap[topKey];
|
||||
|
||||
for (var _index3 = 0; _index3 < danmuArr.length; _index3 += 1) {
|
||||
var danmu = danmuArr[_index3];
|
||||
|
||||
if (danmu.right < minRight) {
|
||||
minRight = danmu.right;
|
||||
}
|
||||
}
|
||||
|
||||
if (minRight > maxRight) {
|
||||
maxRight = minRight;
|
||||
|
||||
var _danmuArr = slicedToArray(danmuArr, 1);
|
||||
|
||||
top = _danmuArr[0].top;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (top === 0) {
|
||||
var _topMapKeys$filter$so = topMapKeys.filter(function (item, index) {
|
||||
return index !== 0 && index !== topMapKeys.length - 1;
|
||||
}).sort(function (prev, next) {
|
||||
return topMap[prev].length - topMap[next].length;
|
||||
});
|
||||
|
||||
var _topMapKeys$filter$so2 = slicedToArray(_topMapKeys$filter$so, 1);
|
||||
|
||||
top = _topMapKeys$filter$so2[0];
|
||||
}
|
||||
|
||||
return top;
|
||||
}
|
||||
|
||||
function getDanmuTop(ins, danmu) {
|
||||
var _ins$option$margin = slicedToArray(ins.option.margin, 2),
|
||||
marginTop = _ins$option$margin[0],
|
||||
marginBottom = _ins$option$margin[1];
|
||||
|
||||
var playerData = getRect(ins.art.template.$player);
|
||||
var danmus = ins.queue.filter(function (item) {
|
||||
return item.mode === danmu.mode && item.$state === 'emit' && item.$ref && item.$ref.style.fontSize === danmu.$ref.style.fontSize && parseFloat(item.$ref.style.top) <= playerData.height - marginBottom;
|
||||
}).map(function (item) {
|
||||
var danmuData = getRect(item.$ref);
|
||||
var width = danmuData.width,
|
||||
height = danmuData.height;
|
||||
var top = danmuData.top - playerData.top;
|
||||
var left = danmuData.left - playerData.left;
|
||||
var right = playerData.width - left - width;
|
||||
return {
|
||||
top: top,
|
||||
left: left,
|
||||
height: height,
|
||||
width: width,
|
||||
right: right
|
||||
};
|
||||
}).sort(function (prev, next) {
|
||||
return prev.top - next.top;
|
||||
});
|
||||
|
||||
if (danmus.length === 0) {
|
||||
return marginTop;
|
||||
}
|
||||
|
||||
danmus.unshift({
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: marginTop,
|
||||
width: playerData.width
|
||||
});
|
||||
danmus.push({
|
||||
top: playerData.height - marginBottom,
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: marginBottom,
|
||||
width: playerData.width
|
||||
});
|
||||
return calculatedTop(danmus);
|
||||
}
|
||||
|
||||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
||||
|
||||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
||||
|
||||
var Danmuku =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
function Danmuku(art, option) {
|
||||
var _this = this;
|
||||
|
||||
classCallCheck(this, Danmuku);
|
||||
|
||||
art.i18n.update(i18n);
|
||||
art.setting.add(opacity);
|
||||
art.setting.add(size);
|
||||
art.setting.add(speed);
|
||||
art.setting.add(synchronousPlayback);
|
||||
this.art = art;
|
||||
this.queue = [];
|
||||
this.option = {};
|
||||
this.config(option);
|
||||
this.isStop = false;
|
||||
this.animationFrameTimer = null;
|
||||
this.$danmuku = art.template.$danmuku;
|
||||
art.on('video:play', this.start.bind(this));
|
||||
art.on('video:playing', this.start.bind(this));
|
||||
art.on('video:pause', this.stop.bind(this));
|
||||
art.on('video:waiting', this.stop.bind(this));
|
||||
art.on('resize', this.resize.bind(this));
|
||||
art.on('destroy', this.stop.bind(this));
|
||||
|
||||
if (typeof this.option.danmuku === 'function') {
|
||||
this.option.danmuku().then(function (danmus) {
|
||||
danmus.forEach(_this.emit.bind(_this));
|
||||
art.emit('artplayerPluginDanmuku:loaded');
|
||||
});
|
||||
} else if (typeof this.option.danmuku === 'string') {
|
||||
bilibiliDanmuParseFromUrl(this.option.danmuku).then(function (danmus) {
|
||||
danmus.forEach(_this.emit.bind(_this));
|
||||
art.emit('artplayerPluginDanmuku:loaded');
|
||||
});
|
||||
} else {
|
||||
this.option.danmuku.forEach(this.emit.bind(this));
|
||||
art.emit('artplayerPluginDanmuku:loaded');
|
||||
}
|
||||
}
|
||||
|
||||
createClass(Danmuku, [{
|
||||
key: "config",
|
||||
value: function config(option) {
|
||||
var _this$art$constructor = this.art.constructor,
|
||||
clamp = _this$art$constructor.utils.clamp,
|
||||
validator = _this$art$constructor.validator;
|
||||
this.option = Object.assign({}, Danmuku.option, this.option, option);
|
||||
validator(this.option, Danmuku.scheme);
|
||||
this.option.speed = clamp(this.option.speed, 1, 10);
|
||||
this.option.maxlength = clamp(this.option.maxlength, 10, 100);
|
||||
this.option.margin[0] = clamp(this.option.margin[0], 0, 100);
|
||||
this.option.margin[1] = clamp(this.option.margin[1], 0, 100);
|
||||
this.option.opacity = clamp(this.option.opacity, 0, 1);
|
||||
this.option.fontSize = clamp(this.option.fontSize, 12, 30);
|
||||
this.art.emit('artplayerPluginDanmuku:config', this.option);
|
||||
}
|
||||
}, {
|
||||
key: "continue",
|
||||
value: function _continue() {
|
||||
filter(this.queue, 'stop', function (danmu) {
|
||||
danmu.$state = 'emit';
|
||||
danmu.$lastStartTime = Date.now();
|
||||
|
||||
switch (danmu.mode) {
|
||||
case 0:
|
||||
danmu.$ref.style.transform = "translateX(".concat(-danmu.$restWidth, "px) translateY(0px) translateZ(0px)");
|
||||
danmu.$ref.style.transition = "transform ".concat(danmu.$restTime, "s linear 0s");
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "suspend",
|
||||
value: function suspend() {
|
||||
var $player = this.art.template.$player;
|
||||
filter(this.queue, 'emit', function (danmu) {
|
||||
danmu.$state = 'stop';
|
||||
|
||||
switch (danmu.mode) {
|
||||
case 0:
|
||||
{
|
||||
var _getRect = getRect($player),
|
||||
playerLeft = _getRect.left,
|
||||
playerWidth = _getRect.width;
|
||||
|
||||
var _getRect2 = getRect(danmu.$ref),
|
||||
danmuLeft = _getRect2.left;
|
||||
|
||||
var translateX = playerWidth - (danmuLeft - playerLeft) + 5;
|
||||
danmu.$ref.style.transform = "translateX(".concat(-translateX, "px) translateY(0px) translateZ(0px)");
|
||||
danmu.$ref.style.transition = 'transform 0s linear 0s';
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "resize",
|
||||
value: function resize() {
|
||||
var $player = this.art.template.$player;
|
||||
var danmuLeft = getRect($player, 'width');
|
||||
filter(this.queue, 'wait', function (danmu) {
|
||||
if (danmu.$ref) {
|
||||
danmu.$ref.style.border = 'none';
|
||||
danmu.$ref.style.left = "".concat(danmuLeft, "px");
|
||||
danmu.$ref.style.marginLeft = '0px';
|
||||
danmu.$ref.style.transform = 'translateX(0px) translateY(0px) translateZ(0px)';
|
||||
danmu.$ref.style.transition = 'transform 0s linear 0s';
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "update",
|
||||
value: function update() {
|
||||
var _this2 = this;
|
||||
|
||||
var _this$art = this.art,
|
||||
player = _this$art.player,
|
||||
$player = _this$art.template.$player;
|
||||
this.animationFrameTimer = window.requestAnimationFrame(function () {
|
||||
if (player.playing) {
|
||||
var danmuLeft = getRect($player, 'width');
|
||||
filter(_this2.queue, 'emit', function (danmu) {
|
||||
danmu.$restTime -= (Date.now() - danmu.$lastStartTime) / 1000;
|
||||
danmu.$lastStartTime = Date.now();
|
||||
|
||||
if (danmu.$restTime <= 0) {
|
||||
danmu.$state = 'wait';
|
||||
danmu.$ref.style.border = 'none';
|
||||
danmu.$ref.style.left = "".concat(danmuLeft, "px");
|
||||
danmu.$ref.style.marginLeft = '0px';
|
||||
danmu.$ref.style.transform = 'translateX(0px) translateY(0px) translateZ(0px)';
|
||||
danmu.$ref.style.transition = 'transform 0s linear 0s';
|
||||
}
|
||||
});
|
||||
|
||||
_this2.queue.filter(function (danmu) {
|
||||
return player.currentTime + 0.1 >= danmu.time && danmu.time >= player.currentTime - 0.1 && danmu.$state === 'wait';
|
||||
}).forEach(function (danmu) {
|
||||
danmu.$ref = getDanmuRef(_this2.queue);
|
||||
|
||||
_this2.$danmuku.appendChild(danmu.$ref);
|
||||
|
||||
danmu.$ref.style.opacity = _this2.option.opacity;
|
||||
danmu.$ref.style.fontSize = "".concat(_this2.option.fontSize, "px");
|
||||
danmu.$ref.innerText = danmu.text;
|
||||
danmu.$ref.style.color = danmu.color;
|
||||
danmu.$ref.style.border = danmu.border ? "1px solid ".concat(danmu.color) : 'none';
|
||||
danmu.$restTime = _this2.option.synchronousPlayback && player.playbackRate ? _this2.option.speed / Number(player.playbackRate) : _this2.option.speed;
|
||||
danmu.$lastStartTime = Date.now();
|
||||
var danmuWidth = getRect(danmu.$ref, 'width');
|
||||
var danmuTop = getDanmuTop(_this2, danmu);
|
||||
danmu.$state = 'emit';
|
||||
|
||||
switch (danmu.mode) {
|
||||
case 0:
|
||||
{
|
||||
danmu.$restWidth = danmuLeft + danmuWidth + 5;
|
||||
danmu.$ref.style.left = "".concat(danmuLeft, "px");
|
||||
danmu.$ref.style.top = "".concat(danmuTop, "px");
|
||||
danmu.$ref.style.transform = "translateX(".concat(-danmu.$restWidth, "px) translateY(0px) translateZ(0px)");
|
||||
danmu.$ref.style.transition = "transform ".concat(danmu.$restTime, "s linear 0s");
|
||||
break;
|
||||
}
|
||||
|
||||
case 1:
|
||||
danmu.$ref.style.top = "".concat(danmuTop, "px");
|
||||
danmu.$ref.style.left = '50%';
|
||||
danmu.$ref.style.marginLeft = "-".concat(danmuWidth / 2, "px");
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!_this2.isStop) {
|
||||
_this2.update();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "stop",
|
||||
value: function stop() {
|
||||
this.isStop = true;
|
||||
this.suspend();
|
||||
window.cancelAnimationFrame(this.animationFrameTimer);
|
||||
this.art.emit('artplayerPluginDanmuku:stop');
|
||||
}
|
||||
}, {
|
||||
key: "start",
|
||||
value: function start() {
|
||||
this.isStop = false;
|
||||
this.continue();
|
||||
this.update();
|
||||
this.art.emit('artplayerPluginDanmuku:start');
|
||||
}
|
||||
}, {
|
||||
key: "show",
|
||||
value: function show() {
|
||||
this.$danmuku.style = 'block';
|
||||
this.art.emit('artplayerPluginDanmuku:show');
|
||||
}
|
||||
}, {
|
||||
key: "hide",
|
||||
value: function hide() {
|
||||
this.$danmuku.style = 'none';
|
||||
this.art.emit('artplayerPluginDanmuku:hide');
|
||||
}
|
||||
}, {
|
||||
key: "emit",
|
||||
value: function emit(danmu) {
|
||||
var _this$art2 = this.art,
|
||||
notice = _this$art2.notice,
|
||||
player = _this$art2.player,
|
||||
i18n = _this$art2.i18n;
|
||||
|
||||
if (!danmu.text.trim()) {
|
||||
notice.show = i18n.get('Danmu text cannot be empty');
|
||||
return;
|
||||
}
|
||||
|
||||
if (danmu.text.length > this.option.maxlength) {
|
||||
notice.show = "".concat(i18n.get('The length of the danmu does not exceed'), " ").concat(this.option.maxlength);
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof danmu.time !== 'number') {
|
||||
danmu.time = player.currentTime;
|
||||
}
|
||||
|
||||
this.queue.push(_objectSpread({
|
||||
mode: 0
|
||||
}, danmu, {
|
||||
$state: 'wait',
|
||||
$ref: null,
|
||||
$restTime: 0,
|
||||
$lastStartTime: 0,
|
||||
$restWidth: 0
|
||||
}));
|
||||
}
|
||||
}], [{
|
||||
key: "option",
|
||||
get: function get() {
|
||||
return {
|
||||
danmuku: [],
|
||||
speed: 5,
|
||||
maxlength: 50,
|
||||
margin: [10, 100],
|
||||
opacity: 1,
|
||||
fontSize: 25,
|
||||
synchronousPlayback: false
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: "scheme",
|
||||
get: function get() {
|
||||
return {
|
||||
danmuku: 'array|function|string',
|
||||
speed: 'number',
|
||||
maxlength: 'number',
|
||||
margin: 'array',
|
||||
opacity: 'number',
|
||||
fontSize: 'number',
|
||||
synchronousPlayback: 'boolean'
|
||||
};
|
||||
}
|
||||
}]);
|
||||
|
||||
return Danmuku;
|
||||
}();
|
||||
|
||||
function artplayerPluginDanmuku(option) {
|
||||
return function (art) {
|
||||
var danmuku = new Danmuku(art, option);
|
||||
return {
|
||||
name: 'artplayerPluginDanmuku',
|
||||
emit: danmuku.emit.bind(danmuku),
|
||||
config: danmuku.config.bind(danmuku),
|
||||
hide: danmuku.hide.bind(danmuku),
|
||||
show: danmuku.show.bind(danmuku)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
return artplayerPluginDanmuku;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=artplayer-plugin-danmuku.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-plugin-danmuku.js","sources":["../../node_modules/@babel/runtime/helpers/defineProperty.js","../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../node_modules/@babel/runtime/helpers/createClass.js","../../packages/artplayer-plugin-danmuku/src/i18n.js","../../packages/artplayer-plugin-danmuku/src/setting.js","../../packages/artplayer-plugin-danmuku/src/utils.js","../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../../node_modules/@babel/runtime/helpers/nonIterableRest.js","../../node_modules/@babel/runtime/helpers/slicedToArray.js","../../packages/artplayer-plugin-danmuku/src/bilibili.js","../../packages/artplayer-plugin-danmuku/src/getDanmuTop.js","../../packages/artplayer-plugin-danmuku/src/danmuku.js","../../packages/artplayer-plugin-danmuku/src/index.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","export default {\n 'zh-cn': {\n 'Danmu opacity': '弹幕透明度',\n 'Danmu speed': '弹幕速度',\n 'Danmu size': '弹幕大小',\n 'Danmu text cannot be empty': '弹幕文本不能为空',\n 'The length of the danmu does not exceed': '弹幕文本字数不能超过',\n 'Danmu speed synchronous playback multiple': '弹幕速度同步播放倍数',\n },\n 'zh-tw': {\n 'Danmu opacity': '彈幕透明度',\n 'Danmu speed': '彈幕速度',\n 'Danmu size': '弹幕大小',\n 'Danmu text cannot be empty': '彈幕文本不能為空',\n 'The length of the danmu does not exceed': '彈幕文本字數不能超過',\n 'Danmu speed synchronous playback multiple': '彈幕速度同步播放倍數',\n },\n};","export function opacity(art) {\n const {\n i18n,\n events: { proxy },\n } = art;\n\n return {\n name: 'danmuku-opacity',\n index: 10,\n html: `\n <div class=\"art-setting-header\">\n ${i18n.get('Danmu opacity')}: <span class=\"art-value\">100</span>%\n </div>\n <div class=\"art-setting-range\">\n <input type=\"range\" value=\"1\" min=\"0.1\" max=\"1\" step=\"0.1\">\n </div>\n `,\n mounted: $setting => {\n const $range = $setting.querySelector('input[type=range]');\n const $value = $setting.querySelector('.art-value');\n proxy($range, 'change', () => {\n const { value } = $range;\n $value.innerText = Number(value) * 100;\n\n art.plugins.artplayerPluginDanmuku.config({\n opacity: Number(value),\n });\n });\n\n art.on('artplayerPluginDanmuku:config', config => {\n if ($range.value !== config.opacity) {\n $range.value = config.opacity;\n $value.innerText = config.opacity * 100;\n }\n });\n },\n };\n}\n\nexport function size(art) {\n const {\n i18n,\n events: { proxy },\n } = art;\n\n return {\n name: 'danmuku-size',\n index: 11,\n html: `\n <div class=\"art-setting-header\">\n ${i18n.get('Danmu size')}: <span class=\"art-value\">25</span>px\n </div>\n <div class=\"art-setting-range\">\n <input type=\"range\" value=\"25\" min=\"14\" max=\"30\" step=\"1\">\n </div>\n `,\n mounted: $setting => {\n const $range = $setting.querySelector('input[type=range]');\n const $value = $setting.querySelector('.art-value');\n proxy($range, 'change', () => {\n const { value } = $range;\n $value.innerText = value;\n\n art.plugins.artplayerPluginDanmuku.config({\n fLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-plugin-gif.js","sources":["../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/defineProperty.js","../../packages/artplayer-plugin-gif/node_modules/gifshot/dist/gifshot.js","../../packages/artplayer-plugin-gif/node_modules/b64-to-blob/b64toBlob.js","../../packages/artplayer-plugin-gif/src/index.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;","/*Copyrights for code authored by Yahoo Inc. is licensed under the following terms:\nMIT License\nCopyright 2017 Yahoo Inc.\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n;(function(window, document, navigator, undefined) {\n\"use strict\";\n\n/*\n utils.js\n ========\n*/\n\n/* Copyright 2017 Yahoo Inc.\n * Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.\n*/\n\nvar utils = {\n URL: window.URL || window.webkitURL || window.mozURL || window.msURL,\n getUserMedia: function () {\n var getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;\n\n return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;\n }(),\n requestAnimFrame: window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame,\n requestTimeout: function requestTimeout(callback, delay) {\n callback = callback || utils.noop;\n delay = delay || 0;\n\n if (!utils.requestAnimFrame) {\n return setTimeout(callback, delay);\n }\n\n var start = new Date().getTime();\n var handle = new Object();\n var requestAnimFrame = utils.requestAnimFrame;\n\n var loop = function loop() {\n var current = new Date().getTime();\n var delta = current - start;\n\n delta >= delay ? callback.call() : handle.value = requestAnimFrame(loop);\n };\n\n handle.value = requestAnimFrame(loop);\n\n return handle;\n },\n Blob: window.Blob || window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder,\n btoa: function () {\n var btoa = window.btoa || function (input) {\n var output = '';\n var i = 0;\n var l = input.length;\n var key = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var chr1 = void 0;\n var chr2 = void 0;\n var chr3 = void 0;\n var enc1 = void 0;\n var enc2 = void 0;\n var enc3 = void 0;\n var enc4 = void 0;\n\n while (i < l) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output = output + key.charAt(enc1) + key.charAt(enc2) + key.charAt(enc3) + key.charAt(enc4);\n }\n\n return output;\n };\n\n return btoa ? btoa.bind(window) : utils.noop;\n }(),\n isObject: function isObject(obj) {\n return obj && Object.prototype.toString.call(obj) === '[object Object]';\n },\n isEmptyObject: function isEmptyObject(obj) {\n return utils.isObject(obj) && !Object.keys(obj).length;\n },\n isArray: function isArray(arr) {\n return arr && Array.isArray(arr);\n Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-react.js","sources":["../../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js","../../node_modules/@babel/runtime/helpers/defineProperty.js","../../node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../node_modules/@babel/runtime/helpers/createClass.js","../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/inherits.js","../../packages/artplayer-react/node_modules/object-assign/index.js","../../packages/artplayer-react/node_modules/react/cjs/react.production.min.js","../../packages/artplayer-react/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../packages/artplayer-react/node_modules/prop-types/checkPropTypes.js","../../packages/artplayer-react/node_modules/react/cjs/react.development.js","../../packages/artplayer-react/node_modules/react/index.js","../../node_modules/style-inject/dist/style-inject.es.js","../../packages/artplayer/node_modules/option-validator/dist/option-validator.js","../../packages/artplayer/src/utils/emitter.js","../../packages/artplayer/src/utils/dom.js","../../node_modules/@babel/runtime/helpers/isNativeFunction.js","../../node_modules/@babel/runtime/helpers/construct.js","../../node_modules/@babel/runtime/helpers/wrapNativeSuper.js","../../packages/artplayer/src/utils/error.js","../../packages/artplayer/src/utils/subtitle.js","../../packages/artplayer/src/utils/file.js","../../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../../node_modules/@babel/runtime/helpers/iterableToArray.js","../../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../../node_modules/@babel/runtime/helpers/toConsumableArray.js","../../packages/artplayer/src/utils/property.js","../../packages/artplayer/src/utils/time.js","../../packages/artplayer/src/utils/format.js","../../packages/artplayer/src/scheme/index.js","../../packages/artplayer/src/config/index.js","../../packages/artplayer/src/whitelist.js","../../packages/artplayer/src/template.js","../../packages/artplayer/src/i18n/index.js","../../packages/artplayer/src/player/urlMix.js","../../packages/artplayer/src/player/attrInit.js","../../packages/artplayer/src/player/eventInit.js","../../packages/artplayer/src/player/playMix.js","../../packages/artplayer/src/player/pauseMix.js","../../packages/artplayer/src/player/toggleMix.js","../../packages/artplayer/src/player/seekMix.js","../../packages/artplayer/src/player/volumeMix.js","../../packages/artplayer/src/player/currentTimeMix.js","../../packages/artplayer/src/player/durationMix.js","../../packages/artplayer/src/player/switchMix.js","../../packages/artplayer/src/player/playbackRateMix.js","../../packages/artplayer/src/player/aspectRatioMix.js","../../packages/artplayer/src/player/screenshotMix.js","../../packages/artplayer/node_modules/screenfull/dist/screenfull.js","../../packages/artplayer/src/player/fullscreenMix.js","../../packages/artplayer/src/player/fullscreenWebMix.js","../../packages/artplayer/src/player/pipMix.js","../../packages/artplayer/src/player/loadedMix.js","../../packages/artplayer/src/player/playedMix.js","../../packages/artplayer/src/player/playingMix.js","../../packages/artplayer/src/player/autoSizeMix.js","../../packages/artplayer/src/player/rectMix.js","../../packages/artplayer/src/player/flipMix.js","../../packages/artplayer/src/player/index.js","../../node_modules/@babel/runtime/helpers/superPropBase.js","../../node_modules/@babel/runtime/helpers/get.js","../../packages/artplayer/src/utils/component.js","../../packages/artplayer/src/control/fullscreen.js","../../packages/artplayer/src/control/fullscreenWeb.js","../../packages/artplayer/src/control/pip.js","../../packages/artplayer/src/control/playAndPause.js","../../packages/artplayer/src/control/progress.js","../../packages/artplayer/src/control/subtitle.js","../../packages/artplayer/src/control/time.js","../../packages/artplayer/src/control/volume.js","../../packages/artplayer/src/control/setting.js","../../packages/artplayer/src/control/thumbnails.js","../../packages/artplayer/src/control/screenshot.js","../../packages/artplayer/src/control/quality.js","../../packages/artplayer/src/control/index.js","../../packages/artplayer/src/contextmenu/playbackRate.js","../../packages/artplayer/src/contextmenu/aspectRatio.js","../../packages/artplayer/src/contextmenu/info.js","../../packages/artplayer/src/contextmenu/version.js","../../packages/artplayer/src/contextmenu/close.js","../../packages/artplayer/src/contextmenu/index.js","../../packages/artplayer/src/info.js","../../packages/artplayer/src/subtitle.js","../../packages/artplayer/src/events/clickInit.js","../../packages/artpLine truncated
|
||||
@@ -0,0 +1,20 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.ArtplayerToolGithub = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var issuesDanmuku = createCommonjsModule(function (module, exports) {
|
||||
!function(t,e){module.exports=e();}(commonjsGlobal,function(){var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t]);});}return e};var t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error("Generator is already running");if(u===y){if("throw"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg);}else"return"===c.method&&c.abrupt("return",c.arg);u=p;var o=h(i,a,c);if("normal"===o.type){if(u=c.done?y:l,o.arg===d)continue;return {value:o.arg,done:c.done}}"throw"===o.type&&(u=y,c.method="throw",c.arg=o.arg);}}}(t,r,a),i}function h(t,e,r){try{return {type:"normal",arg:t.call(e,r)}}catch(t){return {type:"throw",arg:t}}}i.wrap=a;var f="suspendedStart",l="suspendedYield",p="executing",y="completed",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var k=v.prototype=c.prototype=Object.create(m);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)};});}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,n,o);},function(t){e("throw",t,n,o);}):Promise.resolve(c).then(function(t){a.value=t,n(a);},function(t){return e("throw",t,n,o)})}o(i.arg);}(r,n,t,e);})}return e=e?e.then(t,t):t()};}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=u,O(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method");}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0);}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return {next:S}}function S(){return {value:u,done:!0}}return g.prototype=k.constructor=v,v.constructor=g,v[n]=g.displayName="GeneratorFunction",i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return !!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(k),t},i.awrap=function(t){return {__await:t}},x(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(k),k[n]="Generator",k[o]=function(){return this},k.toString=function(){return "[object Generator]"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function
Line truncated
|
||||
});
|
||||
|
||||
return issuesDanmuku;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=artplayer-tool-github.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-tool-github.js","sources":["../../packages/artplayer-tool-github/node_modules/issues-danmuku/dist/issuesDanmuku.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=t||self).IssuesDanmuku=e()}(this,function(){\"use strict\";var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);\"function\"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e};var t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e=\"function\"==typeof Symbol?Symbol:{},o=e.iterator||\"@@iterator\",r=e.asyncIterator||\"@@asyncIterator\",n=e.toStringTag||\"@@toStringTag\";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error(\"Generator is already running\");if(u===y){if(\"throw\"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if(\"next\"===c.method)c.sent=c._sent=c.arg;else if(\"throw\"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg)}else\"return\"===c.method&&c.abrupt(\"return\",c.arg);u=p;var o=h(i,a,c);if(\"normal\"===o.type){if(u=c.done?y:l,o.arg===d)continue;return{value:o.arg,done:c.done}}\"throw\"===o.type&&(u=y,c.method=\"throw\",c.arg=o.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}i.wrap=a;var f=\"suspendedStart\",l=\"suspendedYield\",p=\"executing\",y=\"completed\",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var k=v.prototype=c.prototype=Object.create(m);function x(t){[\"next\",\"throw\",\"return\"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if(\"throw\"!==i.type){var a=i.arg,c=a.value;return c&&\"object\"==typeof c&&s.call(c,\"__await\")?Promise.resolve(c.__await).then(function(t){e(\"next\",t,n,o)},function(t){e(\"throw\",t,n,o)}):Promise.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e(\"throw\",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,\"throw\"===e.method){if(t.iterator.return&&(e.method=\"return\",e.arg=u,O(t,e),\"throw\"===e.method))return d;e.method=\"throw\",e.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return d}var n=h(r,t.iterator,e.arg);if(\"throw\"===n.type)return e.method=\"throw\",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,\"return\"!==e.method&&(e.method=\"next\",e.arg=u),e.delegate=null,d):o:(e.method=\"throw\",e.arg=new TypeError(\"iterator result is not an object\"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:u,done:!0}}return g.prototype=k.constructor=v,v.constructor=g,v[n]=g.displayName=\"GeneratorFunction\",i.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===g||\"GeneratorFunction\"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]=\"GeneratorFunction\")),t.prototype=Object.create(k),t},i.awrap=function(t){return{__await:t}},x(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(k),k[n]=\"Generator\",k[o]=function(){return this},k.toString=function(){return\"[object Generator]\"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.senLine truncated
|
||||
@@ -0,0 +1,498 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global.ArtplayerToolThumbnail = factory());
|
||||
}(this, (function () { 'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
var classCallCheck = _classCallCheck;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
var descriptor = props[i];
|
||||
descriptor.enumerable = descriptor.enumerable || false;
|
||||
descriptor.configurable = true;
|
||||
if ("value" in descriptor) descriptor.writable = true;
|
||||
Object.defineProperty(target, descriptor.key, descriptor);
|
||||
}
|
||||
}
|
||||
|
||||
function _createClass(Constructor, protoProps, staticProps) {
|
||||
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
||||
if (staticProps) _defineProperties(Constructor, staticProps);
|
||||
return Constructor;
|
||||
}
|
||||
|
||||
var createClass = _createClass;
|
||||
|
||||
function createCommonjsModule(fn, module) {
|
||||
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
||||
}
|
||||
|
||||
var _typeof_1 = createCommonjsModule(function (module) {
|
||||
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
||||
module.exports = _typeof = function _typeof(obj) {
|
||||
return _typeof2(obj);
|
||||
};
|
||||
} else {
|
||||
module.exports = _typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
module.exports = _typeof;
|
||||
});
|
||||
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
var assertThisInitialized = _assertThisInitialized;
|
||||
|
||||
function _possibleConstructorReturn(self, call) {
|
||||
if (call && (_typeof_1(call) === "object" || typeof call === "function")) {
|
||||
return call;
|
||||
}
|
||||
|
||||
return assertThisInitialized(self);
|
||||
}
|
||||
|
||||
var possibleConstructorReturn = _possibleConstructorReturn;
|
||||
|
||||
var getPrototypeOf = createCommonjsModule(function (module) {
|
||||
function _getPrototypeOf(o) {
|
||||
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
||||
return o.__proto__ || Object.getPrototypeOf(o);
|
||||
};
|
||||
return _getPrototypeOf(o);
|
||||
}
|
||||
|
||||
module.exports = _getPrototypeOf;
|
||||
});
|
||||
|
||||
var setPrototypeOf = createCommonjsModule(function (module) {
|
||||
function _setPrototypeOf(o, p) {
|
||||
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
module.exports = _setPrototypeOf;
|
||||
});
|
||||
|
||||
function _inherits(subClass, superClass) {
|
||||
if (typeof superClass !== "function" && superClass !== null) {
|
||||
throw new TypeError("Super expression must either be null or a function");
|
||||
}
|
||||
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
var inherits = _inherits;
|
||||
|
||||
function E () {
|
||||
// Keep this empty so it's easier to inherit from
|
||||
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
|
||||
}
|
||||
|
||||
E.prototype = {
|
||||
on: function (name, callback, ctx) {
|
||||
var e = this.e || (this.e = {});
|
||||
|
||||
(e[name] || (e[name] = [])).push({
|
||||
fn: callback,
|
||||
ctx: ctx
|
||||
});
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
once: function (name, callback, ctx) {
|
||||
var self = this;
|
||||
function listener () {
|
||||
self.off(name, listener);
|
||||
callback.apply(ctx, arguments);
|
||||
}
|
||||
listener._ = callback;
|
||||
return this.on(name, listener, ctx);
|
||||
},
|
||||
|
||||
emit: function (name) {
|
||||
var data = [].slice.call(arguments, 1);
|
||||
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
|
||||
var i = 0;
|
||||
var len = evtArr.length;
|
||||
|
||||
for (i; i < len; i++) {
|
||||
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
off: function (name, callback) {
|
||||
var e = this.e || (this.e = {});
|
||||
var evts = e[name];
|
||||
var liveEvents = [];
|
||||
|
||||
if (evts && callback) {
|
||||
for (var i = 0, len = evts.length; i < len; i++) {
|
||||
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
|
||||
liveEvents.push(evts[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove event from queue to prevent memory leak
|
||||
// Suggested by https://github.com/lazd
|
||||
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
|
||||
|
||||
(liveEvents.length)
|
||||
? e[name] = liveEvents
|
||||
: delete e[name];
|
||||
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
var tinyEmitter = E;
|
||||
var TinyEmitter = E;
|
||||
tinyEmitter.TinyEmitter = TinyEmitter;
|
||||
|
||||
function sleep(ms) {
|
||||
return new Promise(function (resolve) {
|
||||
return setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
function runPromisesInSeries(ps) {
|
||||
return ps.reduce(function (p, next) {
|
||||
return p.then(next);
|
||||
}, Promise.resolve());
|
||||
}
|
||||
function getFileName(name) {
|
||||
var nameArray = name.split('.');
|
||||
nameArray.pop();
|
||||
return nameArray.join('.');
|
||||
}
|
||||
function clamp(num, a, b) {
|
||||
return Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
|
||||
}
|
||||
|
||||
var ArtplayerToolThumbnail =
|
||||
/*#__PURE__*/
|
||||
function (_Emitter) {
|
||||
inherits(ArtplayerToolThumbnail, _Emitter);
|
||||
|
||||
function ArtplayerToolThumbnail() {
|
||||
var _this;
|
||||
|
||||
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
|
||||
classCallCheck(this, ArtplayerToolThumbnail);
|
||||
|
||||
_this = possibleConstructorReturn(this, getPrototypeOf(ArtplayerToolThumbnail).call(this));
|
||||
_this.processing = false;
|
||||
_this.option = {};
|
||||
|
||||
_this.setup(Object.assign({}, ArtplayerToolThumbnail.DEFAULTS, option));
|
||||
|
||||
_this.video = ArtplayerToolThumbnail.creatVideo();
|
||||
_this.inputChange = _this.inputChange.bind(assertThisInitialized(_this));
|
||||
_this.ondrop = _this.ondrop.bind(assertThisInitialized(_this));
|
||||
|
||||
_this.option.fileInput.addEventListener('change', _this.inputChange);
|
||||
|
||||
_this.option.fileInput.addEventListener('dragover', ArtplayerToolThumbnail.ondragover);
|
||||
|
||||
_this.option.fileInput.addEventListener('drop', ArtplayerToolThumbnail.ondrop);
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
createClass(ArtplayerToolThumbnail, [{
|
||||
key: "ondrop",
|
||||
value: function ondrop(e) {
|
||||
e.preventDefault();
|
||||
var file = e.dataTransfer.files[0];
|
||||
this.loadVideo(file);
|
||||
}
|
||||
}, {
|
||||
key: "setup",
|
||||
value: function setup() {
|
||||
var _this2 = this;
|
||||
|
||||
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
this.option = Object.assign({}, this.option, option);
|
||||
var _this$option = this.option,
|
||||
fileInput = _this$option.fileInput,
|
||||
delay = _this$option.delay,
|
||||
number = _this$option.number,
|
||||
width = _this$option.width,
|
||||
height = _this$option.height,
|
||||
column = _this$option.column;
|
||||
this.errorHandle(fileInput instanceof Element, "The 'fileInput' is not a Element");
|
||||
|
||||
if (!(fileInput.tagName === 'INPUT' && fileInput.type === 'file')) {
|
||||
fileInput.style.position = 'relative';
|
||||
var newFileInput = document.createElement('input');
|
||||
newFileInput.type = 'file';
|
||||
newFileInput.style.position = 'absolute';
|
||||
newFileInput.style.width = '100%';
|
||||
newFileInput.style.height = '100%';
|
||||
newFileInput.style.left = '0';
|
||||
newFileInput.style.top = '0';
|
||||
newFileInput.style.right = '0';
|
||||
newFileInput.style.bottom = '0';
|
||||
newFileInput.style.opacity = '0';
|
||||
fileInput.appendChild(newFileInput);
|
||||
this.option.fileInput = newFileInput;
|
||||
}
|
||||
|
||||
['delay', 'number', 'width', 'height', 'column'].forEach(function (item) {
|
||||
_this2.errorHandle(typeof _this2.option[item] === 'number', "The '".concat(item, "' is not a number"));
|
||||
});
|
||||
this.option.delay = clamp(delay, 10, 1000);
|
||||
this.option.number = clamp(number, 10, 1000);
|
||||
this.option.width = clamp(width, 10, 1000);
|
||||
this.option.height = clamp(height, 10, 1000);
|
||||
this.option.column = clamp(column, 1, 1000);
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: "inputChange",
|
||||
value: function inputChange() {
|
||||
var file = this.option.fileInput.files[0];
|
||||
this.loadVideo(file);
|
||||
}
|
||||
}, {
|
||||
key: "loadVideo",
|
||||
value: function loadVideo(file) {
|
||||
var _this3 = this;
|
||||
|
||||
var delay = this.option.delay;
|
||||
|
||||
if (file) {
|
||||
var canPlayType = this.video.canPlayType(file.type);
|
||||
this.errorHandle(canPlayType === 'maybe' || canPlayType === 'probably', "Playback of this file format is not supported: ".concat(file.type));
|
||||
var videoUrl = URL.createObjectURL(file);
|
||||
this.videoUrl = videoUrl;
|
||||
this.file = file;
|
||||
this.emit('file', this.file);
|
||||
this.video.src = videoUrl;
|
||||
sleep(delay).then(function () {
|
||||
_this3.emit('video', _this3.video);
|
||||
}).catch(function (err) {
|
||||
_this3.emit('error', err.message);
|
||||
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "start",
|
||||
value: function start() {
|
||||
var _this4 = this;
|
||||
|
||||
var _this$option2 = this.option,
|
||||
width = _this$option2.width,
|
||||
height = _this$option2.height,
|
||||
number = _this$option2.number,
|
||||
delay = _this$option2.delay;
|
||||
this.density = number / this.video.duration;
|
||||
this.errorHandle(this.file && this.video, 'Please select the video file first');
|
||||
this.errorHandle(!this.processing, 'There is currently a task in progress, please wait a moment...');
|
||||
this.errorHandle(this.density <= 1, "The preview density cannot be greater than 1, but got ".concat(this.density));
|
||||
var screenshotDate = this.creatScreenshotDate();
|
||||
var canvas = this.creatCanvas();
|
||||
var context2D = canvas.getContext('2d');
|
||||
this.emit('canvas', canvas);
|
||||
var promiseList = screenshotDate.map(function (item, index) {
|
||||
return function () {
|
||||
_this4.video.currentTime = item.time;
|
||||
return new Promise(function (resolve) {
|
||||
sleep(delay).then(function () {
|
||||
context2D.drawImage(_this4.video, item.x, item.y, width, height);
|
||||
canvas.toBlob(function (blob) {
|
||||
if (_this4.thumbnailUrl) {
|
||||
URL.revokeObjectURL(_this4.thumbnailUrl);
|
||||
}
|
||||
|
||||
_this4.thumbnailUrl = URL.createObjectURL(blob);
|
||||
|
||||
_this4.emit('update', _this4.thumbnailUrl, (index + 1) / number);
|
||||
|
||||
resolve();
|
||||
});
|
||||
}).catch(function (err) {
|
||||
throw err;
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
this.processing = true;
|
||||
return runPromisesInSeries(promiseList).then(function () {
|
||||
return sleep(delay * 2).then(function () {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('done');
|
||||
}).catch(function (err) {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('error', err.message);
|
||||
|
||||
throw err;
|
||||
});
|
||||
}).catch(function (err) {
|
||||
_this4.processing = false;
|
||||
|
||||
_this4.emit('error', err.message);
|
||||
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "creatScreenshotDate",
|
||||
value: function creatScreenshotDate() {
|
||||
var _this$option3 = this.option,
|
||||
number = _this$option3.number,
|
||||
width = _this$option3.width,
|
||||
height = _this$option3.height,
|
||||
column = _this$option3.column;
|
||||
var duration = this.video.duration;
|
||||
var timeGap = duration / number;
|
||||
var timePoints = [timeGap];
|
||||
|
||||
while (timePoints.length < number) {
|
||||
var last = timePoints[timePoints.length - 1];
|
||||
timePoints.push(last + timeGap);
|
||||
}
|
||||
|
||||
return timePoints.map(function (item, index) {
|
||||
return {
|
||||
time: item - timeGap / 2,
|
||||
x: index % column * width,
|
||||
y: Math.floor(index / column) * height
|
||||
};
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "creatCanvas",
|
||||
value: function creatCanvas() {
|
||||
var _this$option4 = this.option,
|
||||
number = _this$option4.number,
|
||||
width = _this$option4.width,
|
||||
height = _this$option4.height,
|
||||
column = _this$option4.column;
|
||||
var canvas = document.createElement('canvas');
|
||||
var context2D = canvas.getContext('2d');
|
||||
canvas.width = width * column;
|
||||
canvas.height = Math.ceil(number / column) * height + 30;
|
||||
context2D.fillStyle = 'black';
|
||||
context2D.fillRect(0, 0, canvas.width, canvas.height);
|
||||
context2D.font = '14px Georgia';
|
||||
context2D.fillStyle = '#fff';
|
||||
context2D.fillText("From: https://artplayer.org/, Number: ".concat(number, ", Width: ").concat(width, ", Height: ").concat(height, ", Column: ").concat(column), 10, canvas.height - 11);
|
||||
return canvas;
|
||||
}
|
||||
}, {
|
||||
key: "download",
|
||||
value: function download() {
|
||||
this.errorHandle(this.file && this.thumbnailUrl, 'Download does not seem to be ready, please create preview first');
|
||||
this.errorHandle(!this.processing, 'There is currently a task in progress, please wait a moment...');
|
||||
var elink = document.createElement('a');
|
||||
var name = "".concat(getFileName(this.file.name), ".png");
|
||||
elink.download = name;
|
||||
elink.href = this.thumbnailUrl;
|
||||
document.body.appendChild(elink);
|
||||
elink.click();
|
||||
document.body.removeChild(elink);
|
||||
this.emit('download', name);
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: "errorHandle",
|
||||
value: function errorHandle(condition, msg) {
|
||||
if (!condition) {
|
||||
this.emit('error', msg);
|
||||
throw new Error(msg);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "destroy",
|
||||
value: function destroy() {
|
||||
this.option.fileInput.removeEventListener('change', this.inputChange);
|
||||
this.option.fileInput.removeEventListener('dragover', ArtplayerToolThumbnail.ondragover);
|
||||
this.option.fileInput.removeEventListener('drop', ArtplayerToolThumbnail.ondrop);
|
||||
document.body.removeChild(this.video);
|
||||
|
||||
if (this.videoUrl) {
|
||||
URL.revokeObjectURL(this.videoUrl);
|
||||
}
|
||||
|
||||
if (this.thumbnailUrl) {
|
||||
URL.revokeObjectURL(this.thumbnailUrl);
|
||||
}
|
||||
|
||||
this.emit('destroy');
|
||||
}
|
||||
}], [{
|
||||
key: "ondragover",
|
||||
value: function ondragover(e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}, {
|
||||
key: "creatVideo",
|
||||
value: function creatVideo() {
|
||||
var video = document.createElement('video');
|
||||
video.style.position = 'absolute';
|
||||
video.style.top = '-9999px';
|
||||
video.style.left = '-9999px';
|
||||
video.muted = true;
|
||||
video.controls = true;
|
||||
document.body.appendChild(video);
|
||||
return video;
|
||||
}
|
||||
}, {
|
||||
key: "DEFAULTS",
|
||||
get: function get() {
|
||||
return {
|
||||
delay: 300,
|
||||
number: 60,
|
||||
width: 160,
|
||||
height: 90,
|
||||
column: 10
|
||||
};
|
||||
}
|
||||
}]);
|
||||
|
||||
return ArtplayerToolThumbnail;
|
||||
}(tinyEmitter);
|
||||
|
||||
return ArtplayerToolThumbnail;
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=artplayer-tool-thumbnail.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-tool-thumbnail.js","sources":["../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/classCallCheck.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/createClass.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/typeof.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/assertThisInitialized.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/possibleConstructorReturn.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/getPrototypeOf.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/setPrototypeOf.js","../../node_modules/_@babel_runtime@7.7.4@@babel/runtime/helpers/inherits.js","../../packages/artplayer-tool-thumbnail/node_modules/tiny-emitter/index.js","../../packages/artplayer-tool-thumbnail/src/utils.js","../../packages/artplayer-tool-thumbnail/src/index.js"],"sourcesContent":["function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((tLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer-vue.js","sources":["../../node_modules/@babel/runtime/helpers/defineProperty.js","../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../node_modules/@babel/runtime/helpers/createClass.js","../../node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/inherits.js","../../node_modules/style-inject/dist/style-inject.es.js","../../packages/artplayer/node_modules/option-validator/dist/option-validator.js","../../packages/artplayer/src/utils/emitter.js","../../packages/artplayer/src/utils/dom.js","../../node_modules/@babel/runtime/helpers/isNativeFunction.js","../../node_modules/@babel/runtime/helpers/construct.js","../../node_modules/@babel/runtime/helpers/wrapNativeSuper.js","../../packages/artplayer/src/utils/error.js","../../packages/artplayer/src/utils/subtitle.js","../../packages/artplayer/src/utils/file.js","../../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../../node_modules/@babel/runtime/helpers/iterableToArray.js","../../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../../node_modules/@babel/runtime/helpers/toConsumableArray.js","../../packages/artplayer/src/utils/property.js","../../packages/artplayer/src/utils/time.js","../../packages/artplayer/src/utils/format.js","../../packages/artplayer/src/scheme/index.js","../../packages/artplayer/src/config/index.js","../../packages/artplayer/src/whitelist.js","../../packages/artplayer/src/template.js","../../packages/artplayer/src/i18n/index.js","../../packages/artplayer/src/player/urlMix.js","../../packages/artplayer/src/player/attrInit.js","../../packages/artplayer/src/player/eventInit.js","../../packages/artplayer/src/player/playMix.js","../../packages/artplayer/src/player/pauseMix.js","../../packages/artplayer/src/player/toggleMix.js","../../packages/artplayer/src/player/seekMix.js","../../packages/artplayer/src/player/volumeMix.js","../../packages/artplayer/src/player/currentTimeMix.js","../../packages/artplayer/src/player/durationMix.js","../../packages/artplayer/src/player/switchMix.js","../../packages/artplayer/src/player/playbackRateMix.js","../../packages/artplayer/src/player/aspectRatioMix.js","../../packages/artplayer/src/player/screenshotMix.js","../../packages/artplayer/node_modules/screenfull/dist/screenfull.js","../../packages/artplayer/src/player/fullscreenMix.js","../../packages/artplayer/src/player/fullscreenWebMix.js","../../packages/artplayer/src/player/pipMix.js","../../packages/artplayer/src/player/loadedMix.js","../../packages/artplayer/src/player/playedMix.js","../../packages/artplayer/src/player/playingMix.js","../../packages/artplayer/src/player/autoSizeMix.js","../../packages/artplayer/src/player/rectMix.js","../../packages/artplayer/src/player/flipMix.js","../../packages/artplayer/src/player/index.js","../../node_modules/@babel/runtime/helpers/superPropBase.js","../../node_modules/@babel/runtime/helpers/get.js","../../packages/artplayer/src/utils/component.js","../../packages/artplayer/src/control/fullscreen.js","../../packages/artplayer/src/control/fullscreenWeb.js","../../packages/artplayer/src/control/pip.js","../../packages/artplayer/src/control/playAndPause.js","../../packages/artplayer/src/control/progress.js","../../packages/artplayer/src/control/subtitle.js","../../packages/artplayer/src/control/time.js","../../packages/artplayer/src/control/volume.js","../../packages/artplayer/src/control/setting.js","../../packages/artplayer/src/control/thumbnails.js","../../packages/artplayer/src/control/screenshot.js","../../packages/artplayer/src/control/quality.js","../../packages/artplayer/src/control/index.js","../../packages/artplayer/src/contextmenu/playbackRate.js","../../packages/artplayer/src/contextmenu/aspectRatio.js","../../packages/artplayer/src/contextmenu/info.js","../../packages/artplayer/src/contextmenu/version.js","../../packages/artplayer/src/contextmenu/close.js","../../packages/artplayer/src/contextmenu/index.js","../../packages/artplayer/src/info.js","../../packages/artplayer/src/subtitle.js","../../packages/artplayer/src/events/clickInit.js","../../packages/artplayer/src/events/hoverInit.js","../../packages/artplayer/src/events/mousemoveInit.js","../../packages/artplayer/src/events/resizeInit.js","../../packages/artplayer/src/events/index.js","../../packages/artplayer/src/hotkey.js","../../packages/artplayer/src/layer.js","../../packages/artplayer/src/loading.js","../../packages/artplayer/src/notice.js","../../packages/artplayer/src/mask.js","../../packages/artplayer/src/icons/index.js","../../packages/artplayer/src/setting/flip.js","../../packages/artplayer/src/setting/aspectRatio.js","../../packages/artplayer/src/setting/playbackRate.js","../..Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"artplayer.js","sources":["../../node_modules/@babel/runtime/helpers/classCallCheck.js","../../node_modules/@babel/runtime/helpers/createClass.js","../../node_modules/@babel/runtime/helpers/typeof.js","../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/inherits.js","../../node_modules/style-inject/dist/style-inject.es.js","../../packages/artplayer/node_modules/option-validator/dist/option-validator.js","../../packages/artplayer/src/utils/emitter.js","../../packages/artplayer/src/utils/dom.js","../../node_modules/@babel/runtime/helpers/isNativeFunction.js","../../node_modules/@babel/runtime/helpers/construct.js","../../node_modules/@babel/runtime/helpers/wrapNativeSuper.js","../../packages/artplayer/src/utils/error.js","../../packages/artplayer/src/utils/subtitle.js","../../packages/artplayer/src/utils/file.js","../../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../../node_modules/@babel/runtime/helpers/iterableToArray.js","../../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../../node_modules/@babel/runtime/helpers/toConsumableArray.js","../../packages/artplayer/src/utils/property.js","../../packages/artplayer/src/utils/time.js","../../packages/artplayer/src/utils/format.js","../../packages/artplayer/src/scheme/index.js","../../packages/artplayer/src/config/index.js","../../packages/artplayer/src/whitelist.js","../../packages/artplayer/src/template.js","../../packages/artplayer/src/i18n/index.js","../../packages/artplayer/src/player/urlMix.js","../../packages/artplayer/src/player/attrInit.js","../../packages/artplayer/src/player/eventInit.js","../../packages/artplayer/src/player/playMix.js","../../packages/artplayer/src/player/pauseMix.js","../../packages/artplayer/src/player/toggleMix.js","../../packages/artplayer/src/player/seekMix.js","../../packages/artplayer/src/player/volumeMix.js","../../packages/artplayer/src/player/currentTimeMix.js","../../packages/artplayer/src/player/durationMix.js","../../packages/artplayer/src/player/switchMix.js","../../packages/artplayer/src/player/playbackRateMix.js","../../packages/artplayer/src/player/aspectRatioMix.js","../../packages/artplayer/src/player/screenshotMix.js","../../packages/artplayer/node_modules/screenfull/dist/screenfull.js","../../packages/artplayer/src/player/fullscreenMix.js","../../packages/artplayer/src/player/fullscreenWebMix.js","../../packages/artplayer/src/player/pipMix.js","../../packages/artplayer/src/player/loadedMix.js","../../packages/artplayer/src/player/playedMix.js","../../packages/artplayer/src/player/playingMix.js","../../packages/artplayer/src/player/autoSizeMix.js","../../packages/artplayer/src/player/rectMix.js","../../packages/artplayer/src/player/flipMix.js","../../packages/artplayer/src/player/index.js","../../node_modules/@babel/runtime/helpers/superPropBase.js","../../node_modules/@babel/runtime/helpers/get.js","../../packages/artplayer/src/utils/component.js","../../node_modules/@babel/runtime/helpers/defineProperty.js","../../packages/artplayer/src/control/fullscreen.js","../../packages/artplayer/src/control/fullscreenWeb.js","../../packages/artplayer/src/control/pip.js","../../packages/artplayer/src/control/playAndPause.js","../../packages/artplayer/src/control/progress.js","../../packages/artplayer/src/control/subtitle.js","../../packages/artplayer/src/control/time.js","../../packages/artplayer/src/control/volume.js","../../packages/artplayer/src/control/setting.js","../../packages/artplayer/src/control/thumbnails.js","../../packages/artplayer/src/control/screenshot.js","../../packages/artplayer/src/control/quality.js","../../packages/artplayer/src/control/index.js","../../packages/artplayer/src/contextmenu/playbackRate.js","../../packages/artplayer/src/contextmenu/aspectRatio.js","../../packages/artplayer/src/contextmenu/info.js","../../packages/artplayer/src/contextmenu/version.js","../../packages/artplayer/src/contextmenu/close.js","../../packages/artplayer/src/contextmenu/index.js","../../packages/artplayer/src/info.js","../../packages/artplayer/src/subtitle.js","../../packages/artplayer/src/events/clickInit.js","../../packages/artplayer/src/events/hoverInit.js","../../packages/artplayer/src/events/mousemoveInit.js","../../packages/artplayer/src/events/resizeInit.js","../../packages/artplayer/src/events/index.js","../../packages/artplayer/src/hotkey.js","../../packages/artplayer/src/layer.js","../../packages/artplayer/src/loading.js","../../packages/artplayer/src/notice.js","../../packages/artplayer/src/mask.js","../../packages/artplayer/src/icons/index.js","../../packages/artplayer/src/setting/flip.js","../../packages/artplayer/src/setting/aspectRatio.js","../../packages/artplayer/src/setting/playbackRate.js","../../pacLine truncated
|
||||
|
After Width: | Height: | Size: 68 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 522 KiB |
|
After Width: | Height: | Size: 105 KiB |
@@ -1,7 +1,15 @@
|
||||
{
|
||||
"lerna": "3.4.3",
|
||||
"version": "1.0.1",
|
||||
"version": "3.4.2",
|
||||
"packages": [
|
||||
"packages/*"
|
||||
]
|
||||
],
|
||||
"command": {
|
||||
"publish": {
|
||||
"ignoreChanges": [
|
||||
"docs/**",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,55 +1,72 @@
|
||||
{
|
||||
"name": "artplayer",
|
||||
"version": "1.0.0",
|
||||
"description": "ArtPlayer is a modern HTML5 video player",
|
||||
"main": "dist/artplayer.js",
|
||||
"style": "dist/artplayer.css",
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development rollup -c -m -w",
|
||||
"build": "cross-env NODE_ENV=production rollup -c",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.1.2",
|
||||
"@babel/plugin-external-helpers": "^7.0.0",
|
||||
"@babel/plugin-transform-runtime": "^7.1.0",
|
||||
"@babel/preset-env": "^7.1.0",
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"autoprefixer": "^9.3.1",
|
||||
"browser-env": "^3.2.5",
|
||||
"cross-env": "^5.2.0",
|
||||
"cssnano": "^4.1.7",
|
||||
"lerna": "^3.4.3",
|
||||
"node-sass": "^4.9.4",
|
||||
"rollup": "^0.67.0",
|
||||
"rollup-plugin-babel": "^4.0.3",
|
||||
"rollup-plugin-commonjs": "^9.2.0",
|
||||
"rollup-plugin-eslint": "^5.0.0",
|
||||
"rollup-plugin-node-resolve": "^3.4.0",
|
||||
"rollup-plugin-postcss": "^1.6.2",
|
||||
"rollup-plugin-replace": "^2.1.0",
|
||||
"rollup-plugin-svgo": "^1.0.1",
|
||||
"rollup-plugin-uglify": "^6.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"balloon-css": "^0.5.0",
|
||||
"draggabilly": "^2.2.0",
|
||||
"option-validator": "^1.1.0",
|
||||
"screenfull": "^3.3.3",
|
||||
"tiny-emitter": "^2.0.2"
|
||||
}
|
||||
"name": "artplayer-packages",
|
||||
"version": "1.0.0",
|
||||
"description": "ArtPlayer.js is a modern and full featured HTML5 video player",
|
||||
"scripts": {
|
||||
"bootstrap": "npx lerna bootstrap",
|
||||
"version": "npx lerna version patch --yes --no-push",
|
||||
"publish": "npx lerna publish from-package --yes",
|
||||
"release": "npm run lint && npm run version && npm run build:all && npm test && npm run publish",
|
||||
"dev": "npx cross-env NODE_ENV=development node ./scripts/dev.js",
|
||||
"start": "npx cross-env NODE_ENV=development npx servor docs index.html 8081 5000",
|
||||
"build": "npx cross-env NODE_ENV=production node ./scripts/build.js",
|
||||
"build:all": "npm run build all && npm run test:doc && git add . && git commit -m \"build all packages\" -n ",
|
||||
"test": "npx cross-env NODE_ENV=test mocha-chrome ./test/index.html --mocha '{\"ui\":\"bdd\"}'",
|
||||
"test:doc": "node ./scripts/creatTestFromDoc.js",
|
||||
"lint": "npx eslint packages/*/src",
|
||||
"sizereport": "npx sizereport --config"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.8.4",
|
||||
"@babel/plugin-external-helpers": "^7.8.3",
|
||||
"@babel/plugin-transform-runtime": "^7.8.3",
|
||||
"@babel/preset-env": "^7.8.4",
|
||||
"@babel/runtime": "^7.8.4",
|
||||
"autoprefixer": "^9.7.4",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"browser-env": "^3.3.0",
|
||||
"chai": "^4.2.0",
|
||||
"chalk": "^3.0.0",
|
||||
"cpy": "^8.0.1",
|
||||
"cross-env": "^7.0.0",
|
||||
"cssnano": "^4.1.10",
|
||||
"del": "^5.1.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-airbnb-base": "^14.0.0",
|
||||
"eslint-config-prettier": "^6.10.0",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"glob": "^7.1.6",
|
||||
"inquirer": "^7.0.4",
|
||||
"lerna": "^3.20.2",
|
||||
"mocha": "^7.1.0",
|
||||
"mocha-chrome": "^2.2.0",
|
||||
"node-sass": "^4.13.1",
|
||||
"rollup": "^1.31.1",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-commonjs": "^10.1.0",
|
||||
"rollup-plugin-eslint": "^7.0.0",
|
||||
"rollup-plugin-json": "^4.0.0",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-postcss": "^2.1.1",
|
||||
"rollup-plugin-replace": "^2.2.0",
|
||||
"rollup-plugin-size-snapshot": "^0.11.0",
|
||||
"rollup-plugin-svgo": "^1.1.0",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"servor": "^3.2.0",
|
||||
"travis-size-report": "^1.1.0"
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
@@ -0,0 +1,47 @@
|
||||
# artplayer-plugin-backlight
|
||||
|
||||
Backlight plugin for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`
|
||||
|
||||
```bash
|
||||
$ npm install artplayer-plugin-backlight
|
||||
```
|
||||
|
||||
Or install with `yarn`
|
||||
|
||||
```bash
|
||||
$ yarn add artplayer-plugin-backlight
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginBacklight from 'artplayer-plugin-backlight';
|
||||
```
|
||||
|
||||
Or umd builds are also available
|
||||
|
||||
```html
|
||||
<script src="artplayer-plugin-backlight.js"></script>
|
||||
```
|
||||
|
||||
Will expose the global variable to `window.artplayerPluginBacklight`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
plugins: [artplayerPluginBacklight],
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
@@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* artplayer-plugin-backlight.js v3.4.2
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).artplayerPluginBacklight=e()}(this,(function(){"use strict";function t(t){for(var e=[],o=0;o<10;o+=1)for(var n=0;n<5;n+=1)0!==o&&9!==o&&0!==n&&4!==n||e.push(t(o,n,10,5));return e}return function(e){var o=e.constructor.utils.setStyles,n=e.template,a=n.$player,r=n.$video,i=e.player,c=document.createElement("div");c.classList.add("artplayer-backlight"),o(c,{position:"absolute",zIndex:9,left:0,top:0,right:0,bottom:0,width:"100%",height:"100%"});var l,s=(l=c,t((function(t,e,o,n){var a=document.createElement("div");return a.style.position="absolute",a.style.left="".concat(100*t/o,"%"),a.style.top="".concat(100*e/n,"%"),a.style.width="".concat(100/o,"%"),a.style.height="".concat(100/n,"%"),a.style.webkitBorderRadius="50%",a.style.borderRadius="50%",a.style.webkitTransition="all .2s ease",a.style.transition="all .2s ease",l.appendChild(a),{$box:a,left:0===t,right:t===o-1,top:0===e,bottom:e===n-1}}))),u=document.createElement("canvas");return a.insertBefore(c,r),function o(){window.requestAnimationFrame((function(){if(i.playing){var n=r.clientWidth,a=r.clientHeight;(function(e,o,n,a){var r=e.getContext("2d");return e.width=n,e.height=a,r.drawImage(o,0,0),t((function(t,e,o,i){for(var c=n/o,l=a/i,s=t*c,u=e*l,d=r.getImageData(s,u,c,l).data,f=0,h=0,p=0,g=0,y=d.length;g<y;g+=4)f+=d[g],h+=d[g+1],p+=d[g+2];return{r:f=Math.floor(f/(d.length/4)),g:h=Math.floor(h/(d.length/4)),b:p=Math.floor(p/(d.length/4))}}))})(u,r,n,a).forEach((function(t,e){var o=t.r,n=t.g,a=t.b,r=s[e],i=r.$box,c=r.left,l=r.right,u=r.top,d=r.bottom,f=c?"-64px":l?"64px":"0",h=u?"-64px":d?"64px":"0";i.style.webkitBoxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px"),i.style.boxShadow="rgb(".concat(o,", ").concat(n,", ").concat(a,") ").concat(f," ").concat(h," 128px")}))}e.isDestroy||o()}))}(),{name:"artplayerPluginBacklight"}}}));
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "artplayer-plugin-backlight",
|
||||
"version": "3.4.2",
|
||||
"expose": "artplayerPluginBacklight",
|
||||
"description": "Backlight plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-backlight.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||
"gitHead": "0a3a20568e37f99972eefb01d4b1dcf4036a46db"
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
function matrixCallback(callback) {
|
||||
const result = [];
|
||||
const x = 10;
|
||||
const y = 5;
|
||||
for (let xIndex = 0; xIndex < x; xIndex += 1) {
|
||||
for (let yIndex = 0; yIndex < y; yIndex += 1) {
|
||||
if (xIndex === 0 || xIndex === x - 1 || yIndex === 0 || yIndex === y - 1) {
|
||||
result.push(callback(xIndex, yIndex, x, y));
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function getColors($canvas, $video, width, height) {
|
||||
const ctx = $canvas.getContext('2d');
|
||||
$canvas.width = width;
|
||||
$canvas.height = height;
|
||||
ctx.drawImage($video, 0, 0);
|
||||
return matrixCallback((xIndex, yIndex, x, y) => {
|
||||
const itemW = width / x;
|
||||
const itemH = height / y;
|
||||
const itemX = xIndex * itemW;
|
||||
const itemY = yIndex * itemH;
|
||||
const { data } = ctx.getImageData(itemX, itemY, itemW, itemH);
|
||||
let r = 0;
|
||||
let g = 0;
|
||||
let b = 0;
|
||||
for (let i = 0, l = data.length; i < l; i += 4) {
|
||||
r += data[i];
|
||||
g += data[i + 1];
|
||||
b += data[i + 2];
|
||||
}
|
||||
r = Math.floor(r / (data.length / 4));
|
||||
g = Math.floor(g / (data.length / 4));
|
||||
b = Math.floor(b / (data.length / 4));
|
||||
return { r, g, b };
|
||||
});
|
||||
}
|
||||
|
||||
function creatMatrix(parent) {
|
||||
return matrixCallback((xIndex, yIndex, x, y) => {
|
||||
const $box = document.createElement('div');
|
||||
$box.style.position = 'absolute';
|
||||
$box.style.left = `${xIndex * 100 / x}%`;
|
||||
$box.style.top = `${yIndex * 100 / y}%`;
|
||||
$box.style.width = `${100 / x}%`;
|
||||
$box.style.height = `${100 / y}%`;
|
||||
$box.style.webkitBorderRadius = '50%';
|
||||
$box.style.borderRadius = '50%';
|
||||
$box.style.webkitTransition = 'all .2s ease';
|
||||
$box.style.transition = 'all .2s ease';
|
||||
parent.appendChild($box);
|
||||
return {
|
||||
$box,
|
||||
left: xIndex === 0,
|
||||
right: xIndex === x - 1,
|
||||
top: yIndex === 0,
|
||||
bottom: yIndex === y - 1,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function artplayerPluginBacklight(art) {
|
||||
const { setStyles } = art.constructor.utils;
|
||||
const {
|
||||
template: { $player, $video },
|
||||
player,
|
||||
} = art;
|
||||
|
||||
const $backlight = document.createElement('div');
|
||||
$backlight.classList.add('artplayer-backlight');
|
||||
setStyles($backlight, {
|
||||
position: 'absolute',
|
||||
zIndex: 9,
|
||||
left: 0,
|
||||
top: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
});
|
||||
|
||||
const matrix = creatMatrix($backlight);
|
||||
const $canvas = document.createElement('canvas');
|
||||
$player.insertBefore($backlight, $video);
|
||||
|
||||
(function loop() {
|
||||
window.requestAnimationFrame(() => {
|
||||
if (player.playing) {
|
||||
const { clientWidth, clientHeight } = $video;
|
||||
const colors = getColors($canvas, $video, clientWidth, clientHeight);
|
||||
colors.forEach(({ r, g, b }, index) => {
|
||||
const { $box, left, right, top, bottom } = matrix[index];
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const x = left ? '-64px' : right ? '64px' : '0';
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const y = top ? '-64px' : bottom ? '64px' : '0';
|
||||
$box.style.webkitBoxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;
|
||||
$box.style.boxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;
|
||||
});
|
||||
};
|
||||
|
||||
if (!art.isDestroy) {
|
||||
loop();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
return {
|
||||
name: 'artplayerPluginBacklight',
|
||||
};
|
||||
}
|
||||
|
||||
export default artplayerPluginBacklight;
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": ["@babel/plugin-external-helpers", "@babel/plugin-transform-runtime"]
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Harvey Zack
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,3 +0,0 @@
|
||||
# artplayer-plugin-danmu
|
||||
Danmu plugin for ArtPlayer
|
||||
|
||||