Fix Floating Player stopping on certain files
This commit is contained in:
parent
bbcdcfe4c1
commit
903a7c8afd
2 changed files with 5 additions and 10 deletions
|
@ -4,7 +4,6 @@ import {
|
|||
makeSelectFileInfoForUri,
|
||||
makeSelectThumbnailForUri,
|
||||
makeSelectClaimForUri,
|
||||
makeSelectStreamingUrlForUri,
|
||||
makeSelectClaimWasPurchased,
|
||||
SETTINGS,
|
||||
COLLECTIONS_CONSTS,
|
||||
|
@ -16,7 +15,6 @@ import { withRouter } from 'react-router';
|
|||
import {
|
||||
makeSelectIsPlaying,
|
||||
makeSelectShouldObscurePreview,
|
||||
selectPlayingUri,
|
||||
makeSelectInsufficientCreditsForUri,
|
||||
makeSelectFileRenderModeForUri,
|
||||
} from 'redux/selectors/content';
|
||||
|
@ -33,9 +31,7 @@ const select = (state, props) => {
|
|||
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
||||
obscurePreview: makeSelectShouldObscurePreview(props.uri)(state),
|
||||
isPlaying: makeSelectIsPlaying(props.uri)(state),
|
||||
playingUri: selectPlayingUri(state),
|
||||
insufficientCredits: makeSelectInsufficientCreditsForUri(props.uri)(state),
|
||||
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
|
||||
autoplay: makeSelectClientSetting(SETTINGS.AUTOPLAY_MEDIA)(state),
|
||||
costInfo: makeSelectCostInfoForUri(props.uri)(state),
|
||||
renderMode: makeSelectFileRenderModeForUri(props.uri)(state),
|
||||
|
@ -47,9 +43,9 @@ const select = (state, props) => {
|
|||
};
|
||||
|
||||
const perform = (dispatch) => ({
|
||||
play: (uri, collectionId) => {
|
||||
play: (uri, collectionId, isPlayable) => {
|
||||
dispatch(doSetPrimaryUri(uri));
|
||||
dispatch(doSetPlayingUri({ uri, collectionId }));
|
||||
if (isPlayable) dispatch(doSetPlayingUri({ uri, collectionId }));
|
||||
dispatch(doPlayUri(uri, undefined, undefined, (fileInfo) => dispatch(doAnaltyicsPurchaseEvent(fileInfo))));
|
||||
},
|
||||
});
|
||||
|
|
|
@ -16,8 +16,7 @@ import Nag from 'component/common/nag';
|
|||
import FileRenderPlaceholder from 'static/img/fileRenderPlaceholder.png';
|
||||
|
||||
type Props = {
|
||||
play: (string, string) => void,
|
||||
isLoading: boolean,
|
||||
play: (string, string, boolean) => void,
|
||||
isPlaying: boolean,
|
||||
fileInfo: FileListItem,
|
||||
uri: string,
|
||||
|
@ -104,9 +103,9 @@ export default function FileRenderInitiator(props: Props) {
|
|||
e.stopPropagation();
|
||||
}
|
||||
|
||||
play(uri, collectionId);
|
||||
play(uri, collectionId, isPlayable);
|
||||
},
|
||||
[play, uri, collectionId]
|
||||
[play, uri, isPlayable, collectionId]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
|
|
Loading…
Reference in a new issue