I have a json file which includes data and between this data I have a video field.
how can I embed a video object in a view controller, what shall I put in the interface builder??
I cannot find video object in the objects existed on the right side.
see below:
Shall I add some libraries? I need to help me how can I play a video object on my application.
I need your help please.
Just load the files into UIWebView, it can handle both videos and PDFs.
OR
https://developer.apple.com/library/ios/#qa/qa2010/qa1240.html
There is really good class for it VideoPlayerKit. Using VideoPlayerKit is easy to use. All controls, progress bar, and airplay are already set up.
This is example's screen
Related
I'm new at iOS development;
I add two MPMoviePlayerController on my scrollView for play audio file.
All is well but problem is any one media player such like
I am sure that my URL of file is proper. Then is issue here.
I don't know that Apple's iOS provide feature that we can add only one media player??
Please give me any suggestion.
It is very important for my application to add two MPMoviePlayerController so user can display TWO Media player.
I think you can add multiple MPMoviePlayerController objects, though only one can play a file at one time.
This is from Apple Documentation:
Note: Although you can create multiple MPMoviePlayerController objects
and present their views in your interface, only one movie player at a
time can play its movie.
Here is the link.
I know that you can play multiple videos in a single view by using the Apple AVFoundation framework (rather than MPMoviePlayerController). I imagine this is true of audio files as well.
Here is a similar SO question with tips about implementing AVFoundation.
I was having a similar issue with multiple MPMoviePlayerControllers in a UIScrollView, my solution being to add the media programatically to scrollViewDidEndDecelerating.
Not ideal because you then have to work around the fact the media isn't there until the scroll is finished but a nice bit of animation is working quite well in my case.
AVFoundation allows a developer to create a custom Video Player instead of using Apple's own fullscreen MPMoviePlayer.
In my project, I'm using this approach to achieve something close to what the YouTube iOS app does, which is to have a "canvas" view up on top where playback takes place, along with several controls and text labels at the bottom:
As you know, a YouTube URL "points" to HTML data, and it is meant to be used within a UIWebView. Tapping on the thumbnail inside this UIWebView brings up a fullscreen Player, which is what I'm trying to avoid.
I would like to know if the YouTube API provides a URL pointing to the actual video (mp4 file), so that I may use it along AVFoundation.
I want to find a legal way to do this, so it should definetely comply to both Apple's and Google's terms of service.
Thanks,
The easiest way to achieve this is by adding an overlay UIView, which you can place over any part of the screen. And putting it on top of the UIWebView, and set it to not respond to user interactions. As you can change size and placement and making it transparent, you can effectively choose which user interactions you want and which you don't want. And you will not mess around with youTube ToS in any way.
http://www.youtube.com/get_video_info?video_id= with the video id appended contains the mp4 url, may require some regex work (found here: https://github.com/hellozimi/HCYoutubeParser/blob/master/YoutubeParser/Classes/HCYoutubeParser.m)
I am developing an application where the user has the feature to add frames to the video being captured or to the existing video from the library.
This frames are custom design like the ones in news channel, where the subtitle of the video comes with the name of reporter and so on..
for example
The "Live" tag in the top left of the video..
Can anyone guide me the way how shall I accomplish this, atleast can give me a hint what I can use in this project..
Thanks in advance.
For a video being captured, have a look at the cameraOverlayView property of the UIImagePickerController.
I would like to create videos that needs to run on an iPad native app. The app needs to show a demonstration of a product through iPad. It needs to be interactive as well. I know we can do these in Flash, since Flash is not supported in iPad what are my options?
I appreciate any guidelines or hints. Thank you in advance
The easiest way to create interactive videos for iOS is to use Apple's HTTP Live Streaming technology. You have to create a video, embed metadata, play it using MPMoviePlayerController or AVPlayerItem, and then display clickable areas in response to metadata notifications.
Metadata should contain coordinates for the element you are tracking, eg: a dress, and a identifier for the product. You overlay this info with a clickable subview that reveals more information about the product. There are several applications of this kind in iTunes, here is one.
Once you get a working product and weeks-time of videos, the most difficult part is to perform motion tracking with the less possible human interaction. One approach is to use Adobe After Effects, another is to code your own solution based on OpenCV.
Some ideas:
You could use an MPMoviePlayerController with no controls, on loop.
Here's a solution I thought of using interactive HTML popover's over the video:
You could have a data store (say an NSDictionary), with playback times as keys.
The values could then be a custom class, which includes all the necessary data for an interactive popover on the video.
Your custom class could look something like this
#interface InteractivePopover : NSObject
{
NSString *snippetTitle;
NSString *htmlData; // could include links etc.
CGPoint popoverDisplayPoint;
// other styling attributes etc.
}
Now, when a user taps the video, it pauses it at the next 'interactive' point (by looking for the next key after the current playback time), and displays (animates on) all the popups, which you set before to show off different parts of the product.
That class might be your data store, then you create another class to handling displaying, animating, controlling, sizing (etc) these interactive popovers. It would create a UIWebView for the HTML. It would also control direction, and indication of the source point for your popover.
This is clearly very expandable because you could put images, embedded content etc into the HTML for these interactive popovers.
Anyway, that's how I would do it.
Though flash will not run on ipad you can still create apps for it with flash cs5 .
how load a pdf into iphone and my pdf is of 200 pages then it should allow to turn the pages as we do with while reading book manually means use animation to turn a page one by one ..
Thanking you ..
Loading a large PDF and having page flipping animation isn't very simple. You can use a UIWebView like #Jim says to load the entire thing by just pointing the UIWebView's URL to the PDF but you won't get page animation. However to get full control requires that you render the PDF page by page manually to a view, and create the view's turning animation your self. Its nontrivial, and given your question you don't sound like you know enough to realistically achieve this right off.
Use UIWebView Control to load pdf files.