Is there any way to run videos on Apple watch using Watchkit within my app? I tried finding any video player, but there was nothing. Thanks!
No - there's currently no way to run video on Apple Watch using Watchkit.
Depending on your desired outcome, you may be interested in the Animation capabilities of WatchKit. By adding a series of images into your Watch App bundle, WatchKit allows you to cycle through them at up to 120 fps or slower when fetching images from iPhone.
You could accomplish some pretty amazing results by animating images, although bare in mind image resources need to be kept to a minimum.
I suggest this tutorial on WatchKit Animation
and this Swift framework for rendering UIViews as image sequences in WatchKit.
Related
So I am working on an app that requires different audio files to be played using an NSTimer every X amount of time. Yes, it needs to play the audio in the background as well, but I have had inconsistent results trying to do so. I have searched the web thoroughly to find a solution to this problem, but I have had no luck.
I have enabled background modes and checked off item 0(audio) and made sure it was in my info.plist. I have set the "App does not run in background" key to NO in the info.plist. In the viewDidLoad method of the VC, I have set the AVAudioCategory to categoryPlayback and set the AVAudioSession to active. I have also moved these lines of code around in different places of the app to look for different results, and the best results I have gotten is that the app will continue to run in the background sometimes and at other times it will suspend.
Through all of my searching, I have seen forums explaining how to play audio in the background. However, I have not found any solutions to playing short audio files in the background intermittently on different scheduled intervals.
I know of at least one app in the App Store that is able to do this, and they use the ducking feature of AVFoundation to duck audio playing in the background(Im not sure if other frameworks are able to duck background audio, such as AudioToolbox, but I would like to have ducking enabled for my app).
If anyone knows of any legal solution for my problem, your assistance would be greatly appreciated.
I am having a problem with quality for embedded YouTube videos in my app. I am using YTPlayerView to embed videos from YouTube. My app has 2 options: option 1 is the user can watch video with 360p quality and option 2 is 720p quality. Are these two options possible? If yes, can I customize the video playback quality of the YTPlayerView?
I tried to change the quality this way, but it does not appear to work:
[self.playerView setPlaybackQuality:kYTPlaybackQualitySmall];
I assume you are using YouTube's youtube-ios-player-helper for iOS.
Unfortunately, due the to the nature of the iFrame API, it is not possible to force a quality playback with this library. The player will load the video in the closest resolution to your YTPlayerView's size. If you change the size of your YTPlayerView programmatically, the view will reload the video to fit your new frame.
See this GitHub issue on the project page. Unfortunately, this is the expected behavior of the class.
I am very new to Xcode and so as with auto layouts and i want to make my app which i've created, adaptive in a very easy way. I have seen lots of tutorials on internet but nothing helped me with my app. so i don't know how to make my app adaptive. so i need a help.
I have made an app that generate report in second view controller after providing inputs in first view controller.so i need to see how can i use auto layouts in my respective app to make it adaptive or there any easy way to get the results. i have seen all the videos related to it.
thanks in advance.
The best way is to use Auto Layout and Size Classes. This way your app will work with all iPhone sizes and all iPads. It will also behave correctly in portrait and landscape.
For more details, you will need to read and watch a lot of documentations/WWDC videos.
I need to create an intro for IOS app, I want to create transition between images like Macos X screensaver themes (beach, forest...) with music, and text appearing and fading. I don't know exactly which IOS API/framework is the most suitable to use to achieve this. I will appreciate suggestions or links to tutorials.
Many thanks
These links might give you some inspiration on at least how to get started:
iphone fading of images
http://www.youtube.com/watch?v=a4M0BkJwLT0
How about UIImageView and UILabel, with block animation?
I'm using MPMoviePlayerController to play different videos.
However, when I change the video using setContentURL (I'm just targeting OS 3.2 and above), I notice a white flicker.
Is there anyway I can get rid of that flicker and make the transition between videos look smooth?
Thanks,
Tee
Unfortunately not, and I've had this problem too. You could use another instance of the controller, and use an animation to transition from one video to the other, to have a bit more control over the process.