mirror of
https://github.com/The-Low-Code-Foundation/OpenNoodl.git
synced 2026-01-10 14:22:53 +01:00
fix: Video node attributes (#16)
Fixes https://github.com/noodlapp/noodl/issues/39
This commit is contained in:
committed by
Richard Osborne
parent
62d545d4f9
commit
c514c760e4
@@ -34,16 +34,14 @@ export interface CachedVideoProps {
|
||||
class CachedVideo extends React.PureComponent<CachedVideoProps> {
|
||||
video: HTMLVideoElement;
|
||||
|
||||
shouldComponentUpdate(nextProps: CachedVideoProps) {
|
||||
componentDidUpdate() {
|
||||
if (this.video) {
|
||||
this.video.muted = nextProps.muted;
|
||||
this.video.loop = nextProps.loop;
|
||||
this.video.volume = nextProps.volume;
|
||||
this.video.autoplay = nextProps.autoplay;
|
||||
this.video.controls = nextProps.controls;
|
||||
this.video.muted = this.props.muted;
|
||||
this.video.loop = this.props.loop;
|
||||
this.video.volume = this.props.volume;
|
||||
this.video.autoplay = this.props.autoplay;
|
||||
this.video.controls = this.props.controls;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user