<commit_before>var React = require('react');
var StandardUIPlayer = require('./StandardUIPlayer');

var PlayerContainer = React.createClass({

  handlePlayClick: function(e){
    this.props.sound.togglePause();
  },

  bindToEvents: function(){

    // update on current position
    var updatePlay = function(){this.update()}.bind(this);

    var onFinish = function(){this.finish()}.bind(this);

    // try to catch the events when load
    this.props.sound.load({

      whileplaying: function() {
        updatePlay();
      },

      onplay: function() {
        updatePlay();
      },

      onpause: function() {
        updatePlay();
      },

      onresume: function() {
        updatePlay();<commit_msg>define props<commit_after>var React = require('react');
var StandardUIPlayer = require('./StandardUIPlayer');

var PlayerContainer = React.createClass({
  
  propTypes: {
      authenticated: React.PropTypes.bool,
      fullWidth: React.PropTypes.string,
      sound: React.PropTypes.object.isRequired,
      songName: React.PropTypes.string.isRequired,
      author: React.PropTypes.string.isRequired
  },

  getDefaultProps: function() {
    return {
      authenticated: false
    };
  },

  handlePlayClick: function(e){
    this.props.sound.togglePause();
  },

  bindToEvents: function(){

    // update on current position
    var updatePlay = function(){this.update()}.bind(this);

    var onFinish = function(){this.finish()}.bind(this);

    // try to catch the events when load
    this.props.sound.load({

      whileplaying: function() {
        updatePlay();
      },

      onplay: function() {
        updatePlay();
      },

      onpause: function() {
        updatePlay();
      },

      onresume: function() {
        updatePlay();
{'fraction_non_alphanumeric': 0.13816534541336353, 'fraction_numerical': 0.0, 'mean_word_length': 2.751592356687898, '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': '3417931', 'n_tokens_mistral': 515, 'n_tokens_neox': 495, 'n_words': 104}