Many Videos. Make Videos Stop not Pause

0 votes
asked Aug 19, 2018 by funtsdm (140 points)
I want make app for our magazine with your SDK. In it many videos.

We use Unity 2017.3.1f1 . Platforms - Android/IOS

And I do not want that all videos was on Pause in buffer. How make OnTargetLost  get videoPlayer.Stop(); not videoPlayer.Pause();

I was try to change it in HelloARVideo Sample. I changed videoPlayer.Stop(); to videoPlayer.Pause(); , but nothing happened. (I change it in ImageTarget_DynamicLoad_AutoPlay and ImageTarget_DynamicLoad_ManualPlay )

How cane i do it. If i left like it is after same amount of videos it will crash or start to glich (as i cane say. we was using Vuforia and we have some problems with it. And I fix it by changing pause video on stop)


1 Answer

0 votes
answered Aug 19, 2018 by molla01 (240 points)

I had the same problem to

first put both imgage trackerbehaviour and video base behaviour on same image tracker

on image tracker on file found function put: this.getcomponent<videoplayerbasebehavior>().play();

on target lost set:



Hope it works

commented Aug 21, 2018 by funtsdm (140 points)
Maybe I did something wrong but it not my way. I add as a child Plane with Unity's Video Player and it by default start video from start. But if someone want make it add component Audio Source to the Plane, and then drug that Plane to Audio Source in Video Player component. If not you will not get sound.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.