Skip to content
Snippets Groups Projects
Select Git revision
  • 29851f9594606f486e62e08d02d1af7f4056159f
  • mui5-tetras-main-stable default protected
  • mui5-tetras-main-old-stable
  • preprod protected
  • 75-dernieres-ameliorations-avant-workshop-du-7-02
  • wip-fix-xywh
  • wip-positionement-annot
  • wip-surface-transformer
  • uploads-file
  • 69-la-video-demare-quand-on-fait-glisser-le-slider-et-le-clic-creer-un-decalage-entre-le-player
  • 61-recettage-des-outils-d-annotation
  • gestion_multiple_ouverture_pannel_annotation
  • autorisation_un_pannel_annotation
  • autorisation_un_pannel_edition_annotation
  • récupération_temps_video
  • save-shapes-and-position
  • fix-error-create-annotation-pannel
  • time-saving-on-annotation
  • tetras-main protected
  • fix-poc-mirador
  • tetras-antho-test
21 results

AnnotationCreation.js

Blame
  • VideoViewer.js 1.59 KiB
    import { connect } from 'react-redux';
    import { compose } from 'redux';
    import { withTranslation } from 'react-i18next';
    import { withStyles } from '@material-ui/core';
    import { withPlugins } from '../extend/withPlugins';
    import * as actions from '../state/actions';
    import { VideoViewer } from '../components/VideoViewer';
    import {
      getCurrentCanvas,
      getCurrentCanvasWorld,
      getWindowMutedStatus,
      getWindowPausedStatus,
      getWindowCurrentTime,
    } from '../state/selectors';
    
    /** */
    const mapStateToProps = (state, { windowId }) => ({
      canvas: (getCurrentCanvas(state, { windowId }) || {}),
      canvasWorld: getCurrentCanvasWorld(state, { windowId }),
      currentTime: getWindowCurrentTime(state, { windowId }),
      muted: getWindowMutedStatus(state, { windowId }),
      paused: getWindowPausedStatus(state, { windowId }),
    });
    
    /** */
    const mapDispatchToProps = (dispatch, { windowId }) => ({
      setCurrentTime: (...args) => dispatch(actions.setWindowCurrentTime(windowId, ...args)),
      setPaused: (...args) => dispatch(actions.setWindowPaused(windowId, ...args)),
    });
    
    /** */
    const styles = () => ({
      flexContainer: {
        alignItems: 'center',
        display: 'flex',
        width: '100%',
      },
      flexFill: {
        height: '100%',
        position: 'relative',
        width: '100%',
      },
      video: {
        height: '100%',
        maxHeight: '100%',
        maxWidth: '100%',
        'object-fit': 'scale-down',
        'object-position': 'left top',
        width: '100%',
      },
    });
    
    const enhance = compose(
      withTranslation(),
      withStyles(styles),
      connect(mapStateToProps, mapDispatchToProps),
      withPlugins('VideoViewer'),
    );
    
    export default enhance(VideoViewer);