diff --git a/ui/component/fileRender/index.js b/ui/component/fileRender/index.js index a9973b57c..3d54587b6 100644 --- a/ui/component/fileRender/index.js +++ b/ui/component/fileRender/index.js @@ -14,18 +14,21 @@ import { makeSelectIsText } from 'redux/selectors/content'; import { doSetPlayingUri } from 'redux/actions/content'; import FileRender from './view'; -const select = (state, props) => ({ - currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state), - claim: makeSelectClaimForUri(props.uri)(state), - mediaType: makeSelectMediaTypeForUri(props.uri)(state), - thumbnail: makeSelectThumbnailForUri(props.uri)(state), - contentType: makeSelectContentTypeForUri(props.uri)(state), - downloadPath: makeSelectDownloadPathForUri(props.uri)(state), - fileName: makeSelectFileNameForUri(props.uri)(state), - streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state), - autoplay: makeSelectClientSetting(SETTINGS.AUTOPLAY)(state), - isText: makeSelectIsText(props.uri)(state), -}); +const select = (state, props) => { + const autoplay = props.embedded ? false : makeSelectClientSetting(SETTINGS.AUTOPLAY)(state); + return { + currentTheme: makeSelectClientSetting(SETTINGS.THEME)(state), + claim: makeSelectClaimForUri(props.uri)(state), + mediaType: makeSelectMediaTypeForUri(props.uri)(state), + thumbnail: makeSelectThumbnailForUri(props.uri)(state), + contentType: makeSelectContentTypeForUri(props.uri)(state), + downloadPath: makeSelectDownloadPathForUri(props.uri)(state), + fileName: makeSelectFileNameForUri(props.uri)(state), + streamingUrl: makeSelectStreamingUrlForUri(props.uri)(state), + autoplay: autoplay, + isText: makeSelectIsText(props.uri)(state), + }; +}; const perform = dispatch => ({ setPlayingUri: uri => dispatch(doSetPlayingUri(uri)), diff --git a/ui/component/fileRender/view.jsx b/ui/component/fileRender/view.jsx index e47bfa6e7..a3aab8fea 100644 --- a/ui/component/fileRender/view.jsx +++ b/ui/component/fileRender/view.jsx @@ -40,6 +40,7 @@ type Props = { autoplay: boolean, setPlayingUri: (string | null) => void, currentlyFloating: boolean, + thumbnail: string, }; type State = {