import React from 'react';
import styles from './index.css';
import Box from '../Box/index.jsx';
const play = props => {
    const stop = e => {
        e.nativeEvent.stopImmediatePropagation();
        e.stopPropagation();
    },
    {data = {}} = props;
    let {url = ""} = data;
    if(url.split("ezopen://")[0] == 'ezopen://'){
        url = `/screen/assets/monitor/index.html?src=${encodeURIComponent(url)}`
    }
    return (
        <div className={styles.box} onClick={props.showClick}>
            <Box className={styles.sbox} onClick={stop}>
                <iframe src={url} scrolling="no" allowFullScreen={true}></iframe>
            </Box>
        </div>
    );
}
export {play}
export default play