YouTube 소스를 지원하는이 html5 비디오 플레이어를 발견했습니다. 하지만 전체 화면 버튼이 없으므로 전체 화면 기능을 구현하기 시작했습니다. 내 문제는 이제 크롬이나 사파리에서 비디오가 100 % 너비를 차지하지 않는다는 것입니다 (실제로는 전체 크기가 아니라 모든면에서 검은 색 틈이 있습니다).HTML5 동영상 전체 화면 버튼
$('.video-fullscreen-btn', player).bind('click', function(e){
if (player.requestFullscreen) {
player.requestFullscreen();
} else if (player.msRequestFullscreen) {
player.msRequestFullscreen();
} else if (player.mozRequestFullScreen) {
player.mozRequestFullScreen();
} else if (player.webkitRequestFullscreen) {
player.webkitRequestFullscreen();
}
});
가 나는 또한
:-webkit-full-screen video {width: 100%; height: 100%;}
가 여전히 작동하지 않는 CSS를 웹킷과 그것을 시도 :
나는이 스크립트를 사용했다. 누군가 크롬/사파리에서 작동하지 않는 이유를 알고 있습니까?
전체 예
는 여기에서 찾을 수 있습니다 : http://jsfiddle.net/Z5PTv/