import React, { useContext } from "react"; import { StoryProps, GlobalCtx } from "./../interfaces"; import GlobalContext from "./../context/Global"; const Story = (props: StoryProps) => { const globalContext = useContext( GlobalContext ); const { width, height, loader, header, storyStyles } = globalContext; const rendererMessageHandler = (type: string, data: any) => { switch (type) { case 'UPDATE_VIDEO_DURATION': props.getVideoDuration(data.duration); return { ack: 'OK' as 'OK' } } } const getStoryContent = () => { let InnerContent = props.story.content; let config = { width, height, loader, header, storyStyles }; return }; return (
{getStoryContent()}
); }; const styles = { story: { display: "flex", position: "relative", overflow: "hidden" }, storyContent: { width: "auto", maxWidth: "100%", maxHeight: "100%", margin: "auto" } }; export default Story;