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,18 +14,21 @@ 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) => {
currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state), const autoplay = props.embedded ? false : makeSelectClientSetting(SETTINGS.AUTOPLAY)(state);
claim: makeSelectClaimForUri(props.uri)(state), return {
mediaType: makeSelectMediaTypeForUri(props.uri)(state), currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state),
thumbnail: makeSelectThumbnailForUri(props.uri)(state), claim: makeSelectClaimForUri(props.uri)(state),
contentType: makeSelectContentTypeForUri(props.uri)(state), mediaType: makeSelectMediaTypeForUri(props.uri)(state),
downloadPath: makeSelectDownloadPathForUri(props.uri)(state), thumbnail: makeSelectThumbnailForUri(props.uri)(state),
fileName: makeSelectFileNameForUri(props.uri)(state), contentType: makeSelectContentTypeForUri(props.uri)(state),
streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state), downloadPath: makeSelectDownloadPathForUri(props.uri)(state),
autoplay: makeSelectClientSetting(SETTINGS.AUTOPLAY)(state), fileName: makeSelectFileNameForUri(props.uri)(state),
isText: makeSelectIsText(props.uri)(state), streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state),
}); autoplay: autoplay,
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 = {