Open peteringram0 opened 7 years ago
Anyone know about this at all ? Thanks
Hey @peteringram0,
One way to approach this would be to use hooks. Here's a quick example:
var PlayHook = function (isPlaying) {
this.isPlaying = isPlaying
}
PlayHook.prototype.hook = function (videoNode) {
this.isPlaying ? videoNode.play() : videoNode.pause()
}
// ...
h('video', {
src: src,
playHook: new PlayHook(true),
})
// ...
Hey,
Im adding a video to the DOM in the following way:
I then want to start this video so i am doing a normal query selector then trying to run .play() on the element.
However the video does not play at all. Does anyone else have this issue with video?
Thanks,