Compare commits

...

5 commits

Author SHA1 Message Date
Pranav1703
85196abe76
Merge a14a1b8798 into 31a5cc6f1a 2026-03-07 11:14:49 -03:00
Tim
31a5cc6f1a chore: update langs
Some checks failed
Build / build (push) Has been cancelled
2026-03-06 14:27:33 +01:00
Pranav1703
a14a1b8798 remove trailing tab space 2025-12-18 11:28:50 +05:30
Pranav1703
d130a0de0a fix: build issues 2025-12-14 18:20:18 +05:30
Pranav1703
ef98490be6 feature: speeds up video when holding MLB 2025-12-11 20:59:22 +05:30
5 changed files with 48 additions and 8 deletions

View file

@ -55,7 +55,7 @@ importers:
version: 24.2.3(typescript@5.9.2)
langs:
specifier: github:Stremio/nodejs-langs
version: https://codeload.github.com/Stremio/nodejs-langs/tar.gz/24daad4e78c324fcc88d6673df3cd75348b2efdf
version: https://codeload.github.com/Stremio/nodejs-langs/tar.gz/e5a3af7d2dd556592cbfe7cf879c1064ed0081a1
lodash.debounce:
specifier: 4.0.8
version: 4.0.8
@ -3051,8 +3051,8 @@ packages:
resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==}
engines: {node: '>=6'}
langs@https://codeload.github.com/Stremio/nodejs-langs/tar.gz/24daad4e78c324fcc88d6673df3cd75348b2efdf:
resolution: {tarball: https://codeload.github.com/Stremio/nodejs-langs/tar.gz/24daad4e78c324fcc88d6673df3cd75348b2efdf}
langs@https://codeload.github.com/Stremio/nodejs-langs/tar.gz/e5a3af7d2dd556592cbfe7cf879c1064ed0081a1:
resolution: {tarball: https://codeload.github.com/Stremio/nodejs-langs/tar.gz/e5a3af7d2dd556592cbfe7cf879c1064ed0081a1}
version: 2.0.0
launch-editor@2.11.1:
@ -8295,7 +8295,7 @@ snapshots:
kleur@3.0.3: {}
langs@https://codeload.github.com/Stremio/nodejs-langs/tar.gz/24daad4e78c324fcc88d6673df3cd75348b2efdf: {}
langs@https://codeload.github.com/Stremio/nodejs-langs/tar.gz/e5a3af7d2dd556592cbfe7cf879c1064ed0081a1: {}
launch-editor@2.11.1:
dependencies:

View file

@ -99,6 +99,10 @@
"name": "한국어",
"codes": ["ko-KR", "kor"]
},
{
"name": "Lietuvių",
"codes": ["lt-LT", "ltu"]
},
{
"name": "македонски јазик",
"codes": ["mk-MK", "mkd"]
@ -107,6 +111,10 @@
"name": "ဗမာစာ",
"codes": ["my-BM", "mya"]
},
{
"name": "नेपाली",
"codes": ["ne-NP", "nep"]
},
{
"name": "Norsk bokmål",
"codes": ["nb-NO", "nob"]

View file

@ -6,11 +6,11 @@ const all = langs.all().map((lang) => ({
label: lang.local,
alpha2: lang['1'],
alpha3: [lang['2'], lang['2B'], lang['2T'], lang['3']],
locale: lang['locale'],
ietf: lang['ietf'],
}));
const find = (code: string) => {
return all.find(({ alpha2, alpha3, locale }) => [alpha2, ...alpha3, locale].includes(code));
return all.find(({ alpha2, alpha3, ietf }) => [alpha2, ...alpha3, ietf].includes(code));
};
const label = (code: string) => {

View file

@ -50,6 +50,10 @@ const Player = ({ urlParams, queryParams }) => {
const toast = useToast();
const [seeking, setSeeking] = React.useState(false);
const isMlbHeld = React.useRef(false);
const MlbHoldTimerRef = React.useRef(null);
const currPlaybackSpeed = React.useRef(null);
const [casting, setCasting] = React.useState(() => {
return services.chromecast.active && services.chromecast.transport.getCastState() === cast.framework.CastState.CONNECTED;
@ -331,6 +335,31 @@ const Player = ({ urlParams, queryParams }) => {
closeSideDrawer();
}, []);
const onVideoMouseDown = React.useCallback((event) => {
if (event.button !== 0) return;
MlbHoldTimerRef.current = setTimeout(() => {
currPlaybackSpeed.current = video.state.playbackSpeed;
isMlbHeld.current = true;
video.setProp('playbackSpeed',2.00);
}, 500);
}, [video]);
const onVideoMouseUp = React.useCallback((event) => {
clearTimeout(MlbHoldTimerRef.current);
if (isMlbHeld.current){
video.setProp('playbackSpeed',currPlaybackSpeed.current);
isMlbHeld.current = false;
}
}, [video]);
const onVideoMouseLeave = React.useCallback((event) => {
clearTimeout(MlbHoldTimerRef.current);
if (isMlbHeld.current) {
video.setProp('playbackSpeed',currPlaybackSpeed.current);
isMlbHeld.current = false;
}
}, [video]);
const onContainerMouseMove = React.useCallback((event) => {
setImmersed(false);
if (!event.nativeEvent.immersePrevented) {
@ -789,6 +818,9 @@ const Player = ({ urlParams, queryParams }) => {
className={styles['layer']}
onClick={onVideoClick}
onDoubleClick={onVideoDoubleClick}
onMouseDown={onVideoMouseDown}
onMouseUp={onVideoMouseUp}
onMouseLeave={onVideoMouseLeave}
/>
{
!video.state.loaded ?

View file

@ -5,9 +5,9 @@ const PropTypes = require('prop-types');
const classnames = require('classnames');
const styles = require('./styles');
const Video = React.forwardRef(({ className, onClick, onDoubleClick }, ref) => {
const Video = React.forwardRef(({ className, onClick, onDoubleClick, onMouseUp, onMouseDown, onMouseLeave }, ref) => {
return (
<div className={classnames(className, styles['video-container'])} onClick={onClick} onDoubleClick={onDoubleClick}>
<div className={classnames(className, styles['video-container'])} onClick={onClick} onDoubleClick={onDoubleClick} onMouseUp={onMouseUp} onMouseDown={onMouseDown} onMouseLeave={onMouseLeave}>
<div ref={ref} className={styles['video']} />
</div>
);