WordPress.org

Ready to get started?Download WordPress

Forums

How to embed an Amara video on a post (13 posts)

  1. AAlamix
    Member
    Posted 1 year ago #

    Hi,

    Amara provides an embedding code, it is this one:

    <script type="text/javascript" src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">
    (
    {"video_url": "http://www.youtube.com/watch?v=A-1NdhBn-nI"}
    )
    </script>

    So in writing a new post, I go to the text editor, paste that code and wrap it with the code tags.

    But it is not working. The post looks blank. It has, for some reason, worked once when previewing the post before publishing. So I am wondering if my browser just fails to load it.</p>
    <p>This is the post, there should appear a subtitled video on the top, just before the text. Can you see something at all?`

    Here is the link to the post:
    http://glocalspanish.com/2013/05/08/doppelganger-de-elphomega/

  2. pinguinos
    Member
    Posted 8 months ago #

    clear your text
    save empty editor
    use only editor DO NOT CHANGE BACK TO VISUAL
    it ll break the code!!!
    just edit html in editor and save.
    and GO TO PAGE - CLOSE EDITING PAGE
    DO NOT USE VISUAL EDITOR ON THIS PAGE
    should wotk

  3. Or... you could just post the YouTube URL in your post and not mess with pasting javascript code into the Text editor.

    Wrap the YouTube URL in [embed]...[/embed] if you want to be sure.

    Pasting Javascript into the editor will just lead to massive grief later on. It's too easy to switch back to the visual editor by mistake.

  4. pinguinos
    Member
    Posted 8 months ago #

    yes better but
    how you go around using VIMEO video link?

  5. Same thing, Vimeo supports embeds too. Just paste the Vimeo URL into your post. If that does not work the wrap the URL in [embed] as described above.

    See http://codex.wordpress.org/Embeds for more information.

  6. Jeremy Clarke
    Member
    Posted 8 months ago #

    Jan Dembowski I don't think you understand what Amara is and why it's tragic embed code is needed. It's a meta-captioning/translation service that works with various video hosting sites to embed the original video with translations on top:

    http://www.amara.org/en/

    Their embed code, as pinguinos as figured out, is a nightmare. It JUST BARELY squeaks through the filters of the HTML editor IF you remove a bunch of whitespace that WP converts to <p> tags. It's 100% unstable in the visual editor.

    I wrote a small plugin that allows you to enable Amara on videos in WordPress:

    https://github.com/jeremyclarke/amara-embeds-for-wordpress/blob/master/amara-embeds-for-wordpress.php

    Hopefully Amara will update their embed code to be compatible with WP. I've been trying to get their attention onto the issue for years.

  7. *Reads, looks at link. Oh cool! Universal subtitles.*

    Ha! Thanks for explaining it out for me. I totally misunderstood. Thanks for that. ;)

  8. esmi
    Forum Moderator
    Posted 8 months ago #

    That is cool! It would be great for adding accessible captioning to videos.

    @Jeremy Clarke: Who have you been speaking to at Amara? I can think of quite a few people who would also like to persuade Amara to make some changes. In the meantime, have you thought about submitting your plugin to the WPORG Repo?

  9. I was thinking of pinging you about this thread. After visiting that site the first thing I thought was a11y. ;)

  10. esmi
    Forum Moderator
    Posted 8 months ago #

    I'm sure the a11y group would be very keen to try and put some pressure on Amara if they can. In fact, I've tagged this topic for their attention.

    It would also be great if we could feature Jeremy's plugin on the Make WordPress Accessible site. Doubly so if it was in the Plugin Repo.

  11. jdragojevic
    Member
    Posted 3 months ago #

    Hi - janet here, from amara.org. Sorry to be late to the party. We have a new embedder / transcript viewer in the works, http://amara.org/en/embedder-offsite/ that is a much simpler embed than the old one.

    <script type="text/javascript" src='http://amara.org/embedder-iframe'>
    </script>
    <div class="amara-embed" data-height="480px" data-width="854px" data-url="http://www.youtube.com/watch?v=5CKwCfLUwj4">
    </div>

    We love to work with wordpress to get something that would be accessible for all.

  12. Joe Dolson
    Member
    Posted 3 months ago #

    Do you have an Oembed implementation for Amara? That would be one of the easiest ways to do an integration with WordPress.

  13. pricklepantz
    Member
    Posted 3 months ago #

    Hi, is there a way to embed it on WordPress.com blog? when i copy paste the code, it adds CDATA bracket like this
    <script src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">// <![CDATA[
    ( {"video_url": "http://www.youtube.com/watch?v=gyQXlHjoJWo"})
    // ]]></script>

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic