JWPlayer 不错,但它缺少一个好的界面。我已经能够将 jwplayer 嵌入到 prettyphoto 中,这为我解决了很多问题。
有一篇文章描述了如何做到这一点位于http://forums.no-margin-for-errors.com/discussion/5671/how-to-integrate-jwplayer-in-prettyphoto-with-flash-and- html5/p1
一旦你开始工作,我的建议是让 url 包含 GET vars,其中包含要播放的文件名。使用 PHP 创建一个 href 将触发 prettyphoto/jwplayer 打开和播放文件。
另外,我给你的链接上的说明对我不起作用。我不得不修改它们,但这里是让它工作的代码:
case 'jwplayer':
pp_dimensions = _fitToViewport(movie_width,movie_height); // Fit item to viewport
controlbar_height = 29; //Allow for JWplayer's bar
pp_dimensions['height']+=controlbar_height;pp_dimensions['contentHeight']+=controlbar_height;pp_dimensions['containerHeight']+=controlbar_height;
jwplayer_settings = {flashplayer: '/jwplayer/player.swf', controlbar: 'bottom', skin: '/jwplayer/jwplayer_skin.zip', autostart: true, id: 'jwplayer1'};
jwplayer_settings.width = pp_dimensions['width'];
jwplayer_settings.height= pp_dimensions['height'];
jwplayer_settings.file = pp_images[set_position];
skipInjection = true;
/* include jwplayer JS embedder */
$.getScript('/jwplayer/jwplayer.js', function() {
jwplayer("pp_full_res").setup(jwplayer_settings);
_showContent();
});
break;