使用JavaScript在iPhone Safari上攻击QuickTime播放器

时间:2014-10-31 12:03:51

标签: javascript ios iphone mobile quicktime

Apple曾经在其平台上限制我们的想法。

我在这里关注的是我们如何添加触发onEventListener" click"使用JavaScript的QuickTime播放器中的事件。

假设我们从HTML5视频代码中打开视频。

2 个答案:

答案 0 :(得分:1)

对于视频文件,最好在html5中使用embed标签

<embed width="260" height="282" src="'+file location+'" showstatusbar="true" showgotobar="true" showdisplay="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" name="rTuner" AUTOSTART="false"/>

音频

<embed  height="50" width="180" name="plugin" src="'+file location+'" type="audio/x-wav" controls AUTOSTART="false"/>

答案 1 :(得分:1)

我有视频文件列表

$('ul#totalFileList').on('click','.playRecorded',function(){
                        var lessonName = $(this).attr('id')                     if(lessonName.contains(".mov") || lessonName.contains(".mp4") || lessonName.contains(".avi") || lessonName.contains(".wmv")  || lessonName.contains(".wma"))
                        {
                            $('ul#viewOtherFiles').children('li').children('embed').each(function( index ){
                                $('ul#viewOtherFiles').children('li').children('embed').remove();
                            });

                            $(this).after('<embed width="260" height="282" src="'+uploadUrl+lessonName+'" showstatusbar="true" showgotobar="true" showdisplay="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" type="application/x-mplayer2" name="rTuner" AUTOSTART="false"/>');
                        }
});
相关问题