Javascript 如何在iframe中获取视频的持续时间?
我想知道如何获得iframe中youtube视频的持续时间(秒)。我真的不知道我应该使用PHP还是JS,所以我欢迎任何建议。这是我的iframe:Javascript 如何在iframe中获取视频的持续时间?,javascript,php,jquery,iframe,Javascript,Php,Jquery,Iframe,我想知道如何获得iframe中youtube视频的持续时间(秒)。我真的不知道我应该使用PHP还是JS,所以我欢迎任何建议。这是我的iframe: <iframe width='420' height='315' id='video_player' src='https://www.youtube.com/embed/0rVwuowU6Fs' frameborder='1' allowfullscreen></iframe> 感谢您的回答。iframe的可能副本是h
<iframe width='420' height='315' id='video_player' src='https://www.youtube.com/embed/0rVwuowU6Fs' frameborder='1' allowfullscreen></iframe>
感谢您的回答。iframe的可能副本是https,无法使用javascript访问此内容,那么您只能使用google api。很好,谢谢您的建议。