Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Sharing option is breaking jw player script on Mac Safari browser


Hi
I am facing an issue with loading of jw player if sharing option is enabled.
the following lines of code are breaking

config.sharing = {
code: encodeURI("<iframe src='http://example.com/embed/MEDIAID.html' />"),
link: "http://example.com/page/MEDIAID/"

}

Error generated in consoleTypeError

Error] TypeError: undefined is not a function (evaluating 'd(j.id).getPlaylist()')
setPlaylist (jwplayer.html5.js, line 153)
method (jwplayer.html5.js, line 193)
j (jwplayer.html5.js, line 192)
(anonymous function) (jwplayer.js, line 7)

The moment I disable the sharing option of even leave it blank like sharing :{} the jwplayer fails to load and this error is seen in console.

If i Just reload the page the player appears.
so this becomes and intermittent issue which is occurring on my production.

Kindly extend your appreciated help for the same

1 Community Answers

Randy

JW Player Support Agent  
0 rated :

Hello,

I’ve provided the following basic setup block which seems to work on my end:

<!DOCTYPE html>
<html>
<head>
<script src="http://p.jwpcdn.com/player/v/7.1.4/jwplayer.js"></script>

</head> <body> <div id="container">Loading Your Player…</div>

<script> jwplayer.key="LICENSE HERE"; var playerInstance = jwplayer("container"); playerInstance.setup({ playlist: [{ file: "bunny.mp4", mediaid: "12345" },{ file: "bunny.mp4", mediaid: "67890" }], sharing: { code: encodeURI("<iframe src='http://example.com/embed/MEDIAID.html' />"), link: "http://example.com/page/MEDIAID/" } }); </script>

</body> </html>

Please let me know if this helps.

Randy

This question has received the maximum number of answers.