playing animation movie in iPhone application - iphone

I am currently working on a game, which has a long story at its initial.
It just telling the user that what happened before the war that is the causes of war.
So, I wish to show all these things like a movie.
I used the MPMoviePlayerController for this, now I am facing the problem while hiding the controls. I don't want to show the controls to the user. It must be full screen video having no other controls on the screen. Also user have option to skip this by tapping the screen.
please suggest me if there is any way to do this.
Thanks in advance.

Set your MPMoviePlayerController's movieControlMode property to MPMovieControlModeHidden to disable the onscreen controls. I'm not sure how to make the movie skippable, though.

theMovie.movieControlMode = MPMovieControlModeHidden;
will diable all controls

Related

What is the best way to make fullscreen for flutter video_player?

Im trying to implement video_player in my Flutter project and need your tips)
So, requirements are: player have to work inline and fullscreen and it must have custom controls.
I've tried to use video_player itself. And there were no problems till I`ve started implementation of fullscreen mode. I did it with help of another special screen for "fullscreen" mode. And had to path current video progress and status (play/pause) there.
Is there any better way to do this without creating new screen and new instance of player for fullscreen?
Chewie? Yes, I've tried it as well. Much better experience of fullscreen. But I've also bumped into some issues. First of all it rotate video into landscape mode in fullscreen. This answer https://github.com/brianegan/chewie/issues/137 helps, but there is still some visible rotation to landscape and then back. not the best experience, i think.
And controls... If you put custom controls outside of Chewie - there are not rendering in fullscreen. If you put them in 'overlay" property - they become static and I don't see the way to update there values (change Icon and set Progress value). Any example of usage "customControls" property?
Has anyone same isuues? Any examples demos or tips?
Thanks for your help!
UPDATE
Chewie
"customControls" are not shown if you set "showControls" to false
A bit confusing as for me
But their update during runtime is still a mystery
UPDATE 2
To make Chewie customControls work with progressbar and play/pause properly you chould path in your controls widget controller and listen for its changes from there

IPhone disable/hide scrubbar mpmovieplayercontroller in fullscreen mode

I'm creating an iphone app with video clips (among other things) where I need to play one or more ads before the actual video clip. Naturally my client doesn't want users to be able to fast forward during the ads but at the same time they must be able to exit the view so I cant set controlStyle to MPMovieControlStyleNone.
I would prefer not to hack the default view and remove the scrubbar so it seems my only option is to implement a custom bar with a single "Done"/"Back" button.
I've googled my eyes out trying to find example code for this, but no dice. I've seen similar questions posted here as well but no answers are given that could help me out. I'm a novice IOS developer and could really use som help with this (custom control bar with single "Done" button for fullscreen MPMoviePlayerController that shows/hideson tap OR disable scrubbar in an acceptable fashion – in fullscreen mode).
Anyone done this before or know where to find some example code? Thanks!

How to make simple control of MPMoviePlayerController

I'm making app using MPMoviePlayerController. This capture is pic of a my reference app. I want to make like red boxed part. - only Done button and progress bar. How can I make like this?
Can I solve thereby I add some options in MPMoviePlayerController or I add overlay view include some controls?
I can't find the good way. Please help!~ and Thanks!
You have to create your own controls, then add them to the overlay view...

Recreating the iTunes (iOS app) tableViewCell which previews songs

I'm creating an app which would provide the user with a list of audio files and let them sample a small piece of audio when they select the song (just like the iTunes iOS app).
I love the way the iTunes iOS App has implemented it (image attached); wherein I can click on a cell and the album cover flips over to show a progress indicator and a stop button. I can select a cell and the sample starts to play, and the moment I stop it, the progress indicator flips back over to show the album/song art.
I'd like to create something like that for my app. Any suggestions on how I can go ahead with it.
Thanks a ton in advance! :D
EDIT: Based on Till's suggestion, I'm adding this edit. What I wish to get by asking this question is suggestions for the best approach to make the flip animation, showing a custom view in a UITableViewCell image space, possible. Currently, I'm not worried about playing the audio or displaying the progress of the playback. I simply need suggestions on the best approach to perform the flip animation and substitute the image with a custom UIView. :) Thanks again! :D
You will need to create it. I suggest making it as a custom tablecell. If you polish it well enought, you can put it on CodeCanyon and make it worth your while.
Also, I can recommend looking at the works on http://cocoacontrols.com/ - It might not have exactly this one, but it has many interesting controls and inspirations.
This is exactly what u looking for:
https://github.com/marshluca/AudioPlayer
You can also refer to some Sources :
https://github.com/lipka/LLACircularProgressView

Open video in iPhone without controls

I am trying to play video without showing controls (volume and other buttons) but it also should be possible to make them visible by taping on the video.
The code is:
theMovie.scalingMode = MPMovieScalingModeAspectFill;
theMovie.movieControlMode = MPMovieControlModeDefault;
In this case it shows the controls by default and by taping on the video they get hidden.
If I change the mode to MPMovieControlModeHidden then I can not see the controls but also I can not bring them back.
Is there a way to start video without controls but not disabling them completely?
Good news Dmitriy!
I've found a solution that will do the job for you, I hope.
It is as follows:
Initialize your
MPMoviePlayerController object's
movieControlMode property with
MPMovieControlModeHidden value
Play the movie
After the movie playback has started set your MPMoviePlayerController object's movieControlMode property back to MPMovieControlModeDefault
Third step can be accomplished by observing MPMoviePlayerContentPreloadDidFinishNotification notification. Though this might cause unresponsive black screen (or of another color you've set as your MPMoviePlayerController object's backgroundColor) in case you will play a streaming video, which be actually preloaded by MPMoviePlayerController. I don't have any movie of compatible format on a remote server at my disposal right now so I can't test this scenario is real and therefore mess around to see if there's something that can be done to avoid this side effect (though I think I will do that if you publish or find such movie for testing somewhere in the Internet).
Tip: look at the bold piece of text if you don't want to know my long story about how boring I am actually starting to look into a problem by reading the documentation and looking into the sample code it offers.
You question has interested me so I started from looking at MPMoviePlayerController Class Reference on iPhone Dev Center. I didn't actually find anything related to the problem you've stumbled upon so I've decided to play around with this sample project MPMoviePlayerController reference - MoviePlayer. I juts wanted to reproduce your situation and maybe try dealing with it by simulating a single touch event or triggering the same method that responds to this event manually.
But it turned out that Apple's sample project in fact behaves absolutely like you want your's to. It starts video playback and the overlay controls are automagically animated out of the screen from the very beginning. I've looked through the code, it's rather simple and doesn't really 'deal' in any way with this problem you have. So maybe it's something you do (or do in somewhat not right order) that causes the problem. Check it out and get back to us with a cure because judging by usefulness metric there are people who have similar problems.