Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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()
})
}
}
cast(video) {
GoogleCast.getCastDevice().then(console.log)
GoogleCast.castMedia(video)
GoogleCast.launchExpandedControls()
this.sendMessage()
}