How to use the react-native-google-cast.launchExpandedControls function in react-native-google-cast

To help you get started, we’ve selected a few react-native-google-cast examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pct-org / native-app / app / screens / Player / PlayerScreen.working.js View on Github external
console.log('data.url', data.url)
      const mediaUrl = this.serverUrl + data.url.replace(RNFS.CachesDirectoryPath, '')
      console.log('\n\n\nmediaUrl', mediaUrl)

      GoogleCast.castMedia({
        title   : item.title,
        subtitle: item.summary,
        // studio: video.studio,
        // duration: video.duration,
        mediaUrl,

        imageUrl : item.images.fanart.high,
        posterUrl: item.images.poster.high,
      })

      GoogleCast.launchExpandedControls()


    } else {
      this.setState({
        url: data.url,
      }, () => {
        this.video.presentFullscreenPlayer()

      })
    }
  }
github react-native-google-cast / react-native-google-cast / example / src / main.js View on Github external
cast(video) {
    GoogleCast.getCastDevice().then(console.log)
    GoogleCast.castMedia(video)
    GoogleCast.launchExpandedControls()
    this.sendMessage()
  }