-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
### Description of the Changes 1. Organizing the player's palette (and add some new colors) 2. Moved all configurable colors from a static (sass) variable to dynamic (css) variable 3. Added logic to calculate the secondary colors from the primary color (so that a user can only choose the primary color in the studio and the secondary ones will be derived from the primary one) 4. move the date-url of dynamic SVG icons (Those whose color changes in active mode to the color of the main color) to a variable so they can be changed at runtime (our current icons infrastructures uses sass functions to generate the data-url which are not useful at runtime but only at compile time) 5. add theme manager service that get the user configured style and apply the style related pr: kaltura/playkit-js-ui-managers#18 solves: FEC-12700 ### CheckLists - [x] changes have been done against master branch, and PR does not conflict - [ ] new unit / functional tests have been added (whenever applicable) - [ ] test are passing in local environment - [ ] Travis tests are passing (or test results are not worse than on master branch :)) - [ ] Docs have been updated Co-authored-by: JonathanTGold <jonathan.gold@86@gmail.com>
- Loading branch information
1 parent
bb24f99
commit 321f4ae
Showing
35 changed files
with
446 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
# Customize the player colors | ||
|
||
in order to override the player default colors you can pass your own color (in HEX color format!) in the `ui` section in player config | ||
|
||
> This guide assumes you are using the [Kaltura Player] | ||
[kaltura player]: https://github.com/kaltura/kaltura-player-js/ | ||
|
||
### Example | ||
```js | ||
const config = { | ||
targetId: 'player-placeholder', | ||
provider: { | ||
partnerId: 1234567, | ||
}, | ||
ui: { | ||
userTheme: { | ||
colors: { | ||
primary: '#da3633', | ||
secondary: '#c4da33' | ||
} | ||
} | ||
} | ||
} | ||
|
||
const player = KalturaPlayer.setup(config); | ||
``` | ||
> Note: only HEX color format is excepted | ||
[See here for full configuration options](https://github.com/kaltura/playkit-js-ui/tree/master/flow-typed/types/user-theme.js) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// @flow | ||
declare type ColorType = { | ||
primary: string, | ||
secondary: string, | ||
success: string, | ||
danger: string, | ||
warning: string, | ||
live: string, | ||
playerBackground: string | ||
}; | ||
|
||
|
||
declare type UserTheme = { | ||
colors: ColorType | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
@import '~styles/variables'; | ||
@import '~styles/buttons'; | ||
|
||
.player { | ||
.learn-more { | ||
font-weight: lighter; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
@import '~styles/variables'; | ||
.player.overlay-active .interactive-area { | ||
filter: blur($blur); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@import '~styles/variables'; | ||
|
||
@keyframes kaltura-spinner { | ||
0% { | ||
transform: rotate(0deg) scale(0.7); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.