Moodle的TinyMCe编辑器和javascript(kaltura播放器)

时间:2014-05-12 19:38:46

标签: javascript html tinymce moodle kaltura

我尝试使用Kaltura的JS嵌入在Moodle课程的内容页面中添加视频播放器。嵌入看起来如下:

<script src="http://cdnapi.kaltura.com/p/"></script>
<div id="kaltura_player_" style="width: 530px; height: 327px;"
itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<span itemprop="name" content="Letter"></span>
<span itemprop="description" content="A case study."></span>
<span itemprop="duration" content="233"></span>
<span itemprop="thumbnail"
content="http://cdnbakmi.kaltura.com/p"></span>
<span itemprop="width" content="530"></span>
<span itemprop="height" content="327"></span>
</div>
<script>
kWidget.embed({
 "targetId": "kaltura_player_",
 "wid": "_1410652",
 "uiconf_id": 21346902,
 "flashvars": {
   "akamaiHD": {
     "loadingPolicy": "preInitialize",
     "asyncInit": "true"
   },
   "streamerType": "hdnetwork"
 },
 "cache_st": 139585,
 "entry_id": "0_jd9t3gbd"
});
</script>

将上述内容保存到Tiny MCE编辑器(作为HTML)的内容部分后,它将我引导到包含每个内容部分的汇总编辑页面,在那里我可以看到视频播放器正常工作/播放的部分。但是,在内容页面的预览期间,它仅在输入标记内显示损坏的js代码:

<input type="submit" value="// 
 kWidget.embed({
 &quot;targetId&quot;: &quot;kaltura_player_,
 &quot;wid&quot;: &quot;_1410652&quot;,
 &quot;uiconf_id&quot;: 21346902,
 &quot;flashvars&quot;: {
 &quot;akamaiHD&quot;: {
 &quot;loadingPolicy&quot;: &quot;preInitialize&quot;,
 &quot;asyncInit&quot;: &quot;true&quot;},
 &quot;streamerType&quot;: &quot;hdnetwork&quot;},
 &quot;cache_st&quot;: 1395856314,
 &quot;entry_id&quot;: &quot;0_jd9t3gbd&quot;
    });
// ]]>">

预览中未显示任何播放器。然后,我回到编辑模式,进入HTML模式的MCE文本编辑器,发现它已被改为:

<p></p>
<div id="kaltura_player_" style="width: 530px; height: 327px;" itemprop="video" itemscope="" itemtype="http://schema.org/VideoObject"></div>
<p>
<script type="text/javascript">// <![CDATA[
kWidget.embed({
 "targetId": "kaltura_player",
 "wid": "_1410652",
 "uiconf_id": 21346902,
 "flashvars": {
   "akamaiHD": {
     "loadingPolicy": "preInitialize",
     "asyncInit": "true"
   },
   "streamerType": "hdnetwork"
 },
 "cache_st": 5856314,
 "entry_id": ""
});
// ]]></script>
</p>

这是Moodle的问题吗?还是一个微小的MCE问题?或两者?是否有我错过的安全配置设置?有谁知道哪些组件正在改变js代码?任何帮助将不胜感激!

0 个答案:

没有答案