Apple has introduced a JavaScript library to play Live Photos on the web:
By including the LivePhotosKit JS script on your page, 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.
At minimum, each tag requires the following data attribute: data-live-photo. Doing this allows LivePhotosKit JS to find the DOM elements to be initialized as players.