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

How to embed videos dynamically using media-id instead of file

As per the document, we have to specify file path with extension to load a video. Is there any option to specify media id instead of file? In our current application, we are using a different video player, which was using only a video id (similar to JW player's media_id). Based on that video id, it will automatically identify the file path and file type. Please help me to find a similar solution.

1 Community Answers


JW Player Support Agent  
0 rated :

You can use our single-line embed method, which requires only one line of code; it contains a player ID, a media ID, and javascript JW Player library reference.

Navigate to your video in the Manage section of your dashboard. In the Content Detail page of that video, click on the red Embed button and a pop-up will appear to “Generate Embed Code.” Select your player, copy the code, and embed in the <body> of your page.

The embed code itself looks like this:

<script src="//"></script>

Because this embed references a JW Player Cloud-Hosted Player, the embedded player can be changed any time (from the dashboard or via the API), and those changes will be reflected live.

This question has received the maximum number of answers.