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 Halloween_Udo · Dec 15, 2015 at 09:59 PM · iosvideo streaminghandheld

'Done' button missing | Video Playback iOS 9.2

Hey there,

since upgrading to iOS 9.2 the videos being played with:

  • Handheld.PlayFullScreenMovie(url, Color.black, FullScreenMovieControlMode.Full);

do not show a 'done' button anymore to stop the video. Am I missing something, or does somebody know a solution to this problem?

Thank you in advance.

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Halloween_Udo · Jan 07, 2016 at 10:15 AM

@aboccala

I'm sorry to inform you that the above code does not work anymore.

But there is a workaround for this:

Change to onPlayerReady() method as mentioned above. This will present the player with the missing done button. Unfortunately you can't access the callback of it.

To stop the video, I did put the cancelOnTouch layer they use over the done button. To do this use:

 UIView* videoView = cancelOnTouchView = [[CancelOnTouchView alloc] initWithOnTouchBlock:^(){
             if(_AVKitVideoPlayback)
                 [_AVKitVideoPlayback finish];
         }];
         cancelOnTouchView.frame = CGRectMake(10, 22, 50, 21);
         //cancelOnTouchView.backgroundColor = [UIColor brownColor];
         //cancelOnTouchView.alpha = 0.5f;
         
         [videoViewController.view addSubview:videoView];


It should be positioned correctly for the landscape orientation on all iOS devices. If you are playing in Portrait uncomment the lines and see for yourself.

If you run into any problems post here as I might have forgotten something. I hope not.

EDIT: You have to put that code snipped into actuallyStartTheMovie(NSURL*)url Put in under the allocation of videoViewController.

Happy new year.

EDIT-EDIT: the posts got rearranged, so you will find the code of the onPLayerReady() Method below this post.

Comment
Add comment · Share
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
0

Answer by Halloween_Udo · Dec 16, 2015 at 09:37 AM

Unclean fix

Put in FullScreenVideoPlayer.mm under Classes > Unity in your xCode Project:

 @interface VideoViewController : AVPlayerViewController{}
 @end
 @implementation VideoViewController
 - (void) viewWillDisappear:(BOOL)animated {
     [_AVKitVideoPlayback finish];
     [super viewWillDisappear:animated];
 }
 @end

under the static reference of AVKitVideoPlayback. Now you have to change _AVPlayerViewControllerClass to VideoViewController in actuallyStartTheMovie().

Also change your onPlayerReady Function to

 - (void)onPlayerReady
 {
     if (!videoViewController.player)
     {
         videoViewController.player = videoPlayer.player;
         [GetAppController().rootViewController presentViewController:videoViewController animated:NO completion:nil];
         [videoPlayer playVideoPlayer];
     }
 }



This does not seem right, but it works. So use it or make it clean and post here. I would appreciate it. Thank you.

Comment
Add comment · Show 1 · Share
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 aboccala · Jan 07, 2016 at 09:52 AM 0
Share

I'm experiencing same issue; seriously, this looks like a major bug in Unity, it should be filed as a bug and fixed properly on their end.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

[iOS] Handheld.PlayFullScreenMovie pauses when headset is removed 1 Answer

Handheld.PlayFullScreenMovie not working on iOS9 0 Answers

Create app ios live stream to Youtube 2 Answers

Memory leak on video players? 1 Answer

how to play video force to Landscape mode in Andorid ? 0 Answers


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