Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Adquizition · Oct 15, 2015 at 06:13 PM · iosvideomobile devicesunitypro

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

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.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Adquizition · Oct 15, 2015 at 09:09 PM 0
Share

I also want to say this can be repeated on Android using the back button while the video is playing.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Videoclip codec for mobile devices 0 Answers

Unity Video ads closing when player leaves app. 0 Answers

Unity Camera roll on iOS - access information about photos and videos 0 Answers

Playing a fullscreen movie in iOS without Pro version 1 Answer

Best Paying Interstitial Video Ads with Unity Bindings 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges