Prevent floating player on geoblock
This commit is contained in:
parent
c362efe630
commit
192e1d4923
2 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,10 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { selectClaimForUri, selectTitleForUri, makeSelectClaimWasPurchased } from 'redux/selectors/claims';
|
import {
|
||||||
|
selectClaimForUri,
|
||||||
|
selectTitleForUri,
|
||||||
|
makeSelectClaimWasPurchased,
|
||||||
|
selectGeoRestrictionForUri,
|
||||||
|
} from 'redux/selectors/claims';
|
||||||
import { makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
|
import { makeSelectStreamingUrlForUri } from 'redux/selectors/file_info';
|
||||||
import {
|
import {
|
||||||
makeSelectNextUrlForCollectionAndUrl,
|
makeSelectNextUrlForCollectionAndUrl,
|
||||||
|
@ -55,6 +60,7 @@ const select = (state, props) => {
|
||||||
mobilePlayerDimensions: selectMobilePlayerDimensions(state),
|
mobilePlayerDimensions: selectMobilePlayerDimensions(state),
|
||||||
socketConnected: selectCommentSocketConnected(state),
|
socketConnected: selectCommentSocketConnected(state),
|
||||||
isLivestreamClaim: isStreamPlaceholderClaim(claim),
|
isLivestreamClaim: isStreamPlaceholderClaim(claim),
|
||||||
|
geoRestriction: selectGeoRestrictionForUri(state, uri),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,7 @@ type Props = {
|
||||||
mobilePlayerDimensions?: any,
|
mobilePlayerDimensions?: any,
|
||||||
socketConnected: boolean,
|
socketConnected: boolean,
|
||||||
isLivestreamClaim: boolean,
|
isLivestreamClaim: boolean,
|
||||||
|
geoRestriction: ?GeoRestriction,
|
||||||
doSetMobilePlayerDimensions: ({ height?: ?number, width?: ?number }) => void,
|
doSetMobilePlayerDimensions: ({ height?: ?number, width?: ?number }) => void,
|
||||||
doCommentSocketConnect: (string, string, string) => void,
|
doCommentSocketConnect: (string, string, string) => void,
|
||||||
doCommentSocketDisconnect: (string, string) => void,
|
doCommentSocketDisconnect: (string, string) => void,
|
||||||
|
@ -88,6 +89,7 @@ export default function FileRenderFloating(props: Props) {
|
||||||
doSetPlayingUri,
|
doSetPlayingUri,
|
||||||
isCurrentClaimLive,
|
isCurrentClaimLive,
|
||||||
mobilePlayerDimensions,
|
mobilePlayerDimensions,
|
||||||
|
geoRestriction,
|
||||||
doSetMobilePlayerDimensions,
|
doSetMobilePlayerDimensions,
|
||||||
doCommentSocketConnect,
|
doCommentSocketConnect,
|
||||||
doCommentSocketDisconnect,
|
doCommentSocketDisconnect,
|
||||||
|
@ -271,6 +273,7 @@ export default function FileRenderFloating(props: Props) {
|
||||||
}, [doSetMobilePlayerDimensions, doSetPlayingUri, isFloating, isMobile]);
|
}, [doSetMobilePlayerDimensions, doSetPlayingUri, isFloating, isMobile]);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
geoRestriction ||
|
||||||
!isPlayable ||
|
!isPlayable ||
|
||||||
!uri ||
|
!uri ||
|
||||||
(isFloating && noFloatingPlayer) ||
|
(isFloating && noFloatingPlayer) ||
|
||||||
|
|
Loading…
Reference in a new issue