MCPcopy Index your code
hub / github.com/MALSync/MALSync / addVideoTime

Function addVideoTime

src/iframe.ts:71–84  ·  view source on GitHub ↗
(forward: boolean)

Source from the content-addressed store, hash-verified

69});
70
71async function addVideoTime(forward: boolean) {
72 if (typeof tempPlayer === 'undefined') {
73 con.error('[Iframe] No player Found');
74 return;
75 }
76 let time = parseInt(await api.settings.getAsync('introSkip'));
77 if (!forward) time = 0 - time;
78 const totalTime = tempPlayer.currentTime + time;
79 if (tempPlayer.duration && tempPlayer.duration > 15 && totalTime > tempPlayer.duration - 3) {
80 tempPlayer.currentTime = tempPlayer.duration - 3;
81 return;
82 }
83 tempPlayer.currentTime = totalTime;
84}
85
86const css =
87 'font-size: 20px; padding-bottom: 3px; color: white; text-shadow: -1px -1px #2e51a2, 1px -1px #2e51a2, -1px 1px #2e51a2, 1px 1px #2e51a2, 2px 2px #2e51a2, 3px 3px #2e51a2;';

Callers 1

iframe.tsFile · 0.70

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected