• Home »
  • Apps »
  • Apple releases JavaScript API for embedding Live Photos on the web

Apple releases JavaScript API for embedding Live Photos on the web

On Thursday, Apple confirmed a new JavaScript API for web developers who want to embed of Live Photos on the web, called LivePhotosKit JS. It is in addition to Apple’s current Live Photos API, the new API enables Live Photos on iPhone, iPod touch, iPad and Mac devices and in apps that use it, like Facebook’s mainland mobile app, Tumblr for iOS and others. Apple releases the LivePhotosKit JS API on NPM and the LivePhotosKit JavaScript code is included on developer’s website.

 

If the user can activate the playback controls and more, some of the parameters that can be used include the locations of the photo and video components of a Live Photo, whether or not the player will prefetch data before the user attempts to begin playback.

The browsers support the player included: iOS -Safari and Chrome; macOS—Safari, Chrome, and Firefox; Android —Chrome (beta); Windows—Chrome, Firefox, Edge and Internet Explorer 11.

You should specify the height and width of the HTML element being decorated to be a Live Photos player because Live Photos may take a long time to download. According to the firm, the photo will not be able to show the progress badge if it takes too long.

Also read: Apple Developing Another MacBook Pro Model without Touch Bar

There are two components in Live Photos, including a photo and a video of the moments 1.5 seconds before and 1.5 seconds after the photo is taken. You can capture Live Photos on iPhone SE, iPhone 6s, iPhone 6s Plus, iPhone 7, iPhone 7 Plus.

You can view Live Photos by supported devices such as iPhone, iPad and iPod touch with iOS 9 or later, Mac models with OS X El Capitan or later and Apple Watch models on watchOS 2 or later. According to the Cupertino company, user can share their Live Photos within their app on iOS besides playback.