• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Universal Subtitles Embed Player

#1
Hi,

I want to embed the Universal Subtitle, thats a cool site do translate videos. http://www.universalsubtitles.org

Code:
<script type="text/javascript" src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">
(
  {"video_url": "http://www.youtube.com/watch?v=VXvMF2UHIN8"}
)
</script>
But using de BB Media Code not working for that, any idea to add this code via bbcode?
 

Chris D

XenForo developer
Staff member
#2
How exactly do you want this to work?

In my mind, it would have to be that Universal Subtitles handles the embedding of all YouTube, Vimeo etc. videos. So this would involve amending the embed code for each BB Code Media Site.

So... YouTube:

Go to Admin CP
Go to BB Code Media Site
Click YouTube

Under "Embed HTML"

Remove:

Code:
<iframe width="500" height="300" src="http://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>
Replace with:

Code:
<script type="text/javascript" src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">
(
  {"video_url": "http://www.youtube.com/watch?v={$id}"}
)
</script>

It'd be slightly different for others, but that definitely works for YouTube.
 
#3
How exactly do you want this to work?

In my mind, it would have to be that Universal Subtitles handles the embedding of all YouTube, Vimeo etc. videos. So this would involve amending the embed code for each BB Code Media Site.

So... YouTube:

Go to Admin CP
Go to BB Code Media Site
Click YouTube

Under "Embed HTML"

Remove:

Code:
<iframe width="500" height="300" src="http://www.youtube.com/embed/{$id}?wmode=opaque" frameborder="0" allowfullscreen></iframe>
Replace with:

Code:
<script type="text/javascript" src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">
(
  {"video_url": "http://www.youtube.com/watch?v={$id}"}
)
</script>

It'd be slightly different for others, but that definitely works for YouTube.
I tried, but didnt work... :( Did i something wrong?

Capture3.PNG
Capture2.PNG

Capture1.PNG
 

Chris D

XenForo developer
Staff member
#4
The correct syntax is:

[media=youtube]VXvMF2UHIN8[/media]

Or, the way BB Code Media Sites work is you can just paste the whole YouTube URL in and it should automatically parse it for you.

One thing I've just noticed, is the video doesn't appear straight after posting. You have to refresh the page first. This will be some sort of javascript quirk.