Skip to content

Commit

Permalink
Fix bad rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Mar 27, 2024
1 parent c643272 commit 1eb2bc7
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions doc/migrating_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ such as `player.autoplay = true` and `player.pause()`.

<table>
<th>v1.x</th><th>>= v2.x</th>

<tr valign="top">
<td>

``` tsx
```tsx
const App = () => {
return (
<View style={styles.container}>
Expand All @@ -40,7 +39,7 @@ const App = () => {
</td>
<td>

``` tsx
```tsx
const onPlayerReady = (player: THEOplayer) => {
player.autoplay = true;
player.source = source;
Expand All @@ -58,9 +57,7 @@ const App = () => {
```

</td>

</tr>

</table>

### Listening to Player Events
Expand All @@ -70,11 +67,10 @@ by a subscription approach.

<table>
<th>v1.x</th><th>>= v2.x</th>

<tr valign="top">
<td>

``` tsx
```tsx
const App = () => {
const [error, setError] = useState<PlayerError | undefined>();
const [textTracks, setTextTracks] = useState<TextTrack[]>([]);
Expand Down Expand Up @@ -104,7 +100,7 @@ const App = () => {
</td>
<td>

``` tsx
```tsx
const App = () => {
const theoPlayer = useRef<THEOplayer>();
const [error, setError] = useState<PlayerError | undefined>();
Expand Down Expand Up @@ -132,9 +128,7 @@ const App = () => {
```

</td>

</tr>

</table>

### AdsAPI and CastAPI
Expand All @@ -144,11 +138,10 @@ from the view's reference, it can now be requested directly from the player inst

<table>
<th>v1.x</th><th>>= v2.x</th>

<tr valign="top">
<td>

``` tsx
```tsx
<THEOplayerView
ref={(ref: THEOplayerView) => {
this.player = ref;
Expand All @@ -165,7 +158,7 @@ const isPlayingAd = () => {
</td>
<td>

``` tsx
```tsx
<THEOplayerView
config={playerConfig}
onPlayerReady={onPlayerReady}
Expand All @@ -181,7 +174,5 @@ const onPlayerReady = (player: THEOplayer) => {
```

</td>

</tr>

</table>

0 comments on commit 1eb2bc7

Please sign in to comment.