Merge branch 'development' of https://github.com/Stremio/stremio-web into development

This commit is contained in:
Tim 2025-10-10 08:28:37 +02:00
commit 593c8d55d0
6 changed files with 37 additions and 7 deletions

View file

@ -32,12 +32,12 @@ Project maintainers are responsible for enforcing this code of conduct. They can
- Refrain from excesive comments generated by AI.
- Refrain from docs generated entirely by AI.
- Always check what files you are committing and submitting to the PR when you are using any agent for help or an AI model.
- If you don't how to tackle a problem and AI can't help you, please just ask or look in Stack Overlflow, Google, Medium etc.
- If you don't know how to tackle a problem and AI can't help you, please just ask or look in Stack Overlflow, Google, Medium etc.
- Learning how to code is fun and easier when using AI, but sometimes it might be just too much ... what are you going to learn, if AI does everything for you and you don't know what the code you are submitting actually does?!
## Scope
This Code of Conduct applies everywhere in `stremio-web` repository, and also applies when an individual is officially representing the project or its community in other spaces.
This Code of Conduct applies everywhere in `stremio-web` repository, and also applies when an individual is officially representing the project or it's community in other spaces.
## Enforcement

View file

@ -49,7 +49,7 @@ const useAppleLogin = (): [() => Promise<AppleLoginResponse>, () => void] => {
timeout.current && clearTimeout(timeout.current);
timeout.current = setTimeout(() => {
if (tries >= MAX_TRIES)
return reject(new Error('Failed to authenticate with Apple'));
return reject(new Error('Failed to authenticate with Apple', { cause: 'Number of allowed tries exceeded!' }));
tries++;

View file

@ -39,7 +39,7 @@ const useFacebookLogin = () => {
timeout.current && clearTimeout(timeout.current);
timeout.current = setTimeout(() => {
if (tries >= MAX_TRIES)
return reject(new Error('Failed to authenticate with facebook'));
return reject(new Error('Failed to authenticate with facebook', { cause: 'Number of allowed tries exceeded!' }));
tries++;

View file

@ -547,6 +547,36 @@ const Player = ({ urlParams, queryParams }) => {
break;
}
case 'MediaPlayPause': {
if (!menusOpen && !nextVideoPopupOpen && video.state.paused !== null) {
event.preventDefault();
if (video.state.paused) {
onPlayRequested();
setSeeking(false);
} else {
onPauseRequested();
}
}
break;
}
case 'MediaPlay': {
if (!menusOpen && !nextVideoPopupOpen && video.state.paused === true) {
event.preventDefault();
onPlayRequested();
setSeeking(false);
}
break;
}
case 'MediaPause': {
if (!menusOpen && !nextVideoPopupOpen && video.state.paused === false) {
event.preventDefault();
onPauseRequested();
}
break;
}
case 'ArrowRight': {
if (!menusOpen && !nextVideoPopupOpen && video.state.time !== null) {
const seekDuration = event.shiftKey ? settings.seekShortTimeDuration : settings.seekTimeDuration;

View file

@ -21,7 +21,7 @@ const initialize = () => {
if (castAPIAvailable) {
resolve();
} else {
reject(new Error('window.cast api not available'));
reject(new Error('window.cast api not available', { cause: 'castAPIAvailable is null.' }));
}
}
if (castAPIAvailable !== null) {
@ -167,7 +167,7 @@ function ChromecastTransport() {
});
}));
} else {
return Promise.reject(new Error('Session not started'));
return Promise.reject(new Error('Session not started', { cause: 'castSession is null.' }));
}
};
}

View file

@ -63,7 +63,7 @@ function Shell() {
} catch (e) {
console.error(e);
active = false;
error = new Error(e);
error = new Error('Failed to initialize shell transport', { cause: e });
starting = false;
onStateChanged();
transport = null;