Skip to content

Commit

Permalink
fix: duplicate buffer icons
Browse files Browse the repository at this point in the history
* Resolves issue where duplicate buffer icons were displaying
  in the sample app
* Comment added around default buffer UI included in Android
  player, with notes about how to udpate styling
  • Loading branch information
alexmdodge committed Jan 25, 2022
1 parent d5c5ff3 commit 5e87fa0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions example/android/app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item>
<item name="android:indeterminateTint">@android:color/white</item>
</style>

</resources>
9 changes: 7 additions & 2 deletions example/src/screens/AdvancedExample.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect, useCallback } from 'react';
import { Dimensions, StyleSheet, View } from 'react-native';
import { Dimensions, StyleSheet, View, Platform } from 'react-native';
import IVSPlayer, { IVSPlayerRef, PlayerState } from 'amazon-ivs-react-native';
import { IconButton, ActivityIndicator, Text } from 'react-native-paper';
import Slider from '@react-native-community/slider';
Expand Down Expand Up @@ -55,7 +55,12 @@ export default function AdvancedExample() {
return (
<View style={styles.container}>
<View style={styles.playerContainer}>
{buffering ? (
{/*
Note: A buffering indicator is included by default on Android. It's
styling is managed in /example/android/app/src/main/res/values/styles.xml
by adjusting the 'android:indeterminateTint'.
*/}
{buffering && Platform.OS === 'ios' ? (
<ActivityIndicator
animating={true}
size="large"
Expand Down
8 changes: 7 additions & 1 deletion example/src/screens/PlaygroundExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
Portal,
Title,
} from 'react-native-paper';
import { Platform } from 'react-native';
import Slider from '@react-native-community/slider';
import type { StackNavigationProp } from '@react-navigation/stack';
import { useNavigation } from '@react-navigation/native';
Expand Down Expand Up @@ -102,7 +103,12 @@ export default function PlaygroundExample() {
return (
<View style={styles.container}>
<View style={styles.playerContainer}>
{buffering ? (
{/*
Note: A buffering indicator is included by default on Android. It's
styling is managed in /example/android/app/src/main/res/values/styles.xml
by adjusting the 'android:indeterminateTint'.
*/}
{buffering && Platform.OS === 'ios' ? (
<ActivityIndicator
animating={true}
size="large"
Expand Down

0 comments on commit 5e87fa0

Please sign in to comment.