Skip to content

Commit 5989bdf

Browse files
Merge pull request #27 from THEOplayer/release/v0.7.0
Release/v0.7.0
2 parents cb78ad6 + a75a87f commit 5989bdf

31 files changed

+378
-135
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,18 @@ on:
55
branches: [ "develop", "master" ]
66
pull_request:
77
branches: [ "develop", "master" ]
8-
98
workflow_dispatch:
109

1110
jobs:
1211
lint:
1312
runs-on: ubuntu-latest
14-
1513
steps:
16-
- uses: actions/checkout@v3
17-
14+
- uses: actions/checkout@v4
1815
- name: Setup Node.js environment
19-
uses: actions/[email protected]
20-
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
2119
- name: Run npm
2220
run: npm ci
23-
2421
- name: Check lint
2522
run: npm run lint

.github/workflows/npm-publish.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,13 @@ on:
88
types: [created]
99

1010
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
16-
with:
17-
node-version: 16
18-
- run: npm ci
19-
2011
publish-npm:
21-
needs: build
2212
runs-on: ubuntu-latest
2313
steps:
24-
- uses: actions/checkout@v3
25-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
2616
with:
27-
node-version: 16
17+
node-version: 20
2818
registry-url: https://registry.npmjs.org/
2919
- run: npm ci
3020
- run: npm publish --access public

