Compare commits
18 Commits
0f8b8789b6
...
7b0b1eddbe
Author | SHA1 | Date |
---|---|---|
renovate[bot] | 7b0b1eddbe | |
github-actions[bot] | e82c2fbf61 | |
Ghost of Sparta | f3e707efd2 | |
0que | 6d80fb42df | |
Matthaiks | 064b7c409a | |
Oğuz Ersen | 3e560bf4ba | |
github-actions[bot] | b9cea6e4cd | |
Priit Jõerüüt | 9727295a16 | |
Matthaiks | debc10a899 | |
Bnyro | a43d56984d | |
Bnyro | cdb9d0188a | |
Bnyro | c30062eb94 | |
Bnyro | adeb0a92bd | |
Bnyro | afd5c5b3b8 | |
Bnyro | ba4e946dc2 | |
Bnyro | ca5e39dfd8 | |
renovate[bot] | eccf4d1f78 | |
renovate[bot] | a9e639b8a6 |
|
@ -11,7 +11,7 @@
|
|||
"lint": "eslint --fix --color --ignore-path .gitignore --ext .js,.vue ."
|
||||
},
|
||||
"dependencies": {
|
||||
"dompurify": "3.1.2",
|
||||
"dompurify": "3.1.3",
|
||||
"fast-xml-parser": "4.3.6",
|
||||
"hotkeys-js": "3.13.7",
|
||||
"javascript-time-ago": "2.5.10",
|
||||
|
@ -19,7 +19,7 @@
|
|||
"linkifyjs": "4.1.3",
|
||||
"qrcode": "^1.5.3",
|
||||
"shaka-player": "4.8.2",
|
||||
"vue": "3.4.25",
|
||||
"vue": "3.4.27",
|
||||
"vue-i18n": "9.13.1",
|
||||
"vue-router": "4.3.2"
|
||||
},
|
||||
|
@ -36,7 +36,7 @@
|
|||
"@unocss/transformer-variant-group": "0.58.9",
|
||||
"@vitejs/plugin-legacy": "5.4.0",
|
||||
"@vitejs/plugin-vue": "5.0.4",
|
||||
"@vue/compiler-sfc": "3.4.25",
|
||||
"@vue/compiler-sfc": "3.4.27",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"eslint-plugin-prettier": "5.1.3",
|
||||
|
|
126
pnpm-lock.yaml
126
pnpm-lock.yaml
|
@ -6,8 +6,8 @@ settings:
|
|||
|
||||
dependencies:
|
||||
dompurify:
|
||||
specifier: 3.1.2
|
||||
version: 3.1.2
|
||||
specifier: 3.1.3
|
||||
version: 3.1.3
|
||||
fast-xml-parser:
|
||||
specifier: 4.3.6
|
||||
version: 4.3.6
|
||||
|
@ -30,14 +30,14 @@ dependencies:
|
|||
specifier: 4.8.2
|
||||
version: 4.8.2
|
||||
vue:
|
||||
specifier: 3.4.25
|
||||
version: 3.4.25(typescript@5.4.5)
|
||||
specifier: 3.4.27
|
||||
version: 3.4.27(typescript@5.4.5)
|
||||
vue-i18n:
|
||||
specifier: 9.13.1
|
||||
version: 9.13.1(vue@3.4.25)
|
||||
version: 9.13.1(vue@3.4.27)
|
||||
vue-router:
|
||||
specifier: 4.3.2
|
||||
version: 4.3.2(vue@3.4.25)
|
||||
version: 4.3.2(vue@3.4.27)
|
||||
|
||||
devDependencies:
|
||||
'@iconify-json/fa6-brands':
|
||||
|
@ -75,10 +75,10 @@ devDependencies:
|
|||
version: 5.4.0(terser@5.31.0)(vite@5.2.11)
|
||||
'@vitejs/plugin-vue':
|
||||
specifier: 5.0.4
|
||||
version: 5.0.4(vite@5.2.11)(vue@3.4.25)
|
||||
version: 5.0.4(vite@5.2.11)(vue@3.4.27)
|
||||
'@vue/compiler-sfc':
|
||||
specifier: 3.4.25
|
||||
version: 3.4.25
|
||||
specifier: 3.4.27
|
||||
version: 3.4.27
|
||||
eslint:
|
||||
specifier: 8.57.0
|
||||
version: 8.57.0
|
||||
|
@ -1680,7 +1680,7 @@ packages:
|
|||
jsonc-eslint-parser: 2.4.0
|
||||
mlly: 1.7.0
|
||||
source-map-js: 1.2.0
|
||||
vue-i18n: 9.13.1(vue@3.4.25)
|
||||
vue-i18n: 9.13.1(vue@3.4.27)
|
||||
yaml-eslint-parser: 1.2.2
|
||||
dev: true
|
||||
|
||||
|
@ -1720,7 +1720,7 @@ packages:
|
|||
'@intlify/bundle-utils': 8.0.0(vue-i18n@9.13.1)
|
||||
'@intlify/shared': 9.13.1
|
||||
'@rollup/pluginutils': 5.1.0(rollup@2.79.1)
|
||||
'@vue/compiler-sfc': 3.4.25
|
||||
'@vue/compiler-sfc': 3.4.27
|
||||
debug: 4.3.4
|
||||
fast-glob: 3.3.2
|
||||
js-yaml: 4.1.0
|
||||
|
@ -1729,7 +1729,7 @@ packages:
|
|||
picocolors: 1.0.0
|
||||
source-map-js: 1.2.0
|
||||
unplugin: 1.10.1
|
||||
vue-i18n: 9.13.1(vue@3.4.25)
|
||||
vue-i18n: 9.13.1(vue@3.4.27)
|
||||
transitivePeerDependencies:
|
||||
- rollup
|
||||
- supports-color
|
||||
|
@ -2391,7 +2391,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.2.11)(vue@3.4.25):
|
||||
/@vitejs/plugin-vue@5.0.4(vite@5.2.11)(vue@3.4.27):
|
||||
resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==}
|
||||
engines: {node: ^18.0.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
|
@ -2399,75 +2399,75 @@ packages:
|
|||
vue: ^3.2.25
|
||||
dependencies:
|
||||
vite: 5.2.11(lightningcss@1.24.1)(terser@5.31.0)
|
||||
vue: 3.4.25(typescript@5.4.5)
|
||||
vue: 3.4.27(typescript@5.4.5)
|
||||
dev: true
|
||||
|
||||
/@vue/compiler-core@3.4.25:
|
||||
resolution: {integrity: sha512-Y2pLLopaElgWnMNolgG8w3C5nNUVev80L7hdQ5iIKPtMJvhVpG0zhnBG/g3UajJmZdvW0fktyZTotEHD1Srhbg==}
|
||||
/@vue/compiler-core@3.4.27:
|
||||
resolution: {integrity: sha512-E+RyqY24KnyDXsCuQrI+mlcdW3ALND6U7Gqa/+bVwbcpcR3BRRIckFoz7Qyd4TTlnugtwuI7YgjbvsLmxb+yvg==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.5
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/shared': 3.4.27
|
||||
entities: 4.5.0
|
||||
estree-walker: 2.0.2
|
||||
source-map-js: 1.2.0
|
||||
|
||||
/@vue/compiler-dom@3.4.25:
|
||||
resolution: {integrity: sha512-Ugz5DusW57+HjllAugLci19NsDK+VyjGvmbB2TXaTcSlQxwL++2PETHx/+Qv6qFwNLzSt7HKepPe4DcTE3pBWg==}
|
||||
/@vue/compiler-dom@3.4.27:
|
||||
resolution: {integrity: sha512-kUTvochG/oVgE1w5ViSr3KUBh9X7CWirebA3bezTbB5ZKBQZwR2Mwj9uoSKRMFcz4gSMzzLXBPD6KpCLb9nvWw==}
|
||||
dependencies:
|
||||
'@vue/compiler-core': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/compiler-core': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
|
||||
/@vue/compiler-sfc@3.4.25:
|
||||
resolution: {integrity: sha512-m7rryuqzIoQpOBZ18wKyq05IwL6qEpZxFZfRxlNYuIPDqywrXQxgUwLXIvoU72gs6cRdY6wHD0WVZIFE4OEaAQ==}
|
||||
/@vue/compiler-sfc@3.4.27:
|
||||
resolution: {integrity: sha512-nDwntUEADssW8e0rrmE0+OrONwmRlegDA1pD6QhVeXxjIytV03yDqTey9SBDiALsvAd5U4ZrEKbMyVXhX6mCGA==}
|
||||
dependencies:
|
||||
'@babel/parser': 7.24.5
|
||||
'@vue/compiler-core': 3.4.25
|
||||
'@vue/compiler-dom': 3.4.25
|
||||
'@vue/compiler-ssr': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/compiler-core': 3.4.27
|
||||
'@vue/compiler-dom': 3.4.27
|
||||
'@vue/compiler-ssr': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
estree-walker: 2.0.2
|
||||
magic-string: 0.30.10
|
||||
postcss: 8.4.38
|
||||
source-map-js: 1.2.0
|
||||
|
||||
/@vue/compiler-ssr@3.4.25:
|
||||
resolution: {integrity: sha512-H2ohvM/Pf6LelGxDBnfbbXFPyM4NE3hrw0e/EpwuSiYu8c819wx+SVGdJ65p/sFrYDd6OnSDxN1MB2mN07hRSQ==}
|
||||
/@vue/compiler-ssr@3.4.27:
|
||||
resolution: {integrity: sha512-CVRzSJIltzMG5FcidsW0jKNQnNRYC8bT21VegyMMtHmhW3UOI7knmUehzswXLrExDLE6lQCZdrhD4ogI7c+vuw==}
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/compiler-dom': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
|
||||
/@vue/devtools-api@6.6.1:
|
||||
resolution: {integrity: sha512-LgPscpE3Vs0x96PzSSB4IGVSZXZBZHpfxs+ZA1d+VEPwHdOXowy/Y2CsvCAIFrf+ssVU1pD1jidj505EpUnfbA==}
|
||||
|
||||
/@vue/reactivity@3.4.25:
|
||||
resolution: {integrity: sha512-mKbEtKr1iTxZkAG3vm3BtKHAOhuI4zzsVcN0epDldU/THsrvfXRKzq+lZnjczZGnTdh3ojd86/WrP+u9M51pWQ==}
|
||||
/@vue/reactivity@3.4.27:
|
||||
resolution: {integrity: sha512-kK0g4NknW6JX2yySLpsm2jlunZJl2/RJGZ0H9ddHdfBVHcNzxmQ0sS0b09ipmBoQpY8JM2KmUw+a6sO8Zo+zIA==}
|
||||
dependencies:
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/shared': 3.4.27
|
||||
|
||||
/@vue/runtime-core@3.4.25:
|
||||
resolution: {integrity: sha512-3qhsTqbEh8BMH3pXf009epCI5E7bKu28fJLi9O6W+ZGt/6xgSfMuGPqa5HRbUxLoehTNp5uWvzCr60KuiRIL0Q==}
|
||||
/@vue/runtime-core@3.4.27:
|
||||
resolution: {integrity: sha512-7aYA9GEbOOdviqVvcuweTLe5Za4qBZkUY7SvET6vE8kyypxVgaT1ixHLg4urtOlrApdgcdgHoTZCUuTGap/5WA==}
|
||||
dependencies:
|
||||
'@vue/reactivity': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/reactivity': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
|
||||
/@vue/runtime-dom@3.4.25:
|
||||
resolution: {integrity: sha512-ode0sj77kuwXwSc+2Yhk8JMHZh1sZp9F/51wdBiz3KGaWltbKtdihlJFhQG4H6AY+A06zzeMLkq6qu8uDSsaoA==}
|
||||
/@vue/runtime-dom@3.4.27:
|
||||
resolution: {integrity: sha512-ScOmP70/3NPM+TW9hvVAz6VWWtZJqkbdf7w6ySsws+EsqtHvkhxaWLecrTorFxsawelM5Ys9FnDEMt6BPBDS0Q==}
|
||||
dependencies:
|
||||
'@vue/runtime-core': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/runtime-core': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
csstype: 3.1.3
|
||||
|
||||
/@vue/server-renderer@3.4.25(vue@3.4.25):
|
||||
resolution: {integrity: sha512-8VTwq0Zcu3K4dWV0jOwIVINESE/gha3ifYCOKEhxOj6MEl5K5y8J8clQncTcDhKF+9U765nRw4UdUEXvrGhyVQ==}
|
||||
/@vue/server-renderer@3.4.27(vue@3.4.27):
|
||||
resolution: {integrity: sha512-dlAMEuvmeA3rJsOMJ2J1kXU7o7pOxgsNHVr9K8hB3ImIkSuBrIdy0vF66h8gf8Tuinf1TK3mPAz2+2sqyf3KzA==}
|
||||
peerDependencies:
|
||||
vue: 3.4.25
|
||||
vue: 3.4.27
|
||||
dependencies:
|
||||
'@vue/compiler-ssr': 3.4.25
|
||||
'@vue/shared': 3.4.25
|
||||
vue: 3.4.25(typescript@5.4.5)
|
||||
'@vue/compiler-ssr': 3.4.27
|
||||
'@vue/shared': 3.4.27
|
||||
vue: 3.4.27(typescript@5.4.5)
|
||||
|
||||
/@vue/shared@3.4.25:
|
||||
resolution: {integrity: sha512-k0yappJ77g2+KNrIaF0FFnzwLvUBLUYr8VOwz+/6vLsmItFp51AcxLL7Ey3iPd7BIRyWPOcqUjMnm7OkahXllA==}
|
||||
/@vue/shared@3.4.27:
|
||||
resolution: {integrity: sha512-DL3NmY2OFlqmYYrzp39yi3LDkKxa5vZVwxWdQ3rG0ekuWscHraeIbnI8t+aZK7qhYqEqWKTUdijadunb9pnrgA==}
|
||||
|
||||
/acorn-jsx@5.3.2(acorn@8.11.3):
|
||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||
|
@ -2937,8 +2937,8 @@ packages:
|
|||
esutils: 2.0.3
|
||||
dev: true
|
||||
|
||||
/dompurify@3.1.2:
|
||||
resolution: {integrity: sha512-hLGGBI1tw5N8qTELr3blKjAML/LY4ANxksbS612UiJyDfyf/2D092Pvm+S7pmeTGJRqvlJkFzBoHBQKgQlOQVg==}
|
||||
/dompurify@3.1.3:
|
||||
resolution: {integrity: sha512-5sOWYSNPaxz6o2MUPvtyxTTqR4D3L77pr5rUQoWgD5ROQtVIZQgJkXbo1DLlK3vj11YGw5+LnF4SYti4gZmwng==}
|
||||
dev: false
|
||||
|
||||
/duplexer@0.1.2:
|
||||
|
@ -5175,7 +5175,7 @@ packages:
|
|||
- supports-color
|
||||
dev: true
|
||||
|
||||
/vue-i18n@9.13.1(vue@3.4.25):
|
||||
/vue-i18n@9.13.1(vue@3.4.27):
|
||||
resolution: {integrity: sha512-mh0GIxx0wPtPlcB1q4k277y0iKgo25xmDPWioVVYanjPufDBpvu5ySTjP5wOrSvlYQ2m1xI+CFhGdauv/61uQg==}
|
||||
engines: {node: '>= 16'}
|
||||
peerDependencies:
|
||||
|
@ -5184,30 +5184,30 @@ packages:
|
|||
'@intlify/core-base': 9.13.1
|
||||
'@intlify/shared': 9.13.1
|
||||
'@vue/devtools-api': 6.6.1
|
||||
vue: 3.4.25(typescript@5.4.5)
|
||||
vue: 3.4.27(typescript@5.4.5)
|
||||
|
||||
/vue-router@4.3.2(vue@3.4.25):
|
||||
/vue-router@4.3.2(vue@3.4.27):
|
||||
resolution: {integrity: sha512-hKQJ1vDAZ5LVkKEnHhmm1f9pMiWIBNGF5AwU67PdH7TyXCj/a4hTccuUuYCAMgJK6rO/NVYtQIEN3yL8CECa7Q==}
|
||||
peerDependencies:
|
||||
vue: ^3.2.0
|
||||
dependencies:
|
||||
'@vue/devtools-api': 6.6.1
|
||||
vue: 3.4.25(typescript@5.4.5)
|
||||
vue: 3.4.27(typescript@5.4.5)
|
||||
dev: false
|
||||
|
||||
/vue@3.4.25(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-HWyDqoBHMgav/OKiYA2ZQg+kjfMgLt/T0vg4cbIF7JbXAjDexRf5JRg+PWAfrAkSmTd2I8aPSXtooBFWHB98cg==}
|
||||
/vue@3.4.27(typescript@5.4.5):
|
||||
resolution: {integrity: sha512-8s/56uK6r01r1icG/aEOHqyMVxd1bkYcSe9j8HcKtr/xTOFWvnzIVTehNW+5Yt89f+DLBe4A569pnZLS5HzAMA==}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
peerDependenciesMeta:
|
||||
typescript:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@vue/compiler-dom': 3.4.25
|
||||
'@vue/compiler-sfc': 3.4.25
|
||||
'@vue/runtime-dom': 3.4.25
|
||||
'@vue/server-renderer': 3.4.25(vue@3.4.25)
|
||||
'@vue/shared': 3.4.25
|
||||
'@vue/compiler-dom': 3.4.27
|
||||
'@vue/compiler-sfc': 3.4.27
|
||||
'@vue/runtime-dom': 3.4.27
|
||||
'@vue/server-renderer': 3.4.27(vue@3.4.27)
|
||||
'@vue/shared': 3.4.27
|
||||
typescript: 5.4.5
|
||||
|
||||
/webidl-conversions@4.0.2:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<span v-if="showFullText" class="contentText" v-html="fullText()" />
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<span v-else v-html="colapsedText()" />
|
||||
<span v-else v-html="collapsedText()" />
|
||||
<span v-if="text.length > visibleLimit && !showFullText">...</span>
|
||||
<button
|
||||
v-if="text.length > visibleLimit"
|
||||
|
@ -38,7 +38,7 @@ export default {
|
|||
fullText() {
|
||||
return purifyHTML(rewriteDescription(this.text));
|
||||
},
|
||||
colapsedText() {
|
||||
collapsedText() {
|
||||
return purifyHTML(rewriteDescription(this.text.slice(0, this.visibleLimit)));
|
||||
},
|
||||
},
|
||||
|
|
|
@ -33,8 +33,13 @@
|
|||
<div class="comment-footer my-1 flex items-center gap-3">
|
||||
<div class="i-fa6-solid:thumbs-up" />
|
||||
<span v-text="numberFormat(comment.likeCount)" />
|
||||
<i v-if="comment.hearted" class="i-fa6-solid:heart" />
|
||||
<img v-if="comment.creatorReplied" :src="uploaderAvatarUrl" class="h-5 w-5 rounded-full" />
|
||||
<i v-if="comment.hearted" class="i-fa6-solid:heart" :title="$t('actions.creator_liked')" />
|
||||
<img
|
||||
v-if="comment.creatorReplied"
|
||||
:src="uploaderAvatarUrl"
|
||||
class="h-5 w-5 rounded-full"
|
||||
:title="$t('actions.creator_replied')"
|
||||
/>
|
||||
</div>
|
||||
<template v-if="comment.repliesPage && (!loadingReplies || !showingReplies)">
|
||||
<div class="cursor-pointer" @click="loadReplies">
|
||||
|
|
|
@ -31,16 +31,32 @@
|
|||
class="absolute top-8 rounded bg-black/80 p-2 text-lg backdrop-blur-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ModalComponent v-if="showSpeedModal" @close="showSpeedModal = false">
|
||||
<h2 v-t="'actions.playback_speed'" />
|
||||
<div class="flex flex-col">
|
||||
<input
|
||||
v-model="playbackSpeedInput"
|
||||
class="input my-3"
|
||||
type="text"
|
||||
:placeholder="$t('actions.playback_speed')"
|
||||
@keyup.enter="setSpeedFromInput()"
|
||||
/>
|
||||
<button v-t="'actions.okay'" class="btn ml-auto w-min" @click="setSpeedFromInput()" />
|
||||
</div>
|
||||
</ModalComponent>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import "shaka-player/dist/controls.css";
|
||||
import { parseTimeParam } from "@/utils/Misc";
|
||||
import ModalComponent from "./ModalComponent.vue";
|
||||
|
||||
const shaka = import("shaka-player/dist/shaka-player.ui.js");
|
||||
const hotkeys = import("hotkeys-js");
|
||||
|
||||
export default {
|
||||
components: { ModalComponent },
|
||||
props: {
|
||||
video: {
|
||||
type: Object,
|
||||
|
@ -66,6 +82,8 @@ export default {
|
|||
destroying: false,
|
||||
inSegment: false,
|
||||
isHoveringTimebar: false,
|
||||
showSpeedModal: false,
|
||||
playbackSpeedInput: null,
|
||||
currentTime: 0,
|
||||
seekbarPadding: 2,
|
||||
error: 0,
|
||||
|
@ -106,7 +124,7 @@ export default {
|
|||
this.hotkeysPromise.then(() => {
|
||||
var self = this;
|
||||
this.$hotkeys(
|
||||
"f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+n,shift+,,shift+.,alt+p,return,.,,",
|
||||
"f,m,j,k,l,c,space,up,down,left,right,0,1,2,3,4,5,6,7,8,9,shift+n,shift+s,shift+,,shift+.,alt+p,return,.,,",
|
||||
function (e, handler) {
|
||||
const videoEl = self.$refs.videoEl;
|
||||
switch (handler.key) {
|
||||
|
@ -196,11 +214,14 @@ export default {
|
|||
self.$emit("navigateNext");
|
||||
e.preventDefault();
|
||||
break;
|
||||
case "shift+s":
|
||||
self.showSpeedModal = true;
|
||||
break;
|
||||
case "shift+,":
|
||||
self.$player.trickPlay(Math.max(videoEl.playbackRate - 0.25, 0.25));
|
||||
self.adjustPlaybackSpeed(videoEl.playbackRate - 0.25);
|
||||
break;
|
||||
case "shift+.":
|
||||
self.$player.trickPlay(Math.min(videoEl.playbackRate + 0.25, 2));
|
||||
self.adjustPlaybackSpeed(videoEl.playbackRate + 0.25);
|
||||
break;
|
||||
case "alt+p":
|
||||
document.pictureInPictureElement
|
||||
|
@ -651,7 +672,19 @@ export default {
|
|||
this.$refs.videoEl.currentTime = time;
|
||||
}
|
||||
},
|
||||
|
||||
adjustPlaybackSpeed(newSpeed) {
|
||||
const normalizedSpeed = Math.min(4, Math.max(0.25, newSpeed));
|
||||
this.$player.trickPlay(normalizedSpeed);
|
||||
},
|
||||
setSpeedFromInput() {
|
||||
try {
|
||||
const newSpeed = Number(this.playbackSpeedInput);
|
||||
this.adjustPlaybackSpeed(newSpeed);
|
||||
} catch (err) {
|
||||
alert(this.$t("actions.invalid_input"));
|
||||
}
|
||||
this.showSpeedModal = false;
|
||||
},
|
||||
updateMarkers() {
|
||||
const markers = this.$refs.container.querySelector(".shaka-ad-markers");
|
||||
const array = ["to right"];
|
||||
|
|
|
@ -546,33 +546,13 @@ export default {
|
|||
this.fetchSponsors().then(data => (this.sponsors = data));
|
||||
},
|
||||
async getComments() {
|
||||
this.fetchComments().then(data => {
|
||||
this.rewriteComments(data.comments);
|
||||
this.comments = data;
|
||||
});
|
||||
this.comments = await this.fetchComments();
|
||||
},
|
||||
async fetchSubscribedStatus() {
|
||||
if (!this.channelId) return;
|
||||
|
||||
this.subscribed = await this.fetchSubscriptionStatus(this.channelId);
|
||||
},
|
||||
rewriteComments(data) {
|
||||
data.forEach(comment => {
|
||||
const parser = new DOMParser();
|
||||
const xmlDoc = parser.parseFromString(comment.commentText, "text/html");
|
||||
xmlDoc.querySelectorAll("a").forEach(elem => {
|
||||
if (!elem.innerText.match(/(?:[\d]{1,2}:)?(?:[\d]{1,2}):(?:[\d]{1,2})/))
|
||||
elem.outerHTML = elem.getAttribute("href");
|
||||
});
|
||||
comment.commentText = xmlDoc
|
||||
.querySelector("body")
|
||||
.innerHTML.replaceAll(/(?:http(?:s)?:\/\/)?(?:www\.)?youtube\.com(\/[/a-zA-Z0-9_?=&-]*)/gm, "$1")
|
||||
.replaceAll(
|
||||
/(?:http(?:s)?:\/\/)?(?:www\.)?youtu\.be\/(?:watch\?v=)?([/a-zA-Z0-9_?=&-]*)/gm,
|
||||
"/watch?v=$1",
|
||||
);
|
||||
});
|
||||
},
|
||||
subscribeHandler() {
|
||||
this.toggleSubscriptionState(this.channelId, this.subscribed).then(success => {
|
||||
if (success) this.subscribed = !this.subscribed;
|
||||
|
@ -616,7 +596,6 @@ export default {
|
|||
}).then(json => {
|
||||
this.comments.nextpage = json.nextpage;
|
||||
this.loading = false;
|
||||
this.rewriteComments(json.comments);
|
||||
this.comments.comments = this.comments.comments.concat(json.comments);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -156,7 +156,11 @@
|
|||
"concurrent_prefetch_limit": "Concurrent Stream Prefetch Limit",
|
||||
"customize": "Customize",
|
||||
"invalid_url": "Invalid URL!",
|
||||
"add": "Add"
|
||||
"add": "Add",
|
||||
"creator_replied": "Creator replied",
|
||||
"creator_liked": "Creator liked",
|
||||
"playback_speed": "Playback speed",
|
||||
"invalid_input": "Invalid input"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Pinned by {author}",
|
||||
|
|
|
@ -156,7 +156,9 @@
|
|||
"customize": "Kohanda",
|
||||
"invalid_url": "Vigane URL!",
|
||||
"add": "Lisa",
|
||||
"delete_group_confirm": "Kas kustutame selle grupi?"
|
||||
"delete_group_confirm": "Kas kustutame selle grupi?",
|
||||
"creator_replied": "Autor vastas",
|
||||
"creator_liked": "Autorile meeldis see"
|
||||
},
|
||||
"preferences": {
|
||||
"has_cdn": "CDN'i olek?",
|
||||
|
|
|
@ -152,7 +152,11 @@
|
|||
"customize": "Testreszab",
|
||||
"invalid_url": "Érvénytelen URL!",
|
||||
"add": "Hozzáadás",
|
||||
"delete_group_confirm": "Törli ezt a csoportot?"
|
||||
"delete_group_confirm": "Törli ezt a csoportot?",
|
||||
"creator_replied": "A készítő válaszolt",
|
||||
"creator_liked": "A készítő kedvelte",
|
||||
"playback_speed": "Visszajátszási sebesség",
|
||||
"invalid_input": "Érvénytelen bevitel"
|
||||
},
|
||||
"video": {
|
||||
"ratings_disabled": "Értékelések Letiltva",
|
||||
|
|
|
@ -156,7 +156,11 @@
|
|||
"customize": "Dostosuj",
|
||||
"invalid_url": "Nieprawidłowy adres URL!",
|
||||
"add": "Dodaj",
|
||||
"delete_group_confirm": "Usunąć tę grupę?"
|
||||
"delete_group_confirm": "Usunąć tę grupę?",
|
||||
"creator_replied": "Twórca odpowiedział",
|
||||
"creator_liked": "Twórca polubił",
|
||||
"invalid_input": "Nieprawidłowe dane wejściowe",
|
||||
"playback_speed": "Szybkość odtwarzania"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Przypięty przez {author}",
|
||||
|
|
|
@ -155,7 +155,12 @@
|
|||
"concurrent_prefetch_limit": "Предел одновременной предзагрузки трансляций",
|
||||
"customize": "Персонализация",
|
||||
"invalid_url": "Неправильная ссылка!",
|
||||
"add": "Добавить"
|
||||
"add": "Добавить",
|
||||
"creator_replied": "Ответ автора",
|
||||
"creator_liked": "Автор оценил",
|
||||
"playback_speed": "Скорость воспроизведения",
|
||||
"invalid_input": "Некорректный ввод",
|
||||
"delete_group_confirm": "Удалить группу?"
|
||||
},
|
||||
"comment": {
|
||||
"pinned_by": "Закреплено пользователем {author}",
|
||||
|
|
|
@ -132,7 +132,11 @@
|
|||
"invalid_url": "Geçersiz URL!",
|
||||
"customize": "Özelleştir",
|
||||
"add": "Ekle",
|
||||
"delete_group_confirm": "Bu grup silinsin mi?"
|
||||
"delete_group_confirm": "Bu grup silinsin mi?",
|
||||
"creator_replied": "Oluşturan yanıtladı",
|
||||
"creator_liked": "Oluşturan beğendi",
|
||||
"playback_speed": "Oynatma hızı",
|
||||
"invalid_input": "Geçersiz giriş"
|
||||
},
|
||||
"player": {
|
||||
"watch_on": "{0} üzerinde görüntüle",
|
||||
|
|
Loading…
Reference in New Issue