{"action":"created","comment":{"url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/comments/186636204","pull_request_review_id":118250588,"id":186636204,"diff_hunk":"@@ -0,0 +1,212 @@\n+var youbora = require('youboralib')\n+import { Error } from 'playkit-js'\n+\n+youbora.adapters.Kaltura = youbora.Adapter.extend({\n+\n+  constructor: function (player, config) {\n+    this.config = config\n+    youbora.adapters.Kaltura.__super__.constructor.call(this, player)\n+  },\n+\n+  /**  @returns {String} - current plugin version */\n+  getVersion: function () {\n+    return \"6.2.0-kaltura\"\n+  },\n+\n+  /**  @returns {Number} - current playhead of the video */\n+  getPlayhead: function () {\n+    return this.player.currentTime\n+  },\n+\n+  /**  @returns {Number} - current playrate */\n+  getPlayrate: function () {\n+    return this.player.playbackRate\n+  },\n+\n+  /**  @returns {Number} - video duration */\n+  getDuration: function () {\n+    return this.player.duration || null\n+  },\n+\n+  /**  @returns {Number} - current bitrate */\n+  getBitrate: function () {\n+    var activeVideo = this.player.getActiveTracks().video\n+    if (activeVideo && activeVideo.bandwidth) {\n+      return activeVideo.bandwidth\n+    }\n+    return null\n+  },\n+\n+  /**  @returns {String} - rendition */\n+  getRendition: function () {\n+    var activeVideo = this.player.getActiveTracks().video\n+    if (activeVideo) {\n+      return youbora.Util.buildRenditionString(activeVideo.width, activeVideo.height, activeVideo.bandwidth)\n+    }\n+    return null\n+  },\n+\n+  /**  @returns {String} - title */\n+  getTitle: function () {\n+    return this.config.entryName\n+  },\n+\n+  /**  @returns {Boolean} - true if live and false if VOD */\n+  getIsLive: function () {\n+    return this.config.entryType === \"Live\"\n+  },\n+\n+  /**  @returns {String} - resource URL. */\n+  getResource: function () {\n+    return this.player.src\n+  },\n+\n+  /**  @returns {String} - player version */\n+  getPlayerVersion: function () {\n+    return this.config.playerVersion\n+  },\n+\n+  /**  @returns {String} - player's name */\n+  getPlayerName: function () {\n+    return this.config.playerName\n+  },\n+\n+  /** @returns {String} - Household identifier */\n+  getHouseholdId: function () {\n+    return this.config.householdId\n+  },\n+\n+  /**  @returns {void} - Register listeners to this.player. */\n+  registerListeners: function () {\n+    var Event = this.player.Event\n+    // References\n+    this.references = []\n+    this.references[Event.PLAY] = this.playListener.bind(this)\n+    this.references[Event.LOAD_START] = this.playListener.bind(this)\n+    this.references[Event.PAUSE] = this.pauseListener.bind(this)\n+    this.references[Event.PLAYING] = this.playingListener.bind(this)\n+    this.references[Event.ERROR] = this.errorListener.bind(this)\n+    this.references[Event.SEEKING] = this.seekingListener.bind(this)\n+    this.references[Event.SEEKED] = this.seekedListener.bind(this)\n+    this.references[Event.PLAYER_STATE_CHANGED] = this.stateChangeListener.bind(this)\n+    this.references[Event.ENDED] = this.endedListener.bind(this)\n+    this.references[Event.CHANGE_SOURCE_STARTED] = this.forceEndedListener.bind(this)\n+\n+    // Register listeners\n+    for (var key in this.references) {\n+      this.player.addEventListener(key, this.references[key])","path":"src/adapter/adapter.js","position":97,"original_position":97,"commit_id":"cf14c9a84da09b22cced55757b03a24ea92ab870","original_commit_id":"cf14c9a84da09b22cced55757b03a24ea92ab870","user":{"login":"odedhutzler","id":31587052,"avatar_url":"https://avatars2.githubusercontent.com/u/31587052?v=4","gravatar_id":"","url":"https://api.github.com/users/odedhutzler","html_url":"https://github.com/odedhutzler","followers_url":"https://api.github.com/users/odedhutzler/followers","following_url":"https://api.github.com/users/odedhutzler/following{/other_user}","gists_url":"https://api.github.com/users/odedhutzler/gists{/gist_id}","starred_url":"https://api.github.com/users/odedhutzler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odedhutzler/subscriptions","organizations_url":"https://api.github.com/users/odedhutzler/orgs","repos_url":"https://api.github.com/users/odedhutzler/repos","events_url":"https://api.github.com/users/odedhutzler/events{/privacy}","received_events_url":"https://api.github.com/users/odedhutzler/received_events","type":"User","site_admin":false},"body":"let key","created_at":"2018-05-08T07:16:09Z","updated_at":"2018-05-08T07:16:10Z","html_url":"https://github.com/kaltura/playkit-js-youbora/pull/19#discussion_r186636204","pull_request_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/comments/186636204"},"html":{"href":"https://github.com/kaltura/playkit-js-youbora/pull/19#discussion_r186636204"},"pull_request":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19","id":186316775,"html_url":"https://github.com/kaltura/playkit-js-youbora/pull/19","diff_url":"https://github.com/kaltura/playkit-js-youbora/pull/19.diff","patch_url":"https://github.com/kaltura/playkit-js-youbora/pull/19.patch","issue_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/19","number":19,"state":"open","locked":false,"title":"Youbora v6 plugin update","user":{"login":"jesuslc91","id":16061058,"avatar_url":"https://avatars2.githubusercontent.com/u/16061058?v=4","gravatar_id":"","url":"https://api.github.com/users/jesuslc91","html_url":"https://github.com/jesuslc91","followers_url":"https://api.github.com/users/jesuslc91/followers","following_url":"https://api.github.com/users/jesuslc91/following{/other_user}","gists_url":"https://api.github.com/users/jesuslc91/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuslc91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuslc91/subscriptions","organizations_url":"https://api.github.com/users/jesuslc91/orgs","repos_url":"https://api.github.com/users/jesuslc91/repos","events_url":"https://api.github.com/users/jesuslc91/events{/privacy}","received_events_url":"https://api.github.com/users/jesuslc91/received_events","type":"User","site_admin":false},"body":"### Description of the Changes\r\n\r\nRemoved old v5 plugin, included v6.\r\nMinified lib removed, added as a dependency.\r\nadapter.js for content, nativeads.js for ads","created_at":"2018-05-07T10:46:43Z","updated_at":"2018-05-08T07:16:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0876caa505713902e3a8002278a774bac94f726d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19/commits","review_comments_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19/comments","review_comment_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/19/comments","statuses_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/statuses/cf14c9a84da09b22cced55757b03a24ea92ab870","head":{"label":"jesuslc91:master","ref":"master","sha":"cf14c9a84da09b22cced55757b03a24ea92ab870","user":{"login":"jesuslc91","id":16061058,"avatar_url":"https://avatars2.githubusercontent.com/u/16061058?v=4","gravatar_id":"","url":"https://api.github.com/users/jesuslc91","html_url":"https://github.com/jesuslc91","followers_url":"https://api.github.com/users/jesuslc91/followers","following_url":"https://api.github.com/users/jesuslc91/following{/other_user}","gists_url":"https://api.github.com/users/jesuslc91/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuslc91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuslc91/subscriptions","organizations_url":"https://api.github.com/users/jesuslc91/orgs","repos_url":"https://api.github.com/users/jesuslc91/repos","events_url":"https://api.github.com/users/jesuslc91/events{/privacy}","received_events_url":"https://api.github.com/users/jesuslc91/received_events","type":"User","site_admin":false},"repo":{"id":132433780,"name":"playkit-js-youbora","full_name":"jesuslc91/playkit-js-youbora","owner":{"login":"jesuslc91","id":16061058,"avatar_url":"https://avatars2.githubusercontent.com/u/16061058?v=4","gravatar_id":"","url":"https://api.github.com/users/jesuslc91","html_url":"https://github.com/jesuslc91","followers_url":"https://api.github.com/users/jesuslc91/followers","following_url":"https://api.github.com/users/jesuslc91/following{/other_user}","gists_url":"https://api.github.com/users/jesuslc91/gists{/gist_id}","starred_url":"https://api.github.com/users/jesuslc91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jesuslc91/subscriptions","organizations_url":"https://api.github.com/users/jesuslc91/orgs","repos_url":"https://api.github.com/users/jesuslc91/repos","events_url":"https://api.github.com/users/jesuslc91/events{/privacy}","received_events_url":"https://api.github.com/users/jesuslc91/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jesuslc91/playkit-js-youbora","description":" Youbora analytics SDK plugin for the PlayKit JS Player","fork":true,"url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora","forks_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/forks","keys_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/teams","hooks_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/hooks","issue_events_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/issues/events{/number}","events_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/events","assignees_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/assignees{/user}","branches_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/branches{/branch}","tags_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/tags","blobs_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/git/refs{/sha}","trees_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/statuses/{sha}","languages_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/languages","stargazers_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/stargazers","contributors_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/contributors","subscribers_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/subscribers","subscription_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/subscription","commits_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/commits{/sha}","git_commits_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/git/commits{/sha}","comments_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/comments{/number}","issue_comment_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/issues/comments{/number}","contents_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/contents/{+path}","compare_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/merges","archive_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/downloads","issues_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/issues{/number}","pulls_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/pulls{/number}","milestones_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/milestones{/number}","notifications_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/labels{/name}","releases_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/releases{/id}","deployments_url":"https://api.github.com/repos/jesuslc91/playkit-js-youbora/deployments","created_at":"2018-05-07T08:54:57Z","updated_at":"2018-05-07T14:26:20Z","pushed_at":"2018-05-07T14:26:19Z","git_url":"git://github.com/jesuslc91/playkit-js-youbora.git","ssh_url":"git@github.com:jesuslc91/playkit-js-youbora.git","clone_url":"https://github.com/jesuslc91/playkit-js-youbora.git","svn_url":"https://github.com/jesuslc91/playkit-js-youbora","homepage":"","size":1537,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kaltura:master","ref":"master","sha":"c40fdf2dfd1cae54076ba0271125a40ff39472e8","user":{"login":"kaltura","id":319096,"avatar_url":"https://avatars0.githubusercontent.com/u/319096?v=4","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"repo":{"id":90532418,"name":"playkit-js-youbora","full_name":"kaltura/playkit-js-youbora","owner":{"login":"kaltura","id":319096,"avatar_url":"https://avatars0.githubusercontent.com/u/319096?v=4","gravatar_id":"","url":"https://api.github.com/users/kaltura","html_url":"https://github.com/kaltura","followers_url":"https://api.github.com/users/kaltura/followers","following_url":"https://api.github.com/users/kaltura/following{/other_user}","gists_url":"https://api.github.com/users/kaltura/gists{/gist_id}","starred_url":"https://api.github.com/users/kaltura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaltura/subscriptions","organizations_url":"https://api.github.com/users/kaltura/orgs","repos_url":"https://api.github.com/users/kaltura/repos","events_url":"https://api.github.com/users/kaltura/events{/privacy}","received_events_url":"https://api.github.com/users/kaltura/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kaltura/playkit-js-youbora","description":" Youbora analytics SDK plugin for the PlayKit JS Player","fork":false,"url":"https://api.github.com/repos/kaltura/playkit-js-youbora","forks_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/forks","keys_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/teams","hooks_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/hooks","issue_events_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/events{/number}","events_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/events","assignees_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/assignees{/user}","branches_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/branches{/branch}","tags_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/tags","blobs_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/git/refs{/sha}","trees_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/statuses/{sha}","languages_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/languages","stargazers_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/stargazers","contributors_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/contributors","subscribers_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/subscribers","subscription_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/subscription","commits_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/commits{/sha}","git_commits_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/git/commits{/sha}","comments_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/comments{/number}","issue_comment_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/comments{/number}","contents_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/contents/{+path}","compare_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/merges","archive_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/downloads","issues_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues{/number}","pulls_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls{/number}","milestones_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/milestones{/number}","notifications_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/labels{/name}","releases_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/releases{/id}","deployments_url":"https://api.github.com/repos/kaltura/playkit-js-youbora/deployments","created_at":"2017-05-07T12:53:47Z","updated_at":"2017-10-18T16:42:51Z","pushed_at":"2018-05-07T14:26:20Z","git_url":"git://github.com/kaltura/playkit-js-youbora.git","ssh_url":"git@github.com:kaltura/playkit-js-youbora.git","clone_url":"https://github.com/kaltura/playkit-js-youbora.git","svn_url":"https://github.com/kaltura/playkit-js-youbora","homepage":"","size":1332,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":2,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19"},"html":{"href":"https://github.com/kaltura/playkit-js-youbora/pull/19"},"issue":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/19"},"comments":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/kaltura/playkit-js-youbora/statuses/cf14c9a84da09b22cced55757b03a24ea92ab870"}},"author_association":"NONE"}}
{"actor":{"display_login":"odedhutzler"}}