ПРОШУ!!!!SOS
Не понимаю, не работают кнопки на видео "фулл скрин" и "playpause", уже почти неделю с этим маюсь, ощущение что не хватает маленькой детальки, НО КАКОЙ неизвестно(
Вот коды HTML и JS: <html> <head> <script src="V.js"></script> <title>Video Player HTML5</title> </head> <body> <div> <video id="video" src="aaa.mp4" width="400" height="300" onClick="PlayPauseVideo()"></video> </div> <br> <div> <input type="button" value="PlayOrPause" onclick="PlayPauseVideo()"/> <input type="button" value="FullScreen" onclick="fullscreen"/> </div> </body> </html> var video; window.onload = function(){ video = documnet.getElementById("video"); } function PlayPauseVideo(){ if(video.paused){ video.play(); } else { video.pause(); } } function fullScreen(){ video.webkidenterfullscreen(); } |
<!DOCTYPE html> <html> <head> <title>Video Player HTML5</title> <script > var video; window.onload = function() { video = document.getElementById("video"); }; function PlayPauseVideo() { if(video.paused) { video.play(); } else { video.pause(); } }; function fullScreen() { if(video.requestFullScreen) { video.requestFullScreen(); } else if(video.webkitRequestFullScreen ) { video.webkitRequestFullScreen(); } else if(video.mozRequestFullScreen) { video.mozRequestFullScreen(); } } </script> </head> <body> <div> <video id="video" src="http://video.kerch.tv/news/65300_001.mp4" width="400" height="300" onclick="PlayPauseVideo()"></video> </div> <br> <div> <input type="button" value="PlayOrPause" onclick="PlayPauseVideo()"/> <input type="button" value="FullScreen" onclick="fullScreen()"/> </div> </body> </html> |
Часовой пояс GMT +3, время: 18:27. |