@guardian/atoms-rendering
Advanced tools
Comparing version 22.6.2 to 22.6.3
# @guardian/atoms-rendering | ||
## 22.6.3 | ||
### Patch Changes | ||
- 2f7a06a: Untsick YoutubeAtom on pause event | ||
- b401b29: fix: content jump on sticky video close | ||
## 22.6.2 | ||
@@ -4,0 +11,0 @@ |
@@ -24,5 +24,7 @@ "use strict"; | ||
case 'play': | ||
case 'resume': | ||
setStopVideo(false); | ||
setIsPlaying(true); | ||
break; | ||
case 'pause': | ||
case 'end': | ||
@@ -29,0 +31,0 @@ case 'cued': |
@@ -43,2 +43,11 @@ "use strict"; | ||
} | ||
else { | ||
libs_1.log('dotcom', { | ||
from: loggerFrom, | ||
videoId, | ||
msg: 'resume', | ||
event, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('resume')); | ||
} | ||
const checkProgress = async () => { | ||
@@ -91,2 +100,11 @@ if (!player) | ||
} | ||
if (event.data === YT.PlayerState.PAUSED) { | ||
libs_1.log('dotcom', { | ||
from: loggerFrom, | ||
videoId, | ||
msg: 'pause', | ||
event, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('pause')); | ||
} | ||
if (event.data === YT.PlayerState.CUED) { | ||
@@ -93,0 +111,0 @@ libs_1.log('dotcom', { |
@@ -82,5 +82,4 @@ "use strict"; | ||
const stickyContainerStyles = (isMainMedia) => { | ||
const height = 192; | ||
return react_2.css ` | ||
height: ${height}px; | ||
height: 192px; | ||
position: relative; | ||
@@ -91,4 +90,4 @@ display: flex; | ||
${source_foundations_1.from.tablet} { | ||
height: ${height * 2}px; | ||
${source_foundations_1.from.phablet} { | ||
height: 349px; | ||
} | ||
@@ -95,0 +94,0 @@ `; |
@@ -21,5 +21,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime"; | ||
case 'play': | ||
case 'resume': | ||
setStopVideo(false); | ||
setIsPlaying(true); | ||
break; | ||
case 'pause': | ||
case 'end': | ||
@@ -26,0 +28,0 @@ case 'cued': |
@@ -37,2 +37,11 @@ import { jsx as _jsx } from "@emotion/react/jsx-runtime"; | ||
} | ||
else { | ||
log('dotcom', { | ||
from: loggerFrom, | ||
videoId, | ||
msg: 'resume', | ||
event, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('resume')); | ||
} | ||
const checkProgress = async () => { | ||
@@ -85,2 +94,11 @@ if (!player) | ||
} | ||
if (event.data === YT.PlayerState.PAUSED) { | ||
log('dotcom', { | ||
from: loggerFrom, | ||
videoId, | ||
msg: 'pause', | ||
event, | ||
}); | ||
eventEmitters.forEach((eventEmitter) => eventEmitter('pause')); | ||
} | ||
if (event.data === YT.PlayerState.CUED) { | ||
@@ -87,0 +105,0 @@ log('dotcom', { |
@@ -79,5 +79,4 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime"; | ||
const stickyContainerStyles = (isMainMedia) => { | ||
const height = 192; | ||
return css ` | ||
height: ${height}px; | ||
height: 192px; | ||
position: relative; | ||
@@ -88,4 +87,4 @@ display: flex; | ||
${from.tablet} { | ||
height: ${height * 2}px; | ||
${from.phablet} { | ||
height: 349px; | ||
} | ||
@@ -92,0 +91,0 @@ `; |
@@ -126,3 +126,3 @@ import { ArticleTheme } from '@guardian/libs'; | ||
}; | ||
export declare type VideoEventKey = 'play' | '25' | '50' | '75' | 'end' | 'skip' | 'cued' | 'stick' | 'close'; | ||
export declare type VideoEventKey = 'play' | '25' | '50' | '75' | 'end' | 'skip' | 'cued' | 'resume' | 'pause' | 'stick' | 'close'; | ||
export {}; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "22.6.2", | ||
"version": "22.6.3", | ||
"source": "src/index.ts", | ||
@@ -10,0 +10,0 @@ "main": "dist/commonjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
240180
4867
0