I am trying a very simple project:
Scanning a target image will automatically start a video.
That works somehow, but inconsistently. I think I am doing something wrong in general.
I added a simple Object as a plane below the target image in the hierarchy where its material shall be the video. Then I tried multiple ways to add the video:
- I dragged & dropped the video from the media library as suggested in Reasons why I cannot add MP4 to VideoTexture?
- I added a new Video by right clicking and adding new --> Video and selected the video file in the source from its properties
and then no matter which way I choose I set it as material from the Plane’s properties.
In the properties of the Plane I used the Layer Mode “test_3d”, which seemed to work best, for blend I choose “default” and for Cull Faces I choose “none”. I transformed the plane a little to overlay the target image and to be in 16:9 format so I used for Scale “1.6 | 1.1 | 1”.
I had 3 MP4 Videos as test files:
- one 26MB
- one 5MB (https://raw.githubusercontent.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4)
- and a 374kB file (http://techslides.com/demos/sample-videos/small.mp4)
My first file is private, so I cannot link it, it was black all the time, but the audio played well.
For the other files the video was at times black, but when they played, they did only once and after that they looped, but the video didn’t play any more, but froze with a picture from the video.
I added a pointerdown - event to the plane which should restart the video and this worked too but only the audio was replayed.
What am I doing wrong here? Any help would be appreciated. Thanks in advance.