<commit_before>import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';

const messages = defineMessages({
  toggle_sound: { id: 'video_player.toggle_sound', defaultMessage: 'Toggle sound' },
  toggle_visible: { id: 'video_player.toggle_visible', defaultMessage: 'Toggle visibility' },
  expand_video: { id: 'video_player.expand', defaultMessage: 'Expand video' },
  expand_video: { id: 'video_player.video_error', defaultMessage: 'Video could not be played' }
});

class VideoPlayer extends React.PureComponent {

  constructor (props, context) {
    super(props, context);
    this.state = {
      visible: !this.props.sensitive,
      preview: true,
      muted: true,
      hasAudio: true,
      videoError: false
    };

    this.handleClick = this.handleClick.bind(this);
    this.handleVideoClick = this.handleVideoClick.bind(this);
    this.handleOpen = this.handleOpen.bind(this);
    this.handleVisibility = this.handleVisibility.bind(this);
    this.handleExpand = this.handleExpand.bind(this);
    this.setRef = this.setRef.bind(this);
    this.handleLoadedData = this.handleLoadedData.bind(this);
    this.handleVideoError = this.handleVideoError.bind(this);
  }

  handleClick () {
    this.setState({ muted: !this.state.muted });
  }

  handleVideoClick (e) {<commit_msg>Remove unnecessary message in video player (#3007)<commit_after>import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import IconButton from './icon_button';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { isIOS } from '../is_mobile';

const messages = defineMessages({
  toggle_sound: { id: 'video_player.toggle_sound', defaultMessage: 'Toggle sound' },
  toggle_visible: { id: 'video_player.toggle_visible', defaultMessage: 'Toggle visibility' },
  expand_video: { id: 'video_player.expand', defaultMessage: 'Expand video' },
});

class VideoPlayer extends React.PureComponent {

  constructor (props, context) {
    super(props, context);
    this.state = {
      visible: !this.props.sensitive,
      preview: true,
      muted: true,
      hasAudio: true,
      videoError: false
    };

    this.handleClick = this.handleClick.bind(this);
    this.handleVideoClick = this.handleVideoClick.bind(this);
    this.handleOpen = this.handleOpen.bind(this);
    this.handleVisibility = this.handleVisibility.bind(this);
    this.handleExpand = this.handleExpand.bind(this);
    this.setRef = this.setRef.bind(this);
    this.handleLoadedData = this.handleLoadedData.bind(this);
    this.handleVideoError = this.handleVideoError.bind(this);
  }

  handleClick () {
    this.setState({ muted: !this.state.muted });
  }

  handleVideoClick (e) {
{'fraction_non_alphanumeric': 0.12605896306336836, 'fraction_numerical': 0.0013554727211114877, 'mean_word_length': 4.41651376146789, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6196086', 'n_tokens_mistral': 894, 'n_tokens_neox': 881, 'n_words': 193}