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(poster): decorate poster call with player dimensions #15

Merged
merged 6 commits into from
Aug 8, 2017

Conversation

OrenMe
Copy link
Contributor

@OrenMe OrenMe commented Aug 7, 2017

No description provided.

@@ -28,9 +28,22 @@ export default class KalturaPlayer {
return this._provider.getConfig(entryId, uiConfId)
.then((data) => {
let playerConfig = {};
const dimensions = this._player.dimensions;
data.metadata.poster = getPosterRequestWithDimensions(data.metadata.poster, dimensions.width, dimensions.height);
Copy link
Contributor

Choose a reason for hiding this comment

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

I would export all this logic to util folder and just call
addKalturaPoster(data.metadata, this._player);
The same way we are doing with the kaltura params

* @param {number} height - the player height in px
* @returns {string}
*/
function getPosterRequestWithDimensions(url: string, width: number, height: number): string{
Copy link
Contributor

Choose a reason for hiding this comment

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

export to util ?

@OrenMe OrenMe merged commit 2a5b853 into master Aug 8, 2017
@OrenMe OrenMe deleted the posterSupport branch August 8, 2017 10:58
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.

2 participants