64cbd4ae8d
* Dont show countdown on Lists * Add Repeat icon * Add Shuffle icon * Add Replay Icon * Add Replay Option to autoplayCountdown * Add Loop Control for Lists * Add Shuffle control for Lists * Improve View List Link and Fetch action * Add Play Button to List page * Add Shuffle Play Option on List Page and Menus * Fix Modal Remove Collection I18n * CSS: Fix Large list titles * Fix List playback on Floating Player * Add Theater Mode to its own class and fix bar text display * Add Play Next VJS component * Add Play Next Button * Add Play Previous VJS Component * Add Play Previous Button * Add Autoplay Next Button * Add separate control for autoplay next in list * Bump redux * Update CHANGELOG.md
48 lines
1.7 KiB
JavaScript
48 lines
1.7 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import {
|
|
makeSelectFileInfoForUri,
|
|
makeSelectTitleForUri,
|
|
makeSelectStreamingUrlForUri,
|
|
makeSelectClaimIsNsfw,
|
|
SETTINGS,
|
|
} from 'lbry-redux';
|
|
import {
|
|
makeSelectIsPlayerFloating,
|
|
selectPrimaryUri,
|
|
selectPlayingUri,
|
|
makeSelectFileRenderModeForUri,
|
|
} from 'redux/selectors/content';
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
import { doSetPlayingUri } from 'redux/actions/content';
|
|
import { doFetchRecommendedContent } from 'redux/actions/search';
|
|
import { withRouter } from 'react-router';
|
|
import FileRenderFloating from './view';
|
|
|
|
const select = (state, props) => {
|
|
const playingUri = selectPlayingUri(state);
|
|
const primaryUri = selectPrimaryUri(state);
|
|
const uri = playingUri && playingUri.uri;
|
|
const collectionId = playingUri && playingUri.collectionId;
|
|
|
|
return {
|
|
uri,
|
|
primaryUri,
|
|
playingUri,
|
|
title: makeSelectTitleForUri(uri)(state),
|
|
fileInfo: makeSelectFileInfoForUri(uri)(state),
|
|
mature: makeSelectClaimIsNsfw(props.uri)(state),
|
|
isFloating: makeSelectIsPlayerFloating(props.location)(state),
|
|
streamingUrl: makeSelectStreamingUrlForUri(uri)(state),
|
|
floatingPlayerEnabled: makeSelectClientSetting(SETTINGS.FLOATING_PLAYER)(state),
|
|
renderMode: makeSelectFileRenderModeForUri(uri)(state),
|
|
videoTheaterMode: makeSelectClientSetting(SETTINGS.VIDEO_THEATER_MODE)(state),
|
|
collectionId,
|
|
};
|
|
};
|
|
|
|
const perform = (dispatch) => ({
|
|
closeFloatingPlayer: () => dispatch(doSetPlayingUri({ uri: null })),
|
|
doFetchRecommendedContent: (uri, mature) => dispatch(doFetchRecommendedContent(uri, mature)),
|
|
});
|
|
|
|
export default withRouter(connect(select, perform)(FileRenderFloating));
|