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

"No media_id found" error


I am trying to embed a youtube video into my site,
I am using the cloud-hosted library found on my dashboard.
and my embed code looks like this:

<script type="text/javascript">
var playerInstance = jwplayer("videospace");
playerInstance.setup({
file: "//www.youtube.com/watch?v=W4DG0qRCTdo",
width: 640,
height: 360
});
</script>

I tried to follow the instructions to get a media_id here: https://support.jwplayer.com/customer/en/portal/articles/2083166-troubleshooting-data-capture-issues
but i couldnt not see the API section on the dashboard. also, we upload a lot of content to youtube, i would hate to have to import each and every video first via the dashboard.
is there really no simple way to embed youtube videos?

thanks!

4 Community Answers

Jessenia

JW Player Support Agent  
0 rated :

It appears you are missing the media ID parameter in your embed code.

If using the dashboard:

  1. Navigate to the “Videos”: tab under Content.
  2. Add externally-hosted URL
  3. Copy the Media ID from the content-detail page
  4. Reference the Media ID in your embed code

Your embed code should look similar to this:

<script type="text/javascript">
var playerInstance = jwplayer("videospace");
playerInstance.setup({
file: "//www.youtube.com/watch?v=W4DG0qRCTdo",
mediaid: "eXaMPlE1",
width: 640,
height: 360
});
</script>

Hope this helps!

k...

User  
0 rated :

Hi!

Thanks for the response.
As i indicated, we have a lot of content that goes up to the youtube channel.
We cannot go in and manually enter the youtube URL each and every time we upload a new video there.
is there no other way to use the player for YT embeds? (it used to be so easy!)

Thanks!

Jessenia

JW Player Support Agent  
0 rated :

We have a document, called Batch Migrations, within our Developer Portal that explains how to prepare a CSV ingest sheet of all your files (external URLs). You can then use our API to upload that batch of files in the CSV and collect the Media IDs with the /videos/create call.

Your programatic process of batch importing should follow this basic workflow:

  1. Open the ingest CSV and parse it into an array or list
  2. Parse the header column and assume the remaining rows are each video
  3. Loop over each video row and call the ‘/videos/create’ endpoint, creating a video record for each
  4. Expected output would contain the video_key created by the JWPlatform (Media IDs)

With a batch upload of your content you will get all of your Media ID’s at once so that you can apply them to each applicable embeds.

k...

User  
0 rated :

ok, thanks

This question has received the maximum number of answers.