Apple Releases LivePhotos JavaScript SDK
Apple Releases LivePhotos JavaScript SDK
Written by Lucy Black   
Thursday, 27 April 2017

Until now Apple's Live Photos were largely confined to your iPhone 6S, 6S Plus or SE so you were limited in how you could share them. Thanks to a new SDK you can now add LivePhotos to a website.

Introduced by Apple at last year's WWDC (World Wide Developer Conference) Live Photos are the combination of a still image and a short video in a single file format and let the user snap photos that animate like GIFs for playback.

In this video Tom Honeyands of Trusted Reviews shows off the feature from the point of view of the user where he explains how a few second's of video is shot around the moment when you take the photo:

Playback on the iPhone 6S, 6S Plus or SE takes advantage of their support for Force Touch. Initially, the images appear still, but when you press down on them, the extra material, before and after the photo instant is played together with sound from the video.

livephotoAPIThe newly released LivePhotoKit JS library now enables devs to play Live Photos in web pages:

The JavaScript API presents the player in the form of a DOM element, much like an image or videotag, which can be configured with photo and video resources and other options, and have its playback controlled either programmatically by the consuming developer, or via pre-provided controls by the browsing end-user. 


To use it you first embed LivePhotosKit JS, which is also available via NPM, in your webpage and enable JavaScript strict mode.

After this you can create players by simply adding declarative markup to your HTML. As the page loads, LivePhotosKit JS will determine what player instances are on the page and initialize them. You can use any HTML tag that supports child nodes. Then you can specify the locations of the photo and video components by setting the data-photo-src and data-video-src attributes, respectively.

The LivePhotosKit JS player is supported on the following browsers:

iOS

Safari, Chrome

macOS

Safari, Chrome, Firefox

Android (performance depends on device)

Chrome (beta)

Windows

Chrome, Firefox, Edge, Internet Explorer 11

More Information

Live Photos for Developers

LivePhotosKit JS API Reference

Related Articles

Apple Dev Conference Moves To San Jose

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

 

Banner


TypeScript 2.3 Released
02/05/2017

The latest release of Microsoft’s open source typed superset of JavaScript is now available. TypeScript 2.3 features generators and iteration for ES5/ES3, generic parameter defaults and more. 

 [ ... ]



Why Deep Networks Are Better
24/05/2017

Why is it that deep neural networks are better even though we have known for a long time that anything a deep network can compute can also be computed by a shallow network? Physicist Max Tegmark and M [ ... ]


More News

 
 

 

blog comments powered by Disqus

 

 

Last Updated ( Thursday, 27 April 2017 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.