"HTML5 비디오 video.js 자막 track 태그"의 두 판 사이의 차이

잔글 (봇: Jmnote bot의 2017-06-26T18:48:47Z 에 작성한 267657 판으로 되돌림)
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
4번째 줄: 4번째 줄:


==예시==
==예시==
<source lang='html5'>
<syntaxhighlight lang='html5'>
<link href="http://vjs.zencdn.net/5.4.4/video-js.css" rel="stylesheet">
<link href="http://vjs.zencdn.net/5.4.4/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.4.4/video.js"></script>
<script src="http://vjs.zencdn.net/5.4.4/video.js"></script>


<video class="video-js vjs-default-skin" controls preload="auto" width="400" height="300" data-setup="{}">
<video class="video-js vjs-default-skin" controls preload="auto" width="400" height="300" data-setup="{}">
<source src='https://upload.wikimedia.org/wikipedia/en/d/dc/Pac-Man_Atari_2600_footage.ogv' type='video/ogg' />
<syntaxhighlight src='https://upload.wikimedia.org/wikipedia/en/d/dc/Pac-Man_Atari_2600_footage.ogv' type='video/ogg' />
<track kind="subtitles" srclang="en" label="English" src="pacman-en.vtt" />
<track kind="subtitles" srclang="en" label="English" src="pacman-en.vtt" />
<track kind="subtitles" srclang="ko" label="Korean" src="pacman-ko.vtt" default />
<track kind="subtitles" srclang="ko" label="Korean" src="pacman-ko.vtt" default />
</video>
</video>
</source>
</syntaxhighlight>
*예제: http://example.zetawiki.com/html5/pacman-video-js-vtt.html
*예제: http://example.zetawiki.com/html5/pacman-video-js-vtt.html


==vtt 파일==
==vtt 파일==
;pacman-en.vtt
;pacman-en.vtt
<source lang='text'>
<syntaxhighlight lang='text'>
WEBVTT FILE
WEBVTT FILE


32번째 줄: 32번째 줄:
00:00:05.000 --> 00:00:06.000
00:00:05.000 --> 00:00:06.000
Pacman The End
Pacman The End
</source>
</syntaxhighlight>
;pacman-ko.vtt
;pacman-ko.vtt
<source lang='text'>
<syntaxhighlight lang='text'>
WEBVTT FILE
WEBVTT FILE


48번째 줄: 48번째 줄:
00:00:05.000 --> 00:00:06.000
00:00:05.000 --> 00:00:06.000
팩맨 The End
팩맨 The End
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 00:55 판

HTML5 비디오 track 태그
HTML5 비디오 자막넣기

1 예시

<link href="http://vjs.zencdn.net/5.4.4/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/5.4.4/video.js"></script>

<video class="video-js vjs-default-skin" controls preload="auto" width="400" height="300" data-setup="{}">
	<syntaxhighlight src='https://upload.wikimedia.org/wikipedia/en/d/dc/Pac-Man_Atari_2600_footage.ogv' type='video/ogg' />
	<track kind="subtitles" srclang="en" label="English" src="pacman-en.vtt" />
	<track kind="subtitles" srclang="ko" label="Korean" src="pacman-ko.vtt" default />
</video>

2 vtt 파일

pacman-en.vtt
WEBVTT FILE

1
00:00:00.000 --> 00:00:02.000
Pacman Hello~

2
00:00:02.000 --> 00:00:04.000
Pacman World~

3
00:00:05.000 --> 00:00:06.000
Pacman The End
pacman-ko.vtt
WEBVTT FILE

1
00:00:00.000 --> 00:00:02.000
팩맨 안녕~

2
00:00:02.000 --> 00:00:04.000
팩맨 친구들~

3
00:00:05.000 --> 00:00:06.000
팩맨 The End

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}