Fix modals on player triggering screen orientation change

This commit is contained in:
Bill Thornton 2019-08-23 13:36:45 -04:00
parent 4139a0bd08
commit 3c75e9588f

View File

@ -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
});
}