diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index 291ee74..5a432c9 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -34,9 +34,18 @@ export default class HomeScreen extends React.Component { onNavigationChange(navigation) { const url = new Url(navigation.url); + console.debug('navigationChange', url); + + let { isVideoPlaying } = this.state; + // Modal windows in the player also trigger hash changes + // Ignore any hashes that do not look start with '#!/' + if (url.hash && url.hash.startsWith('#!/')) { + isVideoPlaying = url.hash === '#!/videoosd.html'; + } + this.setState({ url, - isVideoPlaying: url.hash && url.hash === '#!/videoosd.html' + isVideoPlaying }); }