html5 커스텀 비디오 문제

html5 커스텀 비디오 문제

QA

html5 커스텀 비디오 문제

본문

안녕하세요 우선 그누보드 관련 문제 아니고 소스 문제인데 죄송합니다ㅠ

 

지금 커스텀 비디오플레이어를 만들고 있는데..

http://minho.dothome.co.kr/video/

원래는 영상이 딱 1분 컷으로 나오는데 여기서는 1분 1초로 나와서 골머리를 썩고 있는데 뭐가 문제인지 모르겠네요.. 

 

스크립트 코드 중에


function updateProgress() {
seek.value = Math.floor(video.currentTime);
progressBar.value = Math.floor(video.currentTime);
var bufferedEnd = video.buffered.end(video.buffered.length - 1);
var duration =  video.duration;
if (duration > 0) {
document.getElementById('buffered-amount').style.width = ((bufferedEnd / duration)*100) + "%";
}
var duration =  video.duration;
  if (duration > 0) {
document.getElementById('progress-amount').style.width = ((video.currentTime / duration)*100) + "%";
}
}
 
// updateSeekTooltip uses the position of the mouse on the progress bar to
// roughly work out what point in the video the user will skip to if
// the progress bar is clicked at that point
function updateSeekTooltip(event) {
var skipTo = Math.round((event.offsetX / event.target.clientWidth) * parseInt(event.target.getAttribute('max'), 10));
seek.setAttribute('data-seek', skipTo)
var t = formatTime(skipTo);
seekTooltip.textContent = `${t.minutes}:${t.seconds}`;
var rect = video.getBoundingClientRect();
seekTooltip.style.left = `${event.pageX - rect.left}px`;
}
 
// skipAhead jumps to a different point in the video when the progress bar
// is clicked
function skipAhead(event) {
  var skipTo = event.target.dataset.seek;
  video.currentTime = skipTo;
  progressBar.value = skipTo;
  seek.value = skipTo;
}

이 부분이 있는데 제가 추측할 때는여기서 잘못된것 같습니다.. 뭐가 문제인걸까요..ㅠ

정말 죄송하지만 부탁드립니다...

이 질문에 댓글 쓰기 :

답변 1

답변을 작성하시기 전에 로그인 해주세요.
전체 38
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT