<commit_before>//
//  Views.swift
//  ViscoveryADSDK
//
//  Created by boska on 22/06/2017.
//  Copyright © 2017 Viscovery All rights reserved.
//
import AVFoundation
import SWXMLHash

class LinearView: UIView {
  let videoView = VideoView()
  let learnMore = UIButton(type: .custom)
  let skip = UIButton(type: .custom)
  let progress = UIView()
  let progressBackground = UIView()
  let progressLayout = ConstraintGroup()
  var skipDidTapCallback: (() -> ())?
  var learnMoreDidTapCallback: (() -> ())?
  var didPauseCallback: (() -> ())?
  var didPlayCallback: (() -> ())?

  var duration = UILabel()
  
  convenience init() {
    self.init(frame: .zero)
    addSubview(videoView)
    constrain(videoView, self) {
      $0.edges == $1.edges
    }
    addSubview(skip)
    constrain(skip, self) {
      $0.right == $1.right
      $0.bottom == $1.bottom - 36
      $0.height == 25
    }
    skip.setTitleColor(.white, for: .normal)
    skip.titleLabel?.font = UIFont.systemFont(ofSize: 12)
    skip.setTitle("", for: .normal)
    skip.semanticContentAttribute = .forceRightToLeft
    skip.backgroundColor = #colorLiteral(red: 0.1019607843, green: 0.03921568627, blue: 0.03921568627, alpha: 0.4)
    skip.addTarget(self, action: #selector(LinearView.skipDidTap), for: .touchUpInside)
    skip.isHidden = true
    skip.centerTextAndImage(spacing: 8)
    
    backgroundColor = .black
    
    addSubview(learnMore)<commit_msg>mute function<commit_after>//
//  Views.swift
//  ViscoveryADSDK
//
//  Created by boska on 22/06/2017.
//  Copyright © 2017 Viscovery All rights reserved.
//
import AVFoundation
import SWXMLHash

class LinearView: UIView {
  let videoView = VideoView()
  let learnMore = UIButton(type: .custom)
  let skip = UIButton(type: .custom)
  let progress = UIView()
  let progressBackground = UIView()
  let progressLayout = ConstraintGroup()
  var skipDidTapCallback: (() -> ())?
  var learnMoreDidTapCallback: (() -> ())?
  var didPauseCallback: (() -> ())?
  var didPlayCallback: (() -> ())?
  
  var isMute = false {
    didSet {
      videoView.player?.isMuted = isMute
    }
  }
  
  var duration = UILabel()
  
  convenience init() {
    self.init(frame: .zero)
    addSubview(videoView)
    constrain(videoView, self) {
      $0.edges == $1.edges
    }
    addSubview(skip)
    constrain(skip, self) {
      $0.right == $1.right
      $0.bottom == $1.bottom - 36
      $0.height == 25
    }
    skip.setTitleColor(.white, for: .normal)
    skip.titleLabel?.font = UIFont.systemFont(ofSize: 12)
    skip.setTitle("", for: .normal)
    skip.semanticContentAttribute = .forceRightToLeft
    skip.backgroundColor = #colorLiteral(red: 0.1019607843, green: 0.03921568627, blue: 0.03921568627, alpha: 0.4)
    skip.addTarget(self, action: #selector(LinearView.skipDidTap), for: .touchUpInside)
    skip.isHidden = true
    skip.centerTextAndImage(spacing: 8)
    
    backgroundColor = .black
    
    addSubview(learnMore)
{'fraction_non_alphanumeric': 0.13834126444595513, 'fraction_numerical': 0.04282800815771584, 'mean_word_length': 3.150916784203103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '6626251', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1001, 'n_words': 214}