전체 : 4,150,784 명
어제 : 0 명
오늘 : 0 명

유튜브 API들 이용하기

COOLSOFT | 2010.02.12 00:38 | 조회 12354

API Overview Guide

The YouTube APIs and Tools let you bring the YouTube experience to your webpage, application, or device. The Data API lets you perform most of the operations a normal YouTube user can on the YouTube website. The Player APIs let you control the YouTube player using JavaScript or ActionScript. There is the basic embedded player you are used to seeing as well as the chromeless player that lets you create your own player controls. Lastly there are the Widgets, and a custom player that you can embed on your webpage, even if you are not a web programmer.

First, you should decide on which of our APIs and tools best suits your needs. If you're familiar with HTML but haven't used much JavaScript, consider looking at the Widgets and custom player. If you are comfortable with JavaScript or Flash look at our Player APIs. If you are programming a device or server-side logic for a website, then look at the Data API. The table below attempts to describe the experience level of a developer for each option:

Basic Medium Advanced
Custom Player and Widgets Player APIs with Embedded Player Data API and Chromeless Player

Widgets

Widgets are JavaScript components that you can place in your webpage to enhance it with YouTube's large collection of content. Unlike the custom player, these widgets are for people who are familiar with HTML and JavaScript, but may not be familiar with server-side programming. Currently, the two widgets that are available are the Video Bar and the Video Search Control.

Video Bar

The Video Bar is a simple way to have a strip of video thumbnails on your site. After clicking on a thumbnail, a floating player opens to play the video right on your site. There is a simple wizard to get you started, as well as a Programming Guide to help you tweak it. Be sure to read the section on YouTube-specific functionality.

Video Search Control

The Video Search Control brings the power of the Google AJAX Search API to your site, giving you the ability to search through YouTube's massive amounts of content. Each search box is pre-configured with a set of tags that you define and displays thumbnails for the video results. These videos can then be played without leaving the page. Use the wizard to get started, and then read the Programming Guide for how to customize the player with CSS, automatically search based on site links, save user searches, and more!

Custom Player

Sometimes it's nice to have control over your website without having to edit it. Many websites benefit from having video content, but updating this content can be difficult. This is where the YouTube custom player comes to the rescue. You can customize a YouTube player and populate it with videos you specify. Once the custom player is on your site, you can easily update the appearance or content by logging into your YouTube account and clicking on Custom Video Players.

When creating a custom player, you are able to choose from a number of themes for the player. The videos that a custom player displays can be all of the videos on your YouTube channel, all of your favorite videos, or any custom playlist you have created. By creating playlists and hooking them up to a custom player, you can easily control what is displayed on your website without ever leaving YouTube!

Player APIs

The player APIs let you control how YouTube videos look on your site. The first thing you should know is there are two kinds of players: the normal "embedded" player you've seen around the web, and a second "chromeless" player that is just a video box without any controls. The chromeless player is intended for experienced web programmers that want to design their own video player. Both of these players have the same API that are exposed in JavaScript and ActionScript.

The following sections discuss each option and their uses:

Embedded Player

The embedded player is the simplest way to place a YouTube video on a webpage. To customize the behavior and color of the player, you can use the documented Player Parameters. The code to display this player can be quickly generated from a program, making it possible to find a video using the Data API and then display it using the embedded player.

Once the embedded player has been added to a webpage, it can be controlled using JavaScript. Alternatively, if you are embedding the player in a Flash application, you can use ActionScript instead. Using either system, you can perform actions similar to what the user can do by clicking on the controls: you can pause the video, seek ahead, mute the sound, etc. You are also able to poll the status of the player and listen for events, to let your code react to whatever the player is currently doing.

Chromeless Player

Interface elements and controls around content is sometimes referred to as "chrome" (e.g. the browser buttons on the top of a webpage.) The chromeless player is, by definition, a YouTube video with no controls. This makes it easy to customize within Flash or HTML.

The chromeless player exposes the same JavaScript and ActionScript APIs that the embedded player does. The player demo lets you preview the embedded and chromeless players using JavaScript and some simple HTML controls. You can also use the Google Code Playground to debug and run JavaScript player code.

Data API

