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

Custom Embed Reference


I am trying to custom embed jwp and these two references seem to contradict each other:

https://support.jwplayer.com/customer/en/portal/articles/1891931-building-custom-embeds-with-player-libraries

https://support.jwplayer.com/customer/portal/articles/1406723#fndtn-advanced

The first uses this syntax:

<script>
jwplayer("container").setup({
playlist: "//content.jwplatform.com/feeds/F2YKWOWd.rss"
}

And the second uses this:

<script type="text/JavaScript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
"playlist": https://content.jwplatform.com/feeds/ioPpI637.json
});

I assume it's a difference in context. Can someone please help me understand which of these pages, (or some other page) I should be using for guidance?

8 Community Answers

George

JW Player Support Agent  
0 rated :

Hi,

There’s no true difference in those two examples. One is just creating a reference to the specific player that will live in myElement and the other one is setting it up without the reference.

rob

User  
0 rated :

Thanks, but I should have been more specific. The setup syntax is what has me puzzled.

The first uses: setup({playlist: "//content.jwplatform.com/feeds/F2YKWOWd.rss"...} which doesn't treat the key as a string, but does treat the value as a string.

The second uses: setup({"playlist": https://content.jwplatform.com/feeds/ioPpI637.json} which treats the key as a string and the value as a URL

I appreciate your patience.

George

JW Player Support Agent  
0 rated :

I see,

Well you could either use:
“playlist”:“https://content.jwplatform.com/feeds/ioPpI637.json”
or
playlist:“https://content.jwplatform.com/feeds/ioPpI637.json”

But
playlist
will not allow the player to setup.

George

JW Player Support Agent  
0 rated :

It seems the link gets assigned to the word between the quotes when using "": on the forum, what I meant to say is:

“playlist” : SOME_LINK
will not allow the player to setup. Most likely a typo

a

User  
0 rated :

“playlist”:https://content.jwplatform.com/feeds/ioPpI637.json

George

JW Player Support Agent  
0 rated :

“playlist”:“https://content.jwplatform.com/feeds/ioPpI637.json”

rob

User  
0 rated :

Thanks George!

Yes, since this IS THE GUIDANCE for advanced embeds in FAQs, seems like an important typo to have corrected.

George

JW Player Support Agent  
0 rated :

All done

This question has received the maximum number of answers.