I have a problem with presenting a video: when I run my script, I can only see a grey window (where the video should be presented) and I hear the video’s audio. Here what I wrote
newVideo("first","video1.mp4")
.size('85vw','75vh')
.print("center at 50%","middle at 50%")
.play()
.wait(),
Did I write something wrong?
Is it a problem with the video format?
Thank you in advance
This code works well for me on PennController 1.8, 1.9 and 2.0.alpha. Do you have a defaultVideo.disable() anywhere before that by any chance? If not, the problem could come from the format of the video file. All browsers are supposed to support MP4 files, but note that having a .mp4 extension does not guarantee that the content of your file has indeed been encoded in MP4
For everybody else: there is a bug in one version of PennController 2.0.alpha where Video elements are printed as disabled by default, which adds an opaque gray layer on top of the player. Calling .enable() before calling .print() gets rid of that problem. This issue has been fixed for more recent releases