<commit_before>orangee.connectplayer = function(device) {
  this.device = device;
};

orangee.connectplayer.init = function() {
  /*
  var videoFilter = new ConnectSDK.CapabilityFilter([
     "MediaPlayer.Display.Video", 
     "MediaControl.Any", 
      "VolumeControl.UpDown" 
  ]);

  var imageFilter = new ConnectSDK.CapabilityFilter([
      "MediaPlayer.Display.Image"
  ]);

  ConnectSDK.discoveryManager.setCapabilityFilters([videoFilter, imageFilter]);
  */
  ConnectSDK.discoveryManager.startDiscovery();
};

orangee.connectplayer.showDevicePicker = function() {
  return ConnectSDK.discoveryManager.pickDevice();
};

orangee.connectplayer.prototype.disconnect = function(){
  return this.device.disconnect();
};

orangee.connectplayer.prototype.isReady = function() {
  return this.device.isReady();
};

orangee.connectplayer.prototype.play = function(device) {
  this.device.getMediaControl().play();
};

orangee.connectplayer.prototype.stop = function(device) {
  this.device.getMediaControl().stop();
};

orangee.connectplayer.prototype.pause = function(device) {
  this.device.getMediaControl().pause();
  //this.device.KeyControl().ok();
};

orangee.connectplayer.prototype.currentTime = function() {
  return this.device.getMediaControl.getPosition();
};

orangee.connectplayer.prototype.seek = function(second) {
  this.device.getMediaControl.seek(second * 1000);
};

orangee.connectplayer.prototype.load = function(url, lastPosition, divid, options) {
  var self = this;
  if (this.device && this.device.isReady()) {
    var ytid = url.indexOf('youtube.com') > -1 ? url.split('watch?v=')[1] : null;
    var command;
    if (ytid) {
      command = this.device.getLauncher().launchYouTube(ytid);
    } else {
      command = this.device.getMediaPlayer().playMedia(url, "video/mp4");
    }<commit_msg>bug fix<commit_after>orangee.connectplayer = function(device) {
  this.device = device;
};

orangee.connectplayer.init = function() {
  /*
  var videoFilter = new ConnectSDK.CapabilityFilter([
     "MediaPlayer.Display.Video", 
     "MediaControl.Any", 
      "VolumeControl.UpDown" 
  ]);

  var imageFilter = new ConnectSDK.CapabilityFilter([
      "MediaPlayer.Display.Image"
  ]);

  ConnectSDK.discoveryManager.setCapabilityFilters([videoFilter, imageFilter]);
  */
  ConnectSDK.discoveryManager.startDiscovery();
};

orangee.connectplayer.showDevicePicker = function() {
  return ConnectSDK.discoveryManager.pickDevice();
};

orangee.connectplayer.prototype.disconnect = function(){
  return this.device.disconnect();
};

orangee.connectplayer.prototype.isReady = function() {
  return this.device.isReady();
};

orangee.connectplayer.prototype.play = function(device) {
  this.device.getMediaControl().play();
};

orangee.connectplayer.prototype.stop = function(device) {
  this.device.getMediaControl().stop();
};

orangee.connectplayer.prototype.pause = function(device) {
  this.device.getMediaControl().pause();
  //this.device.KeyControl().ok();
};

orangee.connectplayer.prototype.currentTime = function() {
  return this.device.getMediaControl().getPosition();
};

orangee.connectplayer.prototype.seek = function(second) {
  this.device.getMediaControl.seek(second * 1000);
};

orangee.connectplayer.prototype.load = function(url, lastPosition, divid, options) {
  var self = this;
  if (this.device && this.device.isReady()) {
    var ytid = url.indexOf('youtube.com') > -1 ? url.split('watch?v=')[1] : null;
    var command;
    if (ytid) {
      command = this.device.getLauncher().launchYouTube(ytid);
    } else {
      command = this.device.getMediaPlayer().playMedia(url, "video/mp4");
    }
{'fraction_non_alphanumeric': 0.15104740904079383, 'fraction_numerical': 0.003858875413450937, 'mean_word_length': 4.617647058823529, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5408166', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1104, 'n_words': 157}