new MediaAttachment video style :playable for mp4 to make videojs work with multiple files, hiding albums, hiding bookmark collections. may need tweaks on mediaattachment for mov and other formats : todo :
This commit is contained in:
mgabdev
2020-12-22 12:11:22 -05:00
parent 6fbea0a59e
commit 34f6a1ab5b
28 changed files with 259 additions and 138 deletions

View File

@@ -31,10 +31,16 @@ class Video extends ImmutablePureComponent {
}
componentDidMount() {
videoJsOptions.sources = [{
src: this.props.src,
type: this.props.fileContentType,
}]
videoJsOptions.sources = [
{
src: this.props.src,
type: this.props.fileContentType,
},
{
src: this.props.sourceMp4,
type: 'video/mp4',
},
]
this.videoPlayer = videojs(this.video, videoJsOptions)
}
@@ -182,6 +188,7 @@ const messages = defineMessages({
Video.propTypes = {
preview: PropTypes.string,
src: PropTypes.string.isRequired,
sourceMp4: PropTypes.string,
alt: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,