Link to my HTML5 Video Autoplay on iOS Sample App GitHub repo
As part of a current project building a large hybrid native/web iPad app, some issues came up regarding iOS 7 and 8 and HTML5 content in a UIWebView with an autoplaying video.
This is an area where Mobile Safari differs from the UIWebView that iOS developers can embed into their own apps. Mobile Safari doesn’t allow video to autoplay, ostensibly to protect users on cellular data plans from large data charges. As far as I can tell, its behavior doesn’t change if the device is on a wifi network, so there may be other reasons.
There are many StackOverflow issues about this, some of which appear to be outdated, so the easiest thing for me to do was to build a quick, simple app to test out HTML5 autoplay. The key setting to know is that you must change the UIWebView to allow media playback without user interaction – you can set this in the Storyboard, or you can set it via code:
self.webView.mediaPlaybackRequiresUserAction = NO;
I’ve been working on a new app that isn’t like anything else out there yet – MapRhino!
It’s an app for kids on road trips who have iPads – the parents load up the MapRhino app on their iPhone, put in their destination, and then the kids get the car’s location and the time remaining until they get there on their iPads.
The greatest part about it is that it doesn’t require any kind of wireless data plan for the iPads – the iPhone and the iPads set up their own wireless network in the car using the Wifi and Bluetooth connections built into the devices, and the iPads can get the streaming updates.
Unfortunately, it uses some Apple-only technology, so it’s only going to work with iPhones and iPads (for now), but all you need is a recent iPhone and iPad.
I’m in the process of finishing up beta testing, to get the app out into the App Store, but I’ve included a screenshot of the iPad app so you can see what it looks like.
At AirConf 2014, I gave this talk on Twilio for developers who haven’t used it before, or who haven’t used it much. I also set up a few live demos for people to try, so that was fun!
I’ve been one of the Twilio (an API for Voice and SMS) experts at AirPair for a while. AirPair is a great little service that matches up software developers with experts in the field – trying to implement in-app purchase on iOS ? There’s probably an expert on that. Want to migrate from MySQL to MongoDB for your Django application? Find that expert on AirPair. The idea is that you can hire those experts on an hourly basis for a video interview where they help you out.
Because I like working with Twilio, and I’ve done a lot of work advising developers on how to use Twilio in various projects, I agreed to give a talk during AirPair’s first conference – AirConf – on August 6th, at 12 pm Central Daylight Time/5pm Greenwich Mean Time. Why is the time so important? It’s a virtual conference, conducted over Google Hangouts. So you don’t have to be in the same physical location as I am for the conference – no travel necessary!
I recently got a Samsung Gear 2 Neo smart watch – it pairs with recent, powerful Samsung phones and tablets, but without them, it’s basically a pedometer. So I’d definitely only recommend it if you already have one of their recent devices (like the Samsung Galaxy S5 or Note 3 phones), and not if you use an iPhone or a non-Samsung Android phone.
I designed a knitting counter for my wife – there are a lot of simple plastic devices (such as this one) that do the same thing. Basically, you can keep track of how many rows you’ve knitted for a project, and then swipe across the number to reset it.
The Gear watch supports HTML Touch Events, so I was able to hook into a swipe event to do the reset. I used a swipe gesture because the screen is so small, it’s quite easy to hit the wrong button if you have two on the screen next to each other. My original design had a reset button underneath the “Rows Finished” button, and I ended up hitting the wrong button a lot. With the gesture, it’s a lot harder to make that mistake.
If you have a Gear watch, the app should be approved by Samsung soon! I entered it in the Samsung Gear App Challenge, so I’ll be curious to find out how it does in the challenge. Here’s the video submission I made for the app if you want to see it in action: