<commit_before>import { Component, PropTypes } from "react";

import Video from "../../components/players/video";
import collections from "../../util/collections";
import backgrounds from "../../util/backgrounds";

export default class SeriesHero extends Component {

  state = {
    playing: false
  }

  static propTypes = {
    series: PropTypes.object.isRequired
  }

  backgroundClasses = () => {
    return [
      "one-whole",
      "overlay--gradient",
      "ratio--square",
      "ratio--landscape@palm-wide",
      "background--fill",
      collections.classes(this.props.series)
    ].join(" ");
  }

  play = () => {
    if (this.player) {
      this.player.show({play: true});
      this.setState({playing: true});
    } else {
      setTimeout(this.play, 250);
    }


  }

  stop = () => {
    if (this.player) {
      this.player.hide();
    }
    this.setState({playing: false});
  }

  ready = (player) => {
    this.player = player;
  }

  button = () => {
    if (!this.props.series.content.ooyalaId) return null;
    const { isLight } = this.props.series.content;
    if (this.state.playing) {
      return (
        <button className={`${!isLight ? "btn--light" : "btn--dark-secondary"} display-inline-block one-whole@palm`} onClick={this.stop}>
          <i className="icon-close soft-half-right" />
          Close The Trailer
        </button>
      );
    }

    return (
      <button className={`${!isLight ? "btn--light" : "btn--dark-secondary"} display-inline-block one-whole@palm`} onClick={this.play}>
        <i className="icon-play soft-half-right" />
        Watch The Trailer
      </button>
    );
  }<commit_msg>added junction class to prevent trailer button from being hidden on ipad while the trailer was playing<commit_after>import { Component, PropTypes } from "react";

import Video from "../../components/players/video";
import collections from "../../util/collections";
import backgrounds from "../../util/backgrounds";

export default class SeriesHero extends Component {

  state = {
    playing: false
  }

  static propTypes = {
    series: PropTypes.object.isRequired
  }

  backgroundClasses = () => {
    return [
      "one-whole",
      "overlay--gradient",
      "ratio--square",
      "ratio--landscape@palm-wide",
      "background--fill",
      collections.classes(this.props.series)
    ].join(" ");
  }

  play = () => {
    if (this.player) {
      this.player.show({play: true});
      this.setState({playing: true});
    } else {
      setTimeout(this.play, 250);
    }


  }

  stop = () => {
    if (this.player) {
      this.player.hide();
    }
    this.setState({playing: false});
  }

  ready = (player) => {
    this.player = player;
  }

  button = () => {
    if (!this.props.series.content.ooyalaId) return null;
    const { isLight } = this.props.series.content;
    if (this.state.playing) {
      return (
        <button className={`${!isLight ? "btn--light" : "btn--dark-secondary"} push-double-top@palm-wide-and-up display-inline-block one-whole@palm`} onClick={this.stop}>
          <i className="icon-close soft-half-right" />
          Close The Trailer
        </button>
      );
    }

    return (
      <button className={`${!isLight ? "btn--light" : "btn--dark-secondary"} display-inline-block one-whole@palm`} onClick={this.play}>
        <i className="icon-play soft-half-right" />
        Watch The Trailer
      </button>
    );
  }
{'fraction_non_alphanumeric': 0.16705607476635514, 'fraction_numerical': 0.0017523364485981308, 'mean_word_length': 2.4561049445005048, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, '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': '5198204', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1056, 'n_words': 215}