1

I am using Youtube Data API v3 and only partial data is accessible

I am attaching a picture , it can access items.snippet.title but says undefined on items.snippet.thumnails.high.url. But on console.log(item) , it shows all the data is available

https://ibb.co/LvL7Dtg

   renderItem={({ item }) => (
        <TouchableOpacity style={styles.container}>


          {/* working */}
          {!!item.snippet && (
            <Text style={styles.item}>{item.snippet.title}</Text>
          )}


          {/* Not Working */}
          {!!item.snippet.thumnails && (
            <Text style={styles.item}>{item.snippet.title}</Text>
          )}
         </TouchableOpacity>
      )

i want to get thumbnails of youtube playlist but unable to access the thumbnail part

U P D A T E D Q U E S T I O N : EDIT

https://ibb.co/ZNqCDvS

In attached picture everthing is working fine , but not as my requirement . In Line no 53 if i change this.state.videos[0].snippet... to item.snippet. It throws and error 'undefined' Kindlye help

1 Answers1

0

Change your thumnail to thumbnails.

Adrian Warkocz
  • 657
  • 4
  • 11