.github/workflows/pages.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Based on https://github.com/actions/starter-workflows/blob/b53d05e4b0dde7cdaeda60476acfcaaa1713f8cc/pages/jekyll-gh-pages.yml
2+
name: GitHub Pages
3+
4+
on:
5+
# Runs on pushes targeting the master branch
6+
push:
7+
branches:
8+
- master
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: 'pages'
22+
cancel-in-progress: false
23+
24+
jobs:
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
- name: Setup Node.js environment
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20
36+
- name: Run npm
37+
run: npm ci
38+
- name: Build API docs
39+
run: npm run docs -- --out ./_site/api
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
deploy:
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ ios/custom/Frameworks/**/*.zip
7070
ios/custom/Frameworks/integrations
7171
ios/build.sh
7272
ios/custom/Frameworks/tvos/*.xcframework
73+
74+
# TypeDoc
75+
api/

CHANGELOG.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
1+
---
2+
description: Find out what's new in the React Native UI.
3+
sidebar_custom_props: { 'icon': '📰' }
4+
---
5+
16
# Changelog
27

38
All notable changes to this project will be documented in this file.
49

510
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
611
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
712

8-
## [0.6.0] - 24-03-27
13+
## 0.7.0 (2024-04-11)
14+
15+
### Added
16+
17+
- Added support for THEOplayer 7.0 and React Native THEOplayer 7.0.
18+
19+
### Fixed
20+
21+
- Fixed TypeScript type definitions to export interfaces describing the props for all components.
22+
23+
## 0.6.0 (2024-03-27)
924

1025
### Fixed
1126

1227
- Fixed an issue where the skip buttons would remain disabled for MP4 sources.
1328

14-
## [0.5.0] - 24-03-06
29+
## 0.5.0 (2024-03-06)
1530

1631
### Added
1732

@@ -21,19 +36,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2136

2237
- Fixed connected state for chromecastButton to not take into account the casting state in general (e.g. airplay should not influence this state).
2338

24-
## [0.4.0] - 24-02-14
39+
## 0.4.0 (2024-02-14)
2540

2641
### Added
2742

2843
- Added support for overriding button icons.
2944

30-
## [0.3.0] - 23-12-01
45+
## 0.3.0 (2023-12-01)
3146

3247
### Fixed
3348

3449
- Fixed several transitioning issues related to PiP state changes and closing menus.
3550

36-
## [0.2.0] - 23-06-26
51+
## 0.2.0 (2023-06-26)
3752

3853
### Fixed
3954

@@ -43,12 +58,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
4358

4459
- Assume `PlayerConfiguration.chromeless` to be `true` if not specified.
4560

46-
## [0.1.1] - 23-06-06
61+
## 0.1.1 (2023-06-06)
4762

4863
### Fixed
4964

5065
- Fixed an issue on Web where using the `ChromecastButton` component would result in a crash.
5166

52-
## [0.1.0] - 23-06-05
67+
## 0.1.0 (2023-06-05)
5368

5469
- Initial release.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,5 @@ This section starts with adding the `@theoplayer/react-native-ui` as a dependenc
4545
after which a basic UI is built.
4646
Finally, some known limitations and issues are listed.
4747

48-
- [Installation](./doc/installation.md)
49-
- [Getting started with the UI](./doc/ui.md)
48+
- [Getting started with the UI](./doc/getting-started.md)
5049
- [Limitations and known issues](./doc/limitations.md)

doc/ui.md renamed to doc/getting-started.md

Lines changed: 62 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,65 @@
1-
## Getting started with the react-native-theoplayer UI
1+
---
2+
title: Getting started
3+
description: Start building your UI in just a few minutes!
4+
sidebar_position: 1
5+
sidebar_custom_props: { 'icon': '🚀' }
6+
---
27

3-
The `@theoplayer/react-native-ui` package provides UI components and a `DefaultTHEOplayerUi` that can be used with
4-
alongside the `THEOplayerView`.
8+
# Getting started with the React Native THEOplayer UI
59

6-
This section covers what is possible with the current UI and also documents the known limitations.
10+
The [`@theoplayer/react-native-ui`](https://www.npmjs.com/package/@theoplayer/react-native-ui) package provides
11+
a collection of UI components for [`react-native-theoplayer`](https://www.npmjs.com/package/react-native-theoplayer),
12+
the official THEOplayer React Native video player.
13+
The following platforms are supported:
14+
15+
- Android, Android TV & FireTV
16+
- iOS & tvOS (Apple TV)
17+
- Web
18+
19+
This guide covers how to set up the React Native UI, and how to add a UI to your `THEOplayerView` component.
720

821
![basic-ui](./example-app-player-ui.png)
922

10-
### Table of Contents
23+
## Prerequisites
24+
25+
If you have no previous experience in React Native, we encourage you to first explore the
26+
[React Native Documentation](https://reactnative.dev/docs/getting-started),
27+
as it gives you a good start on one of the most popular app development frameworks.
1128

12-
- [Using the DefaultTHEOplayerUi](#using-the-defaulttheoplayerui)
13-
- [Creating your own custom UI](#creating-your-own-custom-ui)
14-
- [Available components](#available-components)
29+
## Installation
1530

16-
### Prerequisites
31+
Using `npm`, `yarn`, or any other package manager, add `@theoplayer/react-native-ui` to your project's dependencies.
1732

18-
The UI components have a few non-transitive dependencies that are required to be installed manually:
33+
The UI components will depend on a `THEOplayerView` instance provided by `react-native-theoplayer`, so make
34+
sure this package is installed.
35+
36+
The UI components also have a few non-transitive dependencies that are required to be installed manually.
1937

2038
```bash
2139
npm install \
40+
@theoplayer/react-native-ui \
41+
react-native-theoplayer \
2242
react-native-svg \
2343
@react-native-community/slider
2444
```
2545

26-
### Using the DefaultTHEOplayerUi
46+
The package contains a number of transitive dependencies that contain native iOS and Android platform code
47+
as well. These are not auto-linked if your project does not already have them as a dependency,
48+
so they need to be explicitly defined in the
49+
[`react-native.config.js`](https://github.com/react-native-community/cli/blob/main/docs/configuration.md) file
50+
in project's root:
51+
52+
```typescript title="react-native.config.js"
53+
module.exports = {
54+
dependencies: {
55+
'react-native-google-cast': {},
56+
'react-native-svg': {},
57+
'@react-native-community/slider': {},
58+
},
59+
};
60+
```
61+
62+
## Using the THEOplayerDefaultUi
2763

2864
The `THEOplayerDefaultUi` can be used to provide basic playback controls to the viewer.
2965
As the default UI also includes Chromecast & Airplay support, make sure to configure these first as explained in the
@@ -61,14 +97,15 @@ const App = () => {
6197
};
6298
```
6399

64-
### Available components
100+
## Available components
65101

66-
The available UI components with their documentation can be found [here](../src/ui).
102+
The API documentation of all available components can be found [here](https://theoplayer.github.io/react-native-theoplayer-ui/api/).
103+
Their source code can be found [here](https://github.com/THEOplayer/react-native-theoplayer-ui/tree/develop/src/ui).
67104

68-
### Creating your own custom UI
105+
## Creating your own custom UI
69106

70-
All components inside the `DefaultTHEOplayerUi` are available through the `react-native-theoplayer` package and can
71-
be used to create your own custom layout. Since `DefaultTHEOplayerUi` is our version of a "custom" UI, you could
107+
All components inside the `THEOplayerDefaultUi` are available through the `react-native-theoplayer` package and can
108+
be used to create your own custom layout. Since `THEOplayerDefaultUi` is our version of a "custom" UI, you could
72109
use this as a starting point for your own custom layout.
73110

74111
This use-case is implemented in the [example app](https://github.com/THEOplayer/react-native-theoplayer/blob/develop/doc/example-app.md)
@@ -99,23 +136,24 @@ export default function App() {
99136
<UiContainer
100137
theme={DEFAULT_THEOPLAYER_THEME}
101138
player={player}
102-
behind={<CenteredDelayedActivityIndicator size={50}/>}
139+
behind={<CenteredDelayedActivityIndicator size={50} />}
103140
center={
104141
<CenteredControlBar
105142
left={<SkipButton skip={-10}/>}
106143
middle={<PlayButton/>}
107144
right={<SkipButton skip={30}/>}
108-
/>}
145+
/>
146+
}
109147
bottom={
110148
<>
111149
<ControlBar>
112-
<SeekBar/>
150+
<SeekBar />
113151
</ControlBar>
114152
<ControlBar>
115-
<MuteButton/>
116-
<TimeLabel showDuration={true}/>
117-
<Spacer/>
118-
<FullscreenButton/>
153+
<MuteButton />
154+
<TimeLabel showDuration={true} />
155+
<Spacer />
156+
<FullscreenButton />
119157
</ControlBar>
120158
</>
121159
}
@@ -127,7 +165,7 @@ export default function App() {
127165
adCenter={<CenteredControlBar middle={<PlayButton />} />}
128166
adBottom={
129167
<>
130-
<ControlBar style={{justifyContent: 'flex-start'}}>
168+
<ControlBar style={{ justifyContent: 'flex-start' }}>
131169
<AdDisplay />
132170
<AdCountdown />
133171
<Spacer />

doc/installation.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

doc/limitations.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
## Limitations and Known Issues
1+
---
2+
description: ''
3+
sidebar_position: 2
4+
sidebar_custom_props: { 'icon': '⚠️' }
5+
---
26

3-
- Support for remote control navigation on TV platforms.
7+
# Limitations and Known Issues
8+
9+
The React Native UI is still being actively developed. These are the current limitations and known issues:
10+
11+
- Support for remote control navigation on TV platforms
412
- Mobile Ad UI customization
513
- Interaction with Google IMA elements on web
614
- TextTrack styling

0 commit comments

Comments
 (0)