Skip to content

Commit

Permalink
temp: Preload none
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtextrem committed Apr 5, 2020
1 parent 7c9ac56 commit 5f158f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/feed/PostMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ export default class PostMedia extends Component {
}

setPreload() {
if (this.videoRef.current !== undefined) this.videoRef.current.preload = 'metadata'
if (this.videoRef.current !== undefined) this.videoRef.current.preload = 'auto'
}

getMedia(media) {
if (media.is_video) {
// video
// video | @todo Once we use virtual list, use preload="metadata"
return (
<video
src={media.video_url}
poster={media.display_url}
type="video/mp4"
class="img-fluid"
preload="none"
intrinsicsize={media.dimensions !== undefined ? `${media.dimensions.width}x${media.dimensions.height}` : undefined}
controls
onVolumeChange={this.setVolume}
Expand Down

0 comments on commit 5f158f2

Please sign in to comment.