embeds will not autoplay

This commit is contained in:
jessop 2020-01-31 10:46:50 -05:00
parent 0f3239284f
commit 7767a529e6
2 changed files with 16 additions and 12 deletions

View file

@ -14,7 +14,9 @@ import { makeSelectIsText } from 'redux/selectors/content';
import { doSetPlayingUri } from 'redux/actions/content'; import { doSetPlayingUri } from 'redux/actions/content';
import FileRender from './view'; import FileRender from './view';
const select = (state, props) => ({ const select = (state, props) => {
const autoplay = props.embedded ? false : makeSelectClientSetting(SETTINGS.AUTOPLAY)(state);
return {
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state), currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
claim: makeSelectClaimForUri(props.uri)(state), claim: makeSelectClaimForUri(props.uri)(state),
mediaType: makeSelectMediaTypeForUri(props.uri)(state), mediaType: makeSelectMediaTypeForUri(props.uri)(state),
@ -23,9 +25,10 @@ const select = (state, props) => ({
downloadPath: makeSelectDownloadPathForUri(props.uri)(state), downloadPath: makeSelectDownloadPathForUri(props.uri)(state),
fileName: makeSelectFileNameForUri(props.uri)(state), fileName: makeSelectFileNameForUri(props.uri)(state),
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state), streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
autoplay: makeSelectClientSetting(SETTINGS.AUTOPLAY)(state), autoplay: autoplay,
isText: makeSelectIsText(props.uri)(state), isText: makeSelectIsText(props.uri)(state),
}); };
};
const perform = dispatch => ({ const perform = dispatch => ({
setPlayingUri: uri => dispatch(doSetPlayingUri(uri)), setPlayingUri: uri => dispatch(doSetPlayingUri(uri)),

View file

@ -40,6 +40,7 @@ type Props = {
autoplay: boolean, autoplay: boolean,
setPlayingUri: (string | null) => void, setPlayingUri: (string | null) => void,
currentlyFloating: boolean, currentlyFloating: boolean,
thumbnail: string,
}; };
type State = { type State = {