I am creating an original video player in swift.The following are used PHPickerviewcontroller,AVPlayer
I was able to select a video from my camera roll and draw the video in the view I specified, but I am unable to control it.Control methods are assumed to be playback and stop by buttons and seek bar.
I am having trouble getting the seek bar and the video I called to work together. Can you please tell me what is the best way to do this? Thank you in advance.
Related
I am making video player in swift. I need add some custom buttons and functionality for standard video player:
1. Playing video from url (server)
2. Showing indicator while loading video like in VK
3. Add custom buttons to control (stop,pause buttons)
I try to use AVKit/AVPlayerViewController, but i cant understand how i can implement my tasks there. Can you give some advise, which is the better way to do this?
I have a video on the first view that use 'MPMoviePlayerController'. I declare the video in 'viewDidLoad' method. I need the video play continuously when go to another view and come back. Is it possible? How?
yes it Possibe play video in background mode try this link
Hope it Help You
I am developing an app that plays internet radio. Owing to my lack of skill, i have only used the stock MPMoviePlayerController.
This is so far been able to play a few m3u streams (like the 'feeling floyd' station)
However, i was wondering if there was any way to have this MPMoviePlayerViewController to show me extra information.. like the song that is playing (which information i was able to extract form teh metadata.)
I can get this information all right, but how do i put it on the screen?
Can I make an overlay or something? (the centre of the MPMovieplayer is taken up by the quicktime background... it would be great if i could use an overlay on this space to show current music information or whatever.)
Is this overlay thing possible? if not, is there any other way?
Thank you very much!
V
If you want your own custom view over the player you can add it as a subview to the player's view as [player.view addSubview:yourView];
Get the moviePlayer property of MPMoviePlayerViewController. I think you should be able to to do this [moviePlayer.view addSubview:myView].
I am trying to capture video using the AV foundation api's. I want to provide functionality to pause the video and restart it. I am trying figure out how to implement the pause feature will work. I was thinking about adding a button which will call the [session stopRunning] method. I would implement AVCaptureVideoDataOutput and capture CMSampleBufferRef each time the video is stopped. I then would like to combine all these into one file and then output it to the camera roll. Does this seem like the right approach?
OR
SHould i implement a pause button and capture video continuously and just throw away the frames when the user has the pause button clicked? If that was the case, then how would i do that?
Thanks in advance!
Instead i am looking into using AVAssetWriter instead of writing seperate vidoes and trying to merge them. Attempting the solution provided here # How do i pause video recording with iPhone SDK?
If I use MPMoviePlayerController to play video in my iPhone app, it opens, loads the movie, plays it and then closes. Is it possible to force it to stay open after the movie finishes, so that user can replay it using its controls, instead of using controls in parent view? Also, is it possible to start MPMoviePlayerController in the paused mode?
thanks for any advice.
None of that is possible using the available API in the Pre-3.2 OS. One thing you could do is take a scerenshot of the last frame and stick that behind the movie so when it's done playing, it looks like it's still there, then just stick a button on it to replay. you could make an interface that looks/behaves similar to the standard movie player interface just for the play button if you need to.
For anyone stumbling over this now... There is a way to do this. Check out this question :)