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

Universal Subtitles Embed Player

Discussion in 'Styling and Customization Questions' started by Gabriel Pinho, May 12, 2012.

  1. Gabriel Pinho

    Gabriel Pinho Member

    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?
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Jake Bunce and Gabriel Pinho like this.
  3. Gabriel Pinho

    Gabriel Pinho Member

    I tried, but didnt work... :( Did i something wrong?

    Capture3.PNG
    Capture2.PNG

    Capture1.PNG
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    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.
     
    Jake Bunce and Gabriel Pinho like this.
  5. Gabriel Pinho

    Gabriel Pinho Member

    Thanks!!!!!!! Thats work!!!!! :love:

    Capture.PNG
     
    Yorick likes this.

Share This Page