336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
/*
mpeg4 : canPlayType('video/mp4; codecs="mp4v.20.8"')
h264 : canPlayType('video/mp4; codecs="avc1.42E01E"')
webm : canPlayType('video/webm; codecs="vp8"')
ogg : canPlayType('video/ogg; codecs="theora"')
리턴값이 probably, maybe -> 둘 중 하나면 지원한다
*/
function supportsH264Ogg() {//h264 나 theora 지원여부 체크
var obj = document.querySelector("#video");
var ogg = obj.canPlayType('video/ogg; codecs="theora"');
var h264 = obj.canPlayType('video/mp4; codecs="avc1.42E01E"');
var oggSup = false;
var h264Sup = false;
if(ogg=='probably' || ogg=='maybe'){
oggSup = true;
}
if(h264=='probably' || h264=='maybe'){
h264Sup = true;
}
if(h264Sup==true || oggSup==true){
return true;
}else{
return false;
}
}
function notSupport(v){
if(supportsH264Ogg()==false){
alert('둘다 지원안함');
}
}
'컴터 > html5' 카테고리의 다른 글
[html5] 안드로이드 브라우저에서 video 태그 사용하기 (2) | 2010.09.10 |
---|---|
iPad(아이패드) 사파리 코딩시 QUOTA_EXCEEDED_ERR 에러 날때. (0) | 2010.08.18 |
[html5 예제] video 태그위에 자막 비슷하게 (3) | 2010.06.26 |
[html5 동영상] 인코딩 유틸 (ogg theora, H.264) (3) | 2010.06.24 |