[HTML5] [HTML5/CSS3] 멀티미디어 태그 (video, audio, embed, canvas)
2013.09.06 13:04
4362
0
https://eond.com/345737
object(HotopayModel)#900 (23) { ["error"]=> int(0) ["message"]=> string(7) "success" ["variables"]=> array(0) { } ["httpStatusCode"]=> int(200) ["module"]=> string(7) "hotopay" ["module_info"]=> NULL ["origin_module_info"]=> NULL ["module_config"]=> NULL ["module_path"]=> string(52) "/home/eond/web/eond.com/public_html/modules/hotopay/" ["xml_info"]=> NULL ["module_srl"]=> NULL ["mid"]=> NULL ["act"]=> NULL ["template_path"]=> NULL ["template_file"]=> NULL ["layout_path"]=> NULL ["layout_file"]=> NULL ["edited_layout_file"]=> NULL ["stop_proc"]=> bool(false) ["user"]=> object(Rhymix\Framework\Helpers\SessionHelper)#899 (20) { ["member_srl"]=> int(0) ["user_id"]=> NULL ["user_name"]=> NULL ["nick_name"]=> NULL ["email_address"]=> NULL ["phone_number"]=> NULL ["homepage"]=> NULL ["blog"]=> NULL ["birthday"]=> NULL ["denied"]=> NULL ["status"]=> NULL ["is_admin"]=> string(1) "N" ["is_site_admin"]=> NULL ["profile_image"]=> NULL ["image_name"]=> NULL ["image_mark"]=> NULL ["signature"]=> NULL ["description"]=> NULL ["group_list"]=> array(0) { } ["menu_list"]=> array(0) { } } ["request"]=> object(Rhymix\Framework\Request)#10 (13) { ["method"]=> string(3) "GET" ["compat_method"]=> string(3) "GET" ["url"]=> string(28) "coding/345737/comment/465170" ["hostname"]=> string(8) "eond.com" ["domain"]=> NULL ["protocol"]=> string(5) "https" ["callback_function"]=> string(0) "" ["_route_status":protected]=> int(200) ["_route_options":protected]=> object(stdClass)#11 (5) { ["cache_control"]=> bool(true) ["check_csrf"]=> bool(true) ["is_forwarded"]=> bool(false) ["is_indexable"]=> bool(true) ["enable_session"]=> bool(true) } ["module"]=> string(5) "board" ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" ["args"]=> array(5) { ["page"]=> int(5) ["document_srl"]=> string(6) "345737" ["comment_srl"]=> string(6) "465170" ["mid"]=> string(6) "coding" ["act"]=> string(16) "dispBoardContent" } } ["ajaxRequestMethod"]=> array(2) { [0]=> string(6) "XMLRPC" [1]=> string(4) "JSON" } ["gzhandler_enable"]=> bool(true) }

video
HTML5에서 video가 추가된이유
플러그인 또는 ActiveX 등으로 인한 보안상 위험으로부터 안전해지기 위해 브라우저 자체에서 동영상을 재생할 수 있게끔 하기 위함.
 
<video src="경로"></video>
 
width, height 등 크기조정가능
autoplay, controls, preload 등의 옵션사용가능
 
해당브라우저에 나오지 않는 문제등으로 인해 파일을 두개이상 불러와야할 경우
<video width="값" height="값" controls autoplay preload="auto">
<source src="경로" type='타입; codecs="코텍"'>
<source src="경로" type='타입; codecs="코텍"'>
<p>현재 사용하고 있는 브라우저는 비디오 태그를 지원하지 않습니다.</p>
</video>
타입과 코덱은 입력하지 않아도 상관없으나, 입력하면 더 좋다.
<p></p>는 video를 지원하지않는 하위 브라우저를 위해 띄우는 메시지.
 
각 브라우저에서 지원하는 동영상 포맷
 코덱/브라우저
 IE
 FireFox
 사파리
 크롬
 오페라
 아이폰
 안드로이드
 ogg, ogv
 -
 3.5+
 -
 5.0+
 10.5+
 -
 -
 mp4, m4v
 9+
 -
 3.0+
 5.0+
 -
 3.0+
 2.0+
 WebM
 9+
 4.0+
 -
 6.0+
 11.0+
 -
 -
*IE9에서는 사용자가 VP8 코덱을 직접 설치했을 경우 WebM을 브라우저에서 지원한다. 안드로이드 기반의 스마트 폰에서 WebM을 지원할 예정.
 
 
audio
사용법은 video와 동일
<audio controls="controls">
<source src="경로">
<source src="경로">
</audio>
 
embed
브라우저에 설치되어 있는 플러그인이 필요한 파일을 동작할 때 사용하는 태그
 
하위 브라우저와의 호환성을 유지하기 위해 <object>를 사용해도 된다.
<embed src="경로" width="값" height="값"></embed>
플래시뿐아니라 mid등 플러그인이 있어야 하는 파일들을 재생하는데 사용된다.
 
canvas
빈화면.
자바스크립트 등을 통해 그래프를 그리거나 도형을 그려넣을 수 있다.
모든 요소는 자바스크립트를 이용해서 처리해 주게된다. 
(좀더 공부한 후 자세히 포스팅하겠음)
자세한 내용은 http://www.canvasdemos.com/ 참고.

라이믹스는 이온디와 함께

HTML5/CSS3
-
+
닫기

마이페이지

로그인을 해주세요

네이버로 로그인