mirror of
https://github.com/fluxscape/fluxscape.git
synced 2026-01-11 14:52:54 +01:00
fix: Video node attributes (#16)
Fixes https://github.com/noodlapp/noodl/issues/39
This commit is contained in:
@@ -34,16 +34,14 @@ export interface CachedVideoProps {
|
|||||||
class CachedVideo extends React.PureComponent<CachedVideoProps> {
|
class CachedVideo extends React.PureComponent<CachedVideoProps> {
|
||||||
video: HTMLVideoElement;
|
video: HTMLVideoElement;
|
||||||
|
|
||||||
shouldComponentUpdate(nextProps: CachedVideoProps) {
|
componentDidUpdate() {
|
||||||
if (this.video) {
|
if (this.video) {
|
||||||
this.video.muted = nextProps.muted;
|
this.video.muted = this.props.muted;
|
||||||
this.video.loop = nextProps.loop;
|
this.video.loop = this.props.loop;
|
||||||
this.video.volume = nextProps.volume;
|
this.video.volume = this.props.volume;
|
||||||
this.video.autoplay = nextProps.autoplay;
|
this.video.autoplay = this.props.autoplay;
|
||||||
this.video.controls = nextProps.controls;
|
this.video.controls = this.props.controls;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user