kaltura / mwEmbed

Kaltura's Cross Platform Video Player ToolKit
http://player.kaltura.com
GNU Affero General Public License v3.0
210 stars 137 forks source link

HTML5 player not working #710

Open basvandijk opened 10 years ago

basvandijk commented 10 years ago

I have a problem with dynamically embedding a Kaltura player on my page with the "Kaltura.LeadWithHTML5" parameter set to "true". After calling kWidget.embed(...) a black box appears on the page with no player loaded. I do see that an iframe has been created which contains a video element. The video element however doesn't contain a "src" attribute. What could be the reason for this?

Note that if I disable the "Kaltura.LeadWithHTML5" parameter a flash player is embedded which correctly plays my video.

I tried upgrading the Kaltura library from 1.9.6 to 2.11 but that didn't help. The same problems occurs on Chrome, Firefox and Safari on iOS.

mdale commented 10 years ago

the html5 player could have issues in retrieving the sources ? Is this operation working against the kaltura API? or an onPrem installation? I would be sure to enable error handling in php see if it gives you in clues as to why it was not able to fully build out.

basvandijk commented 10 years ago

Is this operation working against the kaltura API? or an onPrem installation?

I'm using the Kaltura SaaS offering. So it's working against the Kaltura API.

itaykinnrot commented 10 years ago

Can you share a link with the embed code?

basvandijk commented 10 years ago

Here's a link to a standalone page with the player copied from the "Preview & Embed" page:

http://www.kaltura.com/index.php/extwidget/preview/partner_id/1724401/uiconf_id/24758201/entry_id/1_41psxz9r/embed/dynamic

It essentially boils down to the following HTML and JavaScript:

<script src="https://www.kaltura.com/p/1724401/sp/172440100/embedIframeJs/uiconf_id/24758201/partner_id/1724401"></script>
<div id="kaltura_player_1403472745">
<script>
kWidget.embed({
"targetId": "kaltura_player_1403472745",
"wid": "_1724401",
"uiconf_id": 24758201,
"flashvars": {},
"entry_id": "1_41psxz9r"
});
</script>

I use the same code on our production site but it somehow fails there. Note that it even fails if I embed the player using autoEmbed.

itaykinnrot commented 10 years ago

hi @basvandijk i just check it - and its working for me - can you send me a production url?

basvandijk commented 10 years ago

can you send me a production url?

I'll try to produce one in the next couple of days.

Thanks for your help so far.

basvandijk commented 9 years ago

Ok I found the bug in the Kaltura library. If the id of your div has '.'s in it like:

<div id="foo.bar.qux">

the player doesn't load properly. This is probably caused by not escaping or quoting the id string properly in a jquery selector somewhere.

mdale commented 9 years ago

created test file: http://player.kaltura.com/modules/KalturaSupport/tests/EmbedTargetIdWithPeriods.qunit.html

@itaykinnrot this is in-fact a minor issue we could probably fix relatively easily by escaping the id var early on.

basvandijk commented 9 years ago

This shows exactly the behavior I'm seeing. A video tag is present but it doesn't have a src atribute.

gregrgay commented 6 years ago

My solution to this same problem was to revert from html5lib v2.67 to v2.46 The list of available versions is in: /opt/kaltura/web/html5/html5lib

As admin, under the UI Confs tab, select Edit from the Action menu, next to the player you want to edit, then in the dialog that opens, change the version number in the HTML5 URL field. Once the HTML5 version was updated, the src attribute reappears.