@ -14,7 +14,11 @@ export default class VideoModal extends ImmutablePureComponent {
static propTypes = {
static propTypes = {
media : ImmutablePropTypes . map . isRequired ,
media : ImmutablePropTypes . map . isRequired ,
status : ImmutablePropTypes . map ,
status : ImmutablePropTypes . map ,
time : PropTypes . number ,
options : PropTypes . shape ( {
startTime : PropTypes . number ,
autoPlay : PropTypes . bool ,
defaultVolume : PropTypes . number ,
} ) ,
onClose : PropTypes . func . isRequired ,
onClose : PropTypes . func . isRequired ,
} ;
} ;
@ -52,7 +56,8 @@ export default class VideoModal extends ImmutablePureComponent {
}
}
render ( ) {
render ( ) {
const { media , status , time , onClose } = this . props ;
const { media , status , onClose } = this . props ;
const options = this . props . options || { } ;
return (
return (
< div className = 'modal-root__modal video-modal' >
< div className = 'modal-root__modal video-modal' >
@ -61,7 +66,9 @@ export default class VideoModal extends ImmutablePureComponent {
preview = { media . get ( 'preview_url' ) }
preview = { media . get ( 'preview_url' ) }
blurhash = { media . get ( 'blurhash' ) }
blurhash = { media . get ( 'blurhash' ) }
src = { media . get ( 'url' ) }
src = { media . get ( 'url' ) }
startTime = { time }
startTime = { options . startTime }
autoPlay = { options . autoPlay }
defaultVolume = { options . defaultVolume }
onCloseVideo = { onClose }
onCloseVideo = { onClose }
detailed
detailed
alt = { media . get ( 'description' ) }
alt = { media . get ( 'description' ) }