The Data API allows a program to perform many of the operations available on the YouTube website. It is possible to search for videos, retrieve standard feeds, and see related content. A program can also authenticate as a user to upload videos, modify user playlists, and more.

The Data API is primarily for developers who are used to programming in server-side languages. It is useful for sites or applications that wish to have a deeper integration with YouTube. This integration could be a web application allowing users to upload video to YouTube. It could also be a device or desktop application that brings the YouTube experience to a new platform. The Data API gives you programmatic access to the video and user information stored on YouTube. With this, you can personalize your site or application with the user's existing information as well as perform actions on their behalf (like commenting on and rating videos.)

If you are curious about how the Data API works at the basic level using XML and HTTP, you can read the Protocol Guide. This guide details the requests and responses that the YouTube API servers expect and return. To learn more about the structure of these requests and responses, read the Reference Guide. This guide defines the API's feed types, HTTP request parameters, HTTP response codes, and XML elements. You may also want to read about the Google Data Protocol and the Atom Publishing Protocol, which are the standards upon which the Data API is built.

To make working with the API easier, we have a number of client libraries that abstract the API into a language-specific object model. These client libraries are open source and can be used and modified under the Apache License 2.0. There are Developer's Guides for Java, .NET, PHP, and Python as well as sample code.

twitter facebook me2day 요즘
잘읽었습니다. ^^ 처음에 영어라 당황했지만 역시 구글이좋군요 ㅋ 위젯이..

잘읽었습니다. ^^ 처음에 영어라 당황했지만 역시 구글이좋군요 ㅋ

위젯이 좋네요

02.12 18:07 | 그런거없다님 | 신고 | 수정 | 삭제
댓글 0
입력상자 늘리기
잘읽었습니다. 올영어인데 저도 구글번역 이용했어염 ~!

잘읽었습니다. 올영어인데 저도 구글번역 이용했어염 ~!

02.26 13:35 | 쿨Boy님 | 신고 | 수정 | 삭제
댓글 0
입력상자 늘리기
구글 Good~ :)

구글 Good~ :)

03.29 17:09 | 작은여우님 | 신고 | 수정 | 삭제
댓글 0
입력상자 늘리기
감사.....

감사.....

12.12 18:54 | sdfdsfgdgfdsf님 | 신고 | 수정 | 삭제
댓글 0
입력상자 늘리기
감사합니다
감사합니다
04.06 23:36 | 이글0님 | 신고 | 수정 | 삭제
댓글 0
입력상자 늘리기
댓글쓰기 - 로그인한 후 댓글작성권한이 있을 경우 이용하실 수 있습니다.

비밀번호 확인

댓글 등록시에 입력했던 비밀번호를 입력해 주세요.
10개(1/1페이지)
rss
PHP
번호 제목 작성자 작성일 조회
10 [다이어리]페이지 불법링크 막기사진첨부파일[18] 레인커뮤니케이션 2009.09.28 11588
9 [다이어리]한글 초성검색을 해보자(ex. ㄱ자만 또는 ㄴ자만 검색)사진첨부파일[8] 레인커뮤니케이션 2009.09.08 12712
8 [다이어리]검색 광고 통계및 차단 프로그램 제작-1(기획)[3] 레인커뮤니케이션 2009.09.05 9940
>> [고급]유튜브 API들 이용하기사진[5] COOLSOFT 2010.02.12 12355
6 [기초]유용한 mysql_fetch_array를 써보세요. 레인커뮤니케이션 2010.08.25 11643
5 [기초][보안]PHP 해킹하기 #EX1 PHP.* 취약점[18] 퓨틱 2009.10.20 10101
4 [기초][보안]PHP 해킹하기 #4 업로드 취약점사진[14] 퓨틱 2009.10.18 15525
3 [기초][보안]PHP 해킹하기 #3 다운로드 취약점[9] 퓨틱 2009.10.18 12637
2 [기초][보안]PHP 해킹하기 #2 SQL Injection[21] 퓨틱 2009.10.18 10922
1 [기초][보안]PHP 해킹하기 #1 NULL Byte Injection[16] 퓨틱 2009.08.31 13552
처음페이지이전 10 페이지1다음 10 페이지마지막페이지