0
我想在點擊鏈接的新窗口中打開一個.mp4視頻。如何在所有瀏覽器支持的情況下在新窗口中打開視頻
現在,我使用這個函數打開新窗口:
function showCreateProfilePopup()
{
var myAjax = $.ajax({
url: '<?php echo $this->config->item('url'); ?>info/createProfileVideo',
type: "POST",
success: function(response) {
var windowWidth = 625;
var windowHeight = 500;
var centerWidth = (window.screen.width - windowWidth)/2;
var centerHeight = (window.screen.height - windowHeight)/2;
myWindow = window.open('','Video','width='+windowWidth+', height='+windowHeight+',scrollbars=no,resizable=no, innerWidth='+windowWidth+', innerHeight='+windowHeight+',left='+centerWidth+',top='+centerHeight);
myWindow.document.write(response);
myWindow.focus();
}
});
}
肯定它會打開窗口,但不大小相同的所有瀏覽器。
,它後另一種觀點認爲一個視頻 像 後:
<video controls="controls" poster="<?php echo $this->config->item('content_url'); ?>/images/scrublyVideo.png" width="610" height="450">
<source src="<?php echo $this->config->item('content_url'); ?>video/createProfileHelpVideo.mp4" type="video/mp4" />
<object width='610' height='450' id='player' name='player'>
<param name="movie" value="<?php echo $this->config->item('content_url'); ?>video/createProfileHelpVideo.mp4" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="autoStart" value="false">
<img alt="Scrubly" src="<?php echo $this->config->item('content_url'); ?>/images/scrublyVideo.png" width="640" height="360" title="Scrubly Create Profile Help" />
<embed src='<?php echo $this->config->item('content_url'); ?>video/createProfileHelpVideo.mp4' type='Svideo/mp4' allowfullscreen='true' allowscriptaccess='always' width='600' height='450'/>
</object>
</video>
誰能告訴我打開視頻,其所有的瀏覽器(Mozilla的,Chrome和Safari)支持最簡單的方法? ???
-Thanks很多....
''
你已經使用html目標打開窗口onclick爲def,但不知道視頻支持 – Vineet1982 2013-03-05 06:12:00