Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refactor youbora implementation #6

Merged
merged 33 commits into from
Aug 22, 2017
Merged

feat: refactor youbora implementation #6

merged 33 commits into from
Aug 22, 2017

Conversation

yairans
Copy link
Contributor

@yairans yairans commented Jul 20, 2017

No description provided.

@yairans yairans requested a review from dan-ziv July 20, 2017 12:29
@yairans yairans requested a review from OrenMe July 23, 2017 09:10
src/youbora.js Outdated
super(name, player, config);
this._youbora = new YouboraPlugin(this.player, this.config);
this.config.extraParams = this._getCustomParams();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This transformation is redundant, the customer should configure us with extraParams

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was only relevant for V2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


/** Version of the plugin. ie: 5.1.0-name */
this.pluginVersion = '5.3.0-' + pkg.version + '-kalturaplaykit-js';
this.pluginVersion = '5.3.0-' + pkg.version + '-' + PLAYER_NAME;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take the version from the plugin itself: http://developer.nicepeopleatwork.com/apidocs/js/$YB.html
And remove the comment above with "5.1.0-name"

Copy link
Contributor

@OrenMe OrenMe Aug 12, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yairans 5.3.0 is still the version string of Youbora plugin(and the actual plugin is 5.3.10 by the way), need to get it from the Youbora plugin YB.version.
This way we don't have to update it manually each time we upgrade.

Also, update the test for it that uses the hard coded string as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

$YB.plugins.KalturaV3.prototype.getBitrate = function () {
let activeVideo = this.player.getActiveTracks().video;
if (activeVideo && activeVideo.bandwidth) {
return activeVideo.bandwidth / 1024;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to verify what units are expected by Youbora, e.g. Kbps or bps

});
};

$YB.plugins.KalturaV3.prototype.setMetadata = function () {
this.setOptions({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to check if this should be merged with possible user supplied data

src/youbora.js Outdated

/**
* The default configuration of the plugin.
* @type {Object}
* @static
*/
static defaultConfig: Object = {
accountCode: 'powerdev'
haltOnError: false,
transactionCode: 'Free'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this field required by default?

Copy link
Contributor Author

@yairans yairans Aug 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. actually i don't remember where i take it from :)
deleted.

@OrenMe OrenMe changed the base branch from develop to master August 9, 2017 13:59
@OrenMe
Copy link
Contributor

OrenMe commented Aug 12, 2017

@yairans upgrade to latest 5.4.6 version of the plugin as part of this PR.

$YB.plugins.KalturaV3 = function (player, options) {
try {
/** Name and platform of the plugin.*/
this.pluginName = PLAYER_NAME;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yairans what is this used for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is part of the payload. player property
image


src/youbora.js Outdated
*/
constructor(name: string, player: Player, config: Object) {
super(name, player, config);
this.config.extraParams = this._getCustomParams();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yairans I think we don't need this transform, we should pass the config object for Youbora as a passthrough

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

…into youbora-analytics

# Conflicts:
#	.eslintignore
#	.gitignore
#	.travis.yml
#	README.md
#	karma.conf.js
#	package.json
#	src/youbora.js
#	test/src/youbora.spec.js
#	webpack.config.js
#	yarn.lock
OrenMe
OrenMe previously approved these changes Aug 22, 2017
@dan-ziv dan-ziv changed the title Youbora analytics feat: refactor youbora implementation Aug 22, 2017
@dan-ziv dan-ziv merged commit aa864c2 into master Aug 22, 2017
@dan-ziv dan-ziv deleted the youbora-analytics branch August 22, 2017 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants