I'm trying to add a video player inside a content page of a lesson on Moodle using Kaltura's JS embed. The embed looks like the following:
<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>
After saving the above into a content section in a Tiny MCE editor (as HTML), it directed me to a summarized edit page with each content section, where I can see the section with the video player working/playing just fine. However, during the preview of the content page, it only showed broken js code inside an input tag:
<input type="submit" value="//
kWidget.embed({
"targetId": "kaltura_player_,
"wid": "_1410652",
"uiconf_id": 21346902,
"flashvars": {
"akamaiHD": {
"loadingPolicy": "preInitialize",
"asyncInit": "true"},
"streamerType": "hdnetwork"},
"cache_st": 1395856314,
"entry_id": "0_jd9t3gbd"
});
// ]]>">
With no player displayed on the preview. Afterwards, I went back into edit mode, into the MCE text editor in HTML mode, and found that it has been altered into this:
<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>
Is this a Moodle issue? Or a Tiny MCE issue? or both? Is there a security config setting that I've missed? Would anyone know which of these components are altering the js code? Any help would be greatly appreciated!