ȸ¿ø·Î±×ÀÎ
Vimeo (ºñ¸Þ¿À) API ¸¦ »ç¿ëÇÏ¿© Ç÷¹À̾î ÄÁÆ®·ÑÇϱâ
2³â Àü
ºñ¸Þ¿À µ¿¿µ»óÀ» ƯÁ¤ À¥»çÀÌÆ®¿¡ Æ÷ÇÔÇÏ´Â °æ¿ì
º¸Åë ¾Æ·¡¿Í °°ÀÌ ÀÓº£µåÄڵ带 »ðÀÔÇÏ´Â ¹æ½ÄÀ» »ç¿ëÇϴµ¥¿ä
<iframe src="https://player.vimeo.com/video/59777392?loop=1" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
API ¸¦ ÀÌ¿ëÇÏ¸é ºñ¸Þ¿À Ç÷¹À̾ Á÷Á¢ Á¢±ÙÇÏ¿©
Ç÷¹À̾ Ç÷¹ÀÌÇϰųª ¸ØÃ߰ųª ¼Ò¸®¸¦ Å°¿ì°Å³ª
ƯÁ¤À§Ä¡·Î °¡°ÔÇÏ´Â µîÀÇ ÀÛ¾÷ÀÌ °¡´ÉÇÕ´Ï´Ù.
¾Æ·¡¿Í °°ÀÌ ±âÁ¸ÀÇ iframe ÀÓº£µå¸¦ Æ÷ÇÔÇÏ¿©µµ µÇ°í
<iframe src="https://player.vimeo.com/video/76979871" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('play', function() {
console.log('played the video!');
});
player.getVideoTitle().then(function(title) {
console.log('title:', title);
});
</script>
¾Æ·¡¿Í °°ÀÌ µ¿ÀûÀ¸·Î Ç÷¹À̾ »ý¼ºÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
<div id="made-in-ny"></div>
<script src="https://player.vimeo.com/api/player.js"></script>
<script>
var options = {
id: 59777392,
width: 640,
loop: true
};
var player = new Vimeo.Player('made-in-ny', options);
player.setVolume(0);
player.on('play', function() {
console.log('played the video!');
});
</script>
Ç÷¹ÀÌ¾î »ý¼ºÈÄ¿¡´Â °¢Á¾ method ¿Í event ¸¦ ÄÁÆ®·Ñ ÇÒ ¼ö Àִµ¥¿ä
¾Æ·¡ ¸®½ºÆ®°¡ »ç¿ë°¡´ÉÇÑ method ÀÔ´Ï´Ù.
◦on
◦off
◦loadVideo
◦ready
◦enableTextTrack
◦disableTextTrack
◦pause
◦play
◦unload
◦getAutopause
◦setAutopause
◦getColor
◦setColor
◦addCuePoint
◦removeCuePoint
◦getCuePoints
◦getCurrentTime
◦setCurrentTime
◦getDuration
◦getEnded
◦getLoop
◦setLoop
◦getPaused
◦getPlaybackRate
◦setPlaybackRate
◦getTextTracks
◦getVideoEmbedCode
◦getVideoId
◦getVideoTitle
◦getVideoWidth
◦getVideoHeight
◦getVideoUrl
◦getVolume
◦setVolume
¾Æ·¡ ¸®½ºÆ®´Â »ç¿ë°¡´ÉÇÑ event ÀÔ´Ï´Ù
◦play
◦pause
◦ended
◦timeupdate
◦progress
◦seeked
◦texttrackchange
◦cuechange
◦cuepoint
◦volumechange
◦playbackratechange
◦bufferstart
◦bufferend
◦error
◦loaded
¾Æ·¡ ¸µÅ©¿¡ °¡¸é ÀÚ¼¼ÇÑ ³»¿ëÀ» º¼ ¼ö ÀÖ½À´Ï´Ù
https://github.com/vimeo/player.js#create-a-player
ºñ¸Þ¿À¿¡¼´Â °³¹ßÀÚ¸¦ À§ÇÑ Á¤º¸µµ º°µµ·Î Á¦°øÇÏ°í ÀÖ½À´Ï´Ù
https://developer.vimeo.com/player
ºñ¸Þ¿À API ´Â µ¿¿µ»óÀÇ ÈÁúÀ» Á¶ÀýÇÏ´Â method ´Â Á¦°øÇÏÁö ¾Ê´Âµ¥¿ä,
Vimeo Plus, PRO, and Business ·Î ¾÷±×·¹À̵å ÇϰԵǸé
¾Æ·¡¿Í °°ÀÌ »ç¿ë°¡´ÉÇÕ´Ï´Ù.
https://player.vimeo.com/video/157588560?autoplay=1&quality=1080p
̵̧ : 117
̵̧
¸ñ·Ï