- Home /
how to get the videoplayer to start playing the video when the vuforia target is detected?
When i run the project the videoplayer starts playing straight away (i can hear the audio), and continues even when the target has left the cameras pov. I want the video to start playing once the target has been seen by the ARcamera . . . and then stop when the camera can no longer see it. Is there an easy way to do this? like in the inspector? I suspect some c# is gunna be necessary. I have been trawling th internets and haven't been able to get it going yet:( I am still new to c# (&unity), so please be gentle with me! Any help very gratefully received:)
Answer by sspengler · Feb 04, 2019 at 05:16 PM
Have you found an answer? I am having the same issue. Thanks.
Answer by KISP · Feb 04, 2019 at 06:42 PM
In the Inspector, there is a check box labelled 'Play On Awake.' Unchecking this should stop the video from playing straight away. To make the video play/stop upon seeing the target, you will have to use code. Put VideoPlayer.Play() in whatever function runs when you see the target. Likewise, VideoPlayer.Stop() will stop the video.
Your answer
Follow this Question
Related Questions
the video player starts with a white background 0 Answers
how can i save a video from project folder (ASSETS) to android internal or external storage? 1 Answer
Vuforia: How to play video on another screen till the end after target is detected? 0 Answers
Android video capture with Vuforia 2 Answers
Hello, problems with Alpha Vuforia 0 Answers