PDA

View Full Version : Brightcove Makes it Easier to Develop Dual-Screen iOS and Apple TV Apps




MacRumors
Jun 26, 2012, 11:53 AM
http://images.macrumors.com/im/macrumorsthreadlogo.gif (http://www.macrumors.com/2012/06/26/brightcove-makes-it-easier-to-develop-dual-screen-ios-and-apple-tv-apps/)


Brightcove (http://www.marketwatch.com/story/brightcove-introduces-app-cloud-core-edition-a-free-html5-mobile-app-platform-2012-06-26) announced today the introduction of App Cloud Core, a free edition of the company's app platform that allows developers to create native iOS apps using HTML5 and JavaScript. In addition, one of the major new features of the API is the ability for developers to easily create dual-screen apps for iOS devices to broadcast content to the Apple TV over AirPlay. The new solution enables media publishers to develop rich content apps for the iPhone and iPad that simultaneously control content, data and information presented on an HDTV while displaying synchronized content on the iPad or iPhone. The unique dual-screen solution leverages Apple's AirPlay technology, which allows viewers to use applications that simultaneously present content, interactive options and data on both the touch device and an Apple TV.This ability to broadcast separate content to a user's device and Apple TV is not new (Real Racing 2 HD Demo (http://www.macrumors.com/2011/06/17/dual-screen-airplay-gaming-demo-with-real-racing-2-hd/)), but the new APIs provide another easy way for developers to implement these features. Brightcove offers this demo of how it can be used:

A1RjXsLZ2Ik
There's been a lot of attention to how Apps might work on a television interface. Microsoft recently (http://www.macrumors.com/2012/06/04/microsoft-makes-xbox-centered-living-room-push-with-smartglass-wireless-streaming-and-more/) announced a new technology called SmartGlass which offers a two-way Airplay-like standard that allows mobile devices to act as second screens for content being displayed on TV from an Xbox.

Beyond Apple's own efforts with AirPlay, there has been rumors that Apple might take it a step further with a fully developed Apple TV app model as well as the possibility of a full Apple television set in the near future.

Article Link: Brightcove Makes it Easier to Develop Dual-Screen iOS and Apple TV Apps (http://www.macrumors.com/2012/06/26/brightcove-makes-it-easier-to-develop-dual-screen-ios-and-apple-tv-apps/)



ToomeyND
Jun 26, 2012, 11:57 AM
This could actually have some great applications for "game night."

I know that this would be using incredibly advanced tech for very low-tech fun, but that's what the ipad is about!

Mad Mac Maniac
Jun 26, 2012, 11:59 AM
YES! I would love to see this capability enabled for many of my apps. This is definitely a step in the right direction. I was hoping to see Apple promote/encourage this somehow with something like that, but good to see someone doing it!

Damian Ragar
Jun 26, 2012, 12:01 PM
Nice but, having to invoke the bottom bar to launch the content via airplay kills the deal IMO. Would be far more intuitive to have the app push the content via AirPlay natively via some kind of button/menu.

vmachiel
Jun 26, 2012, 12:02 PM
Great, now i won't have to buy a Wii U anymore:D

Amazing Iceman
Jun 26, 2012, 12:03 PM
$ 99/month is not making it easier at all.
Free version is a teaser. Full features ain't free.

kiljoy616
Jun 26, 2012, 12:11 PM
Very cool implementation, this could really be great for gaming also.

Owen Imholte
Jun 26, 2012, 12:15 PM
Nice but, having to invoke the bottom bar to launch the content via airplay kills the deal IMO. Would be far more intuitive to have the app push the content via AirPlay natively via some kind of button/menu.

This would be very nice, and I wouldn't be surprised if Apple adds a related API in the future but it is definitely not possible right now. I won't be surprised if they never add it in order to prevent apps from surreptitiously sending views to a screen.

filmantopia
Jun 26, 2012, 12:17 PM
is it me or is Apple moving to console more than an actual TV. AppleTV v.3 could with a little more room be a contender for casual gaming. :D

That's the thing, if Apple's intending on a successful "TV-like device", the device needs to possess significant feature improvements over a standard TV & Apple TV combo. Something pretty drastic. I'm in the camp that thinks it's going to happen.

Navdakilla
Jun 26, 2012, 12:31 PM
Love the innovation. Keep it coming!

drumcat
Jun 26, 2012, 12:44 PM
That's the thing, if Apple's intending on a successful "TV-like device", the device needs to possess significant feature improvements over a standard TV & Apple TV combo. Something pretty drastic. I'm in the camp that thinks it's going to happen.

I think it's the reverse. The "TV" is going to get dumber, and the in-hand device smarter. TVs are just big screens, but it's a "desktop" vs "laptop". Give me the laptop (almost) every time.

CanadianGuy
Jun 26, 2012, 12:51 PM
For a great example game of using dual-screen well. Check out this shared experience party game for Apple TV: Party Doodles - http://bit.ly/PartyDoodles

Apple basically used it as an example of how to build shared experience games at WWDC.

Full Disclosure: I'm the developer of the game...

charlituna
Jun 26, 2012, 01:00 PM
$ 99/month is not making it easier at all.
Free version is a teaser. Full features ain't free.

I already pay $99 a year to Apple to make my apps which can be natively programed to do this whole two screens, multi screen stuff (see Real Racing, the native Video app etc). And it's really not that hard if you bother to learn the SDKs.

So why would I pay, or worse make my users pay, any amount for such function. I might as well write DO NOT DOWNLOAD MY APP at the top of my description. These are folks that balk at spending even 99 cents for most stuff, especially games.

----------

I think it's the reverse. The "TV" is going to get dumber, and the in-hand device smarter. TVs are just big screens, but it's a "desktop" vs "laptop". Give me the laptop (almost) every time.

I can agree with that. In fact I still strongly believe that all that 'real tv' talk is actually Apple updating their Cinema Display line up with higher quality and bigger sizes. I would happily pay for a 40-46 inch 1080p Retina Display with a healthy frame refresh and HDMI etc to plug in my blu-ray, my apple tv, my cable box, my computer rather than the same for a 'smart' tv that is full of a bunch of stuff I'll never use.

gnasher729
Jun 26, 2012, 01:01 PM
This would be very nice, and I wouldn't be surprised if Apple adds a related API in the future but it is definitely not possible right now. I won't be surprised if they never add it in order to prevent apps from surreptitiously sending views to a screen.

This has been possible and actually quite easy to do with Cocoa for a long time. First you check whether [UIScreen screens].count >= 2. There is always one screen, but if this count is 2 or more then you have an external screen.

Next you get the second screen, that's [[UIScreen screens]objectAtIndex:1]. Get its bounds by calling the bounds method, create a window, set it to be on the second screen, add a view, and that's it. That's all to get started.

If you want to do it really well, you can ask iOS to tell you when external screens are added or removed, you can ask what resolutions are available and change the resolution if you want. But it's all really easy to do.

Designing a useful user interface may be a little problem, since your external screen won't be a touch screen; so if you put a button on the external display, nobody will be able to press it. Second display is purely for display.

mdelvecchio
Jun 26, 2012, 02:23 PM
slightly off-topic, but has anyone seen how Pioneer's AppRadio head unit works w/ iOS? it's a car stereo w/ a 6.1" or 7" multi-touchscreen; but the kicker is your apps can take advantage of it as an external *touchscreen* display! (when plugged into the head unit w/ a 30-pin cable).

ex: MotionX can show list driving directions on your phone while outputting the map to the head unit -- which you are free to interact with using touch.

there are other apps too. i think its amazing, but not many apps take advantage of it.

mdriftmeyer
Jun 26, 2012, 03:46 PM
I already pay $99 a year to Apple to make my apps which can be natively programed to do this whole two screens, multi screen stuff (see Real Racing, the native Video app etc). And it's really not that hard if you bother to learn the SDKs.

So why would I pay, or worse make my users pay, any amount for such function. I might as well write DO NOT DOWNLOAD MY APP at the top of my description. These are folks that balk at spending even 99 cents for most stuff, especially games.

----------



I can agree with that. In fact I still strongly believe that all that 'real tv' talk is actually Apple updating their Cinema Display line up with higher quality and bigger sizes. I would happily pay for a 40-46 inch 1080p Retina Display with a healthy frame refresh and HDMI etc to plug in my blu-ray, my apple tv, my cable box, my computer rather than the same for a 'smart' tv that is full of a bunch of stuff I'll never use.

Not to mention the whole HTML5/Javascript solution when I've got all the heavy APIs I could desire to do the heavy lifting and then customize my functionality in C/ObjC/ObjC++/C++ via LLVM/Clang/OpenCL without adding a footprint, namely WebKit, on top just to then develop on top of that in a mark up language and a scripting language.

Amazing Iceman
Jun 26, 2012, 05:15 PM
Not to mention the whole HTML5/Javascript solution when I've got all the heavy APIs I could desire to do the heavy lifting and then customize my functionality in C/ObjC/ObjC++/C++ via LLVM/Clang/OpenCL without adding a footprint, namely WebKit, on top just to then develop on top of that in a mark up language and a scripting language.

Yeah, why add an extra layer of what could make your app bulky and laggy?
I think Brightcove's solution is just another way to attract web developers to create iOS apps without having to learn a low-level language. Reminds me of Clarion and QuickBasic, form the old days.

----------

I already pay $99 a year to Apple to make my apps which can be natively programed to do this whole two screens, multi screen stuff (see Real Racing, the native Video app etc). And it's really not that hard if you bother to learn the SDKs.

So why would I pay, or worse make my users pay, any amount for such function. I might as well write DO NOT DOWNLOAD MY APP at the top of my description. These are folks that balk at spending even 99 cents for most stuff, especially games.
----------



True. There's so much more power inside the APIs already provided. This is more to attract Web Developers who don't know or want to learn OBJ-C or deal with APIs. Sort of what Bento is in the Database world.

hipnetic
Jun 26, 2012, 06:32 PM
For a great example game of using dual-screen well. Check out this shared experience party game for Apple TV: Party Doodles - http://bit.ly/PartyDoodles
I just tried your app, but didn't see any way to enable AirPlay. If the only way to do that is via AirPlay Mirroring, then that's not a very good example of what we're talking about here. And in the case of your game, the answer card would be made visible for everyone to see on the TV. Or am I doing something wrong?

KnightWRX
Jun 26, 2012, 06:42 PM
Not to mention the whole HTML5/Javascript solution when I've got all the heavy APIs I could desire to do the heavy lifting and then customize my functionality in C/ObjC/ObjC++/C++ via LLVM/Clang/OpenCL without adding a footprint, namely WebKit, on top just to then develop on top of that in a mark up language and a scripting language.

In your haste to be condescending, you forgot why we have these higher level frameworks in the first place : time to market. Rapidly being able to build and deploy your application is why most people don't bother with the lower level languages APIs and use these higher level frameworks.

Frankly, unless you really need to push the performance, it's much more important to actually ship your application if you intend to do a living. There's a market out there for these sort of products, as we've seen time and again in about every segment of application development.

hipnetic
Jun 26, 2012, 07:36 PM
In your haste to be condescending, you forgot why we have these higher level frameworks in the first place : time to market. Rapidly being able to build and deploy your application is why most people don't bother with the lower level languages APIs and use these higher level frameworks.I agree, and it's interesting because I've been recently thinking more seriously about learning to program for the iPhone. My past experience (sort of distant past now) is in developing with Visual Basic and a bit of .NET. Back in the day, I loved the instant gratification of VB. Being able to slap some objects (text box, command button, etc.) on the screen, double-click on some of them and add a bit of code, then click run and you could instantly play with it all. It made coding fun. I haven't started to delve into iPhone programming yet, but I'm a bit concerned that it's going to be a lot less "fun" and a lot more "work." The great thing about a an easy-to-use Rapid Application Development (RAD) tool (I don't think that terminology is used anymore) is that you can focus on the end-result and design aspects, and spend a whole lot less time *working* on how to make it all happen.

Chrisg2014
Jun 26, 2012, 10:05 PM
Basically this is Windows glass, which is coming to the iOS By the way. Oh also Android. Also you don't need a Apple TV, you won't need a PC either.

charlituna
Jun 27, 2012, 12:06 AM
Basically this is Windows glass, which is coming to the iOS By the way. Oh also Android. Also you don't need a Apple TV, you won't need a PC either.


No but you will need an Xbox

And it's worth noting that both wii u and smart glass were done by AirPlay first.

Dionte
Jun 27, 2012, 12:16 AM
It looks really cool, I like the question on the screen answer on the ipad game. Multiple people could play that way. Would be good for a card game like Uno with multiple players at home.

rei101
Jun 27, 2012, 06:22 AM
Too much codependency on a machine. That is just madness.

KnightWRX
Jun 27, 2012, 06:37 AM
I agree, and it's interesting because I've been recently thinking more seriously about learning to program for the iPhone. My past experience (sort of distant past now) is in developing with Visual Basic and a bit of .NET. Back in the day, I loved the instant gratification of VB. Being able to slap some objects (text box, command button, etc.) on the screen, double-click on some of them and add a bit of code, then click run and you could instantly play with it all. It made coding fun. I haven't started to delve into iPhone programming yet, but I'm a bit concerned that it's going to be a lot less "fun" and a lot more "work." The great thing about a an easy-to-use Rapid Application Development (RAD) tool (I don't think that terminology is used anymore) is that you can focus on the end-result and design aspects, and spend a whole lot less time *working* on how to make it all happen.

Interface builder and IBOutlets/IBActions is kind like RAD tools you know, with a bit of a steeper learning curve though (since you're going to manually be tying your code and Interface design, there is no "double click the button to go to btn1_onClick" here).

The language of course is quite a bit steeper than Basic, though these days with ARC being implemented and taking away most of the memory management stuff (zombies, leaks, when to release/retain) and the breadth of the iOS classes already implemented that do a lot of checking for you, you shouldn't quite have to grasp how not to shoot yourself in the foot like C can allow you to.

Proper typing and casting rules remains a challenge. Example :


int x = 1;
int y = 2;
float z = x / y;

/* what would this string contain ? */
NSString * result = [NSString stringWithFormat: @"%.1f", z];


You'd think z would contain 0.5 right ? It contains 0. That is because an operation involving 2 integer values returns an integer. When an operator causes an integer to have a fractional value, the return value is floored (not rounded).

SBlue1
Jun 27, 2012, 06:59 AM
Wow, looks nice.

CanadianGuy
Jul 31, 2012, 02:01 PM
I just tried your app, but didn't see any way to enable AirPlay. If the only way to do that is via AirPlay Mirroring, then that's not a very good example of what we're talking about here. And in the case of your game, the answer card would be made visible for everyone to see on the TV. Or am I doing something wrong?

First, sorry I didn't see this reply until now.

Second, yes, you have to enable AirPlay mirroring via the OS. It's sort of weird they way it works, but that's the only way Apple lets us access the second display. Once you enable AirPlay Mirroring, the app can see the second display and can put different content on it, (even though it's called Mirroring). So when you play the game, the AirPlay display will not show the answer card to everyone, in fact the entire display is laid out differently since there's also no need to have the drawing controls on the second display etc.

Hope you like the game.

hipnetic
Jul 31, 2012, 03:25 PM
Second, yes, you have to enable AirPlay mirroring via the OS. It's sort of weird they way it works, but that's the only way Apple lets us access the second display. Once you enable AirPlay Mirroring, the app can see the second display and can put different content on it, (even though it's called Mirroring). So when you play the game, the AirPlay display will not show the answer card to everyone, in fact the entire display is laid out differently since there's also no need to have the drawing controls on the second display etc.Wow, that's definitely a screw-up on Apple's part then. They've touted a couple of these AirPlay-enabled games in their keynotes, but they're requiring us to turn on AirPlay *Mirroring* via the OS, which is of course unintuitive since, in the case of an app that's trying to do something creative and display *different* content on the TV, it's not going to *mirror* the display. Hopefully Apple will correct this soon and let you add an AirPlay button directly to your app's UI.

CanadianGuy
Aug 17, 2012, 03:14 PM
Wow, that's definitely a screw-up on Apple's part then. They've touted a couple of these AirPlay-enabled games in their keynotes, but they're requiring us to turn on AirPlay *Mirroring* via the OS, which is of course unintuitive since, in the case of an app that's trying to do something creative and display *different* content on the TV, it's not going to *mirror* the display. Hopefully Apple will correct this soon and let you add an AirPlay button directly to your app's UI.

It's definitely confusing the way they do it. I filed a bug report on it, since I thought I was actually coding it wrong, for the exact reason, I didn't want to Mirror the display.

It sucks for devs that it's so confusing, I've had bad reviews from people who expected the app to auto enable AirPlay for example. But it's just not possible for us to do it any other way.

Owen Imholte
Aug 24, 2012, 05:46 PM
Sorry this reply is a bit outdated, just realized I had some macrumors forums notifications.

This has been possible and actually quite easy to do with Cocoa for a long time. First you check whether [UIScreen screens].count >= 2. There is always one screen, but if this count is 2 or more then you have an external screen.

My understanding is that count doesn't increment until a second screen is actually connected. If you use a cable this happens right away, but if you are on an airplay network and your device supports mirroring the only way to turn that on is in the multitasking bar. That latter part is what I was referring to when I said "This" but I probably wasn't clear enough.

If you know of an App Store approved way of turning on mirroring from within an app I'd be very keen to hear how.

Next you get the second screen, that's [[UIScreen screens]objectAtIndex:1]. Get its bounds by calling the bounds method, create a window, set it to be on the second screen, add a view, and that's it. That's all to get started.

If you want to do it really well, you can ask iOS to tell you when external screens are added or removed, you can ask what resolutions are available and change the resolution if you want. But it's all really easy to do.

Designing a useful user interface may be a little problem, since your external screen won't be a touch screen; so if you put a button on the external display, nobody will be able to press it. Second display is purely for display.

I agree with this whole section, we do custom drawing in our game Tip of the Tongue (http://swingingsultan.com/tott/) and it really is best streaming to an Apple TV.

One thing we are especially proud of are the dynamic instructions that appear (iPad only, right now) depending on if an Apple TV is present. How it works:

Apple TV available on current wifi: Tell user to double tap home button and turn on mirroring

After they do double-tap: change the instructions to show a graphic helping to find the mirroring icon (a bit of
a hack, since there is no "multitasking bar showing" notification)
If they enable mirroring the TV display starts up and the mirroring specific instructions go away.

No Apple TV, but device supports mirroring: Show hint on last page of instructions.
Non-supported device: don't show instructions/tips.


I plan to open source our method as soon as time allows since I think educating people about mirroring will help everyone (I didn't know how to turn it on in my iPhone 4S until after I wrote the corresponding feature).