À̹ø¿¡ ¼Ò°³ÇØ µå¸± ÀÚ·á´Â Apple ¿¡¼ Á¦°øÇÏ´Â Live Photos API ÀÔ´Ï´Ù.
»ùÇà HTML ÄÚµå ¾È³» ÀÔ´Ï´Ù.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="https://cdn.apple-livephotoskit.com/lpk/1/livephotoskit.js"></script>
</head>
<body> <div id="Live_Photo_Div" style="width: 1024px; height: 720px;"></div> </body> <script src="https://cdn.apple-livephotoskit.com/lpk/1/livephotoskit.js"></script> <script src="script/livephoto.js"></script>
</html>
script/livephoto.js ÆÄÀÏ¿¡ ÇÙ½ÉÄڵ尡 µé¾î ÀÖ½À´Ï´Ù.
À§ 󷳸¸ »ç¿ëÇϽøé live photos ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
±×¸®°í ³ª¸ÓÁö´Â ¿É¼Çµé¿¡ ´ëÇÑ ¼³Á¤ÀÌ ´ëºÎºÐ ÀÔ´Ï´Ù.
Events
player.addEventListener('canplay', evt => console.log('player ready', evt)); //½ÃÀÛ
player.addEventListener('error', evt => console.log('player load error', evt)); //¿¡·¯
player.addEventListener('ended', evt => console.log('player finished playing through', evt)); //Á¾·á
player.playbackStyle = LivePhotosKit.PlaybackStyle.HINT;
player.playbackStyle = LivePhotosKit.PlaybackStyle.FULL; //FULL À» ÃßõÇÔ.
player.play();
player.pause();
player.toggle();
player.stop();
player.currentTime = 0.25 * player.duration;
player.currentTime = 0.1;
LIVE ¹öÆ°¿¡ ¸¶¿ì½º ¿Ã¸®¸é Live Photos ±â´ÉÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. ^^
|