Changeset View
Changeset View
Standalone View
Standalone View
web/media/multimedia.react.js
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | mediaElement = ( | ||||
thumbHashDataURL={placeholderImage} | thumbHashDataURL={placeholderImage} | ||||
elementStyle={elementStyle} | elementStyle={elementStyle} | ||||
/> | /> | ||||
); | ); | ||||
} else if ( | } else if ( | ||||
mediaSource.type === 'encrypted_photo' || | mediaSource.type === 'encrypted_photo' || | ||||
mediaSource.type === 'encrypted_video' | mediaSource.type === 'encrypted_video' | ||||
) { | ) { | ||||
const { type, holder } = mediaSource; | const { type, holder, thumbnailHolder } = mediaSource; | ||||
invariant(encryptionKey, 'encryptionKey undefined for encrypted media'); | invariant(encryptionKey, 'encryptionKey undefined for encrypted media'); | ||||
mediaElement = ( | mediaElement = ( | ||||
<EncryptedMultimedia | <EncryptedMultimedia | ||||
type={type} | type={type} | ||||
holder={holder} | holder={holder} | ||||
encryptionKey={encryptionKey} | encryptionKey={encryptionKey} | ||||
thumbnailHolder={thumbnailHolder} | |||||
thumbnailEncryptionKey={thumbnailEncryptionKey} | |||||
elementStyle={elementStyle} | |||||
placeholderSrc={placeholderImage} | |||||
/> | /> | ||||
); | ); | ||||
} | } | ||||
// Media node is the container for the media element (button if photo) | // Media node is the container for the media element (button if photo) | ||||
let mediaNode; | let mediaNode; | ||||
if (mediaSource.type === 'photo' || mediaSource.type === 'encrypted_photo') { | if (mediaSource.type === 'photo' || mediaSource.type === 'encrypted_photo') { | ||||
mediaNode = ( | mediaNode = ( | ||||
Show All 28 Lines |