Skip to content

Commit

Permalink
improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
NullIsOne committed Apr 3, 2024
1 parent ad930e9 commit 26465e8
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 3 deletions.
51 changes: 48 additions & 3 deletions DOCUMENTATION.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# PlayerView customisation

![Player Overview](doc_support/player.png)

All components of `KinescopePlayerView` is partially customisable. You can change colors, fonts, sizes using method `KinescopePlayerView.setLayout(with config: KinescopePlayerViewConfiguration)`.

All properties of `KinescopePlayerViewConfiguration` have default values included in SDK, so customisation is optional.
All properties of `KinescopePlayerViewConfiguration` have default values included in SDK, so customisation is optional.

You can easily edit these values using builders.
For examle to change color of timeline in control panel you can use this code:
```swift
playerView.setLayout(with: .builder().setControlPanel(
.builder()
.setTimeline(
.builder()
.setActiveColor(color)
.build()
)
.build())
)
```
or you can use predefined configurable configuration `accentTimeLineAndPlayButton` to change color of timeline and play button in control panel.

Using these builders you can change any property of `KinescopePlayerViewConfiguration` and apply it to player view. To learn about properties more you should read next chapters of this doc.

## Managing of options menu

![Player Options Menu](doc_support/options_menu.png)

Options menu is a set of buttons with different actions like AirPlay, Picture in Picture, etc. You can manage this menu by adding or removing some options.

By default, options menu is collapsed, but you can show it by tapping on the options button with dots in the bottom right corner of the player view.
Expand Down Expand Up @@ -89,28 +110,52 @@ Set `nil` to hide overlay (usefull for videos collection with autoplaying).
Default implementation could be checked in Example project.

### controlPanel
Configuration of control panel with timeline and time labels.

![Player Control Panel](doc_support/control_panel.png)

Configuration of control panel with timeline, time labels and live indicator.

You can modify textColor, fontSize, colors and sizes of control panel and it's components.

Set `nil` to hide control panel.

Default implementation could be checked in Example project.

### announceView

![Player Announce View](doc_support/announce_view.png)

Configuration of announce view with information of planned time of start for live streams.

Youc can modify textColor, fontSize and icon for announce view.

Default implementation could be checked in Example project.

### errorOverlay

![Player Error Overlay](doc_support/error_overlay.png)

Configuration for error view with refresh button. Showing on broken livestreams or repeated failed attempts to play video.

You can modify textColor, fontSize and backgroundColor of error overlay and it's components.

Set `nil` to hide control panel

Default implementation could be checked in Example project.

### sideMenu

![Player Side Menu](doc_support/side_menu.png)

Configuration of side menu with setings.

You can modify main side menu and items on secondary menu level.

Default implementation could be checked in Example project.

### shadowOverlay

Configuration of shadow overlay beneath side menu.
Configuration of shadow overlay beneath side menu showing on fullscreen mode.

Default implementation could be checked in Example project.

Expand Down
Binary file added doc_support/announce_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_support/control_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_support/error_overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_support/options_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_support/player.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc_support/side_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 26465e8

Please sign in to comment.