gpt4 book ai didi

javascript - Kaltura - onKdpReady 从未调用过

转载 作者:行者123 更新时间:2023-12-03 12:11:29 27 4
gpt4 key购买 nike

我的html代码

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>TEST</title>

</head> <body> <object id="kaltura_player_1406237220" name="kaltura_player_1406237220" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="333" width="400" bgcolor="#000000" style="width: 400px; height: 333px;" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video" resource="https://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an" data="https://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an"> <param name="allowFullScreen" value="true" /> <param name="allowNetworking" value="all" /> <param name="allowScriptAccess" value="always" /> <param name="bgcolor" value="#000000" /> <param name="flashVars" value="emptyF=onKdpReady&readyF=onKdpReady" /> <param name="movie" value="https://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an" />

<a rel="media:thumbnail" href="http://cdnbakmi.kaltura.com/p/1737042/sp/173704200/thumbnail/entry_id/1_jghjj7an/version/100000/acv/101"></a> <span property="dc:description" content=""></span> <span property="media:title" content="1mb.mp4"></span> <span property="media:width" content="400"></span> <span property="media:height" content="333"></span> <span property="media:type" content="application/x-shockwave-flash"></span> <a href="http://corp.kaltura.com/products/video-platform-features">Video Platform</a> <a href="http://corp.kaltura.com/Products/Features/Video-Management">Video Management</a> <a href="http://corp.kaltura.com/Video-Solutions">Video Solutions</a> <a href="http://corp.kaltura.com/Products/Features/Video-Player">Video Player</a> </object> </body> </html>

我的JS代码

function onKdpReady(playerId) {
alert("THIS IS NEVER CALLED");
}

这是 JSFiddle:

http://jsfiddle.net/5ugsr/2/

我使用了这个例子:

http://www.kaltura.org/kdp_js_api_demo_page.html

我不知道我是否遗漏了什么或者这是否是一个错误。

另外一个问题是,我希望它与 HTML5 播放器兼容,这可以解决问题还是我必须做其他事情?

最佳答案

您使用https,测试页面是http - javascript通信必须采用相同的协议(protocol)。另外,由于 jsfiddler 上的某些原因,您需要将函数放入 html 中(不要问我为什么)

例如:

        <object id="kaltura_player_1406237220" name="kaltura_player_1406237220" type="application/x-shockwave-flash" allowFullScreen="true" allowNetworking="all" allowScriptAccess="always" height="333" width="400" bgcolor="#000000" style="width: 400px; height: 333px;" xmlns:dc="http://purl.org/dc/terms/" xmlns:media="http://search.yahoo.com/searchmonkey/media/" rel="media:video"
resource="http://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an" data="http://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an">
<param name="allowFullScreen" value="true" />
<param name="allowNetworking" value="all" />
<param name="allowScriptAccess" value="always" />
<param name="bgcolor" value="#000000" />
<param name="movie" value="http://cdnapisec.kaltura.com/index.php/kwidget/cache_st/1406237220/wid/_1737042/uiconf_id/25101282/entry_id/1_jghjj7an" />


</object>
<script>
function jsCallbackReady(pid){
alert(pid);
}
</script>

关于javascript - Kaltura - onKdpReady 从未调用过,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24944379/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com