Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const ArticleLeadAssetVideo = ({
brightcoveVideoId,
brightcovePolicyKey,
brightcoveAccountId,
posterImage,
onVideoPress,
skySports
}) => {
const crop = getStandardTemplateCrop(posterImage);
const { ratio, url } = crop;
const [ratioWidth, ratioHeight] = ratio.split(":");
const aspectRatio = ratioWidth / ratioHeight;
const width = screenWidth();
const height = width / aspectRatio;
return (
<video width="{width}" poster="{{" height="{height}">
);
};
</video>
pullQuote(
key,
{
caption: { name, text, twitter }
},
children
) {
const content = children[0].string;
const contentWidth = Math.min(screenWidth(), tabletWidth);
return (
{({
theme: { pullQuoteFont, sectionColour = colours.section.default }
}) => (
timeout: adConfig.biddersConfig.timeout
}),
section,
sizingMap: config.mappings,
slotName,
slots: this.slots,
slotTargeting: adConfig.slotTargeting
};
const sizeProps = !isAdReady
? { height: 0, width: 0 }
: {
height: config.maxSizes.height,
width:
Platform.OS === "ios" || Platform.OS === "android"
? screenWidth()
: config.maxSizes.width
};
const adView = (
key,
defaultFont,
LinkComponent
}) => {
const { spacing } = styleguide({ scale });
const [inlineExclusion, setInlineExclusion] = useState(false);
if (!str.length) {
return null;
}
const contentWidth = Math.min(screenWidth(), tabletWidth);
const gutters = (screenWidth() - contentWidth) / 2 + spacing(2);
const container = new TextContainer(
isTablet ? contentWidth : screenWidth() - spacing(4),
10000,
0,
0,
dropCap ? [dropCap.exclusion] : []
);
const slice = str.charAt(1) === " " ? 2 : 1;
const manager = new LayoutManager(
dropCap ? str.slice(slice) : str,
[container],
inlineExclusion ? [inlineExclusion.exclusion] : []
);
const positioned = manager.layout();
video(
key,
{
brightcovePolicyKey,
brightcoveVideoId,
brightcoveAccountId,
posterImageUrl,
caption,
skySports
}
) {
const aspectRatio = 16 / 9;
const screenW = screenWidth(isTablet);
const height = screenW / aspectRatio;
return (
() => (
<header width="{Math.min(maxWidth,">
),
[]</header>
constructor(props) {
super(props);
const { slotName } = props;
this.prebidConfig = prebidConfig;
this.isWeb = Platform.OS === "web";
this.state = {
config: getSlotConfig(slotName, screenWidth()),
hasError: false,
isAdReady: false,
hasAdBlock: false
};
}
.map(slot => getSlotConfig(slot, screenWidth()));
static getDerivedStateFromProps(nextProps) {
const { slotName } = nextProps;
return {
config: getSlotConfig(slotName, screenWidth())
};
}