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();
                    }
                });
            }

肯定会打开窗口,但所有 Browser 的大小都不相同

然后它通过一个视频发布到另一个视图,例如:

<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)支持的视频的最简单方法??????

-非常感谢....

4

1 回答 1

0

好的,我通过使用 jwPlayer 库得到了答案。

-感谢您的宝贵回复...

http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/22420/embedding-with-webm-and-mp4-source/

于 2013-03-05T06:50:04.170 回答