Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

How can I prevent users from skipping video by leaving the app and coming back?

$
0
0
Our Unity app shows videos to users and asks them questions about the video they just saw. We don’t want users to skip the video, so I turned off the controls like so: protected IEnumerator CoroutinePlayMovie(string __mediaUrlStr) { Handheld.StartActivityIndicator(); yield return new WaitForSeconds(0.1f); Handheld.PlayFullScreenMovie (__mediaUrlStr, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.AspectFit); yield return new WaitForSeconds(0.1f); //Allow time for Unity to pause execution while the movie plays. Handheld.StopActivityIndicator(); Debug.Log ("MOVIE COMPLETE!!!"); ViewToMediatorSig.Dispatch(PrefabIdStr, "switchview"); } The problem is if the user has to switch to another app, the video stops playing even though it's not over and Unity thinks it's done playing so the code moves them along to the questions as if they have viewed the entire video. What I would like is if the video player behaved like the video player in the Unity Ads where the user cannot skip the ad, and if the user leaves the app and comes back the video is still where they left off, forcing them to finish the video. Is this possible with anything in Unity? Is there anyway we can access the video player being used by Unity ads? Or de we have to write native plugins to do what we need? I tried the prime31 plugin hoping it would help, and it sort of does. If you leave the video while it's playing but don't go into another app, it works great. The video picks up where you left off. BUT if you did open another app, the video is locked at that frame where you left it and there is no way for the user to close the video because of the hidden controls. I contacted prime31 as well to see if there is a possible solution, and if there is I will post it here.

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>