Add Html5 Player automatically

Asked

Viewed 346 times

0

I am looking for a way to add Html5 player on the pages of my website.

I own mp4 videos, which are soaked.

I would like to transfer these videos in Html5 applying a new player on the page.

Example:

  <embed src="http://meusite.mp4?id=1as5df7asd" width="200" height="200" style="border:1px solid">

I’m looking for a way that every time I have http://meusite.mp4?id=1as5df7asd

a new player is added in Html5 on the page:

<video controls="controls" height="430" poster="" src="http://meusite.mp4?id=1as5df7asd" width="680"></video>

The goal is to play the link in Mp4 that you have on the page inside Html5

this would save me a lot of time, because I would have to search all the articles, and edit them manually.

Some Script checks if there is any embed or link on the page whose address is http://meuite.mp4?id= and ID 1as5df7asd

and finding plays the link or id inside the code Html5.

The object is to turn my videos into mp4 in Html5. as all videos are hosted on a server only the video id is different.

The Embeds are in this format:

Just play the id inside the mp4 link

Making a new player on the page.

  <video controls="controls" height="430" poster="" src="" width="680"></video>
  • Friend what the TAG actionscript-3 and java has to do with your question?

  • Wow you totally changed the context of the issue. All right let’s start from scratch, where these Ids come from?

  • Why don’t you do that server override? in Javascript you’ll have to do every time the page loads... on the server you’d only do it once.

  • @Sergio wants to embed videos from other servers like Uol, youtube, Vimeo, etc within the video tag, but as I said in the reply "You can’t directly access the video and embed it using the <video> tag because google itself blocks or uses dynamic urls", that is to say he wants something seemingly impossible.

1 answer

1

Note: that this is a "chameleon question" (from my point of view) and the answer is about this question /revisions/45339/2

Your initial question:

Q: I own Youtube videos, Vimeo and mp4 videos.

I own that code:

Example 1

<video width="640" height="360" id="player1" preload="none">
     <source type="video/youtube" src="http://www.youtube.com/watch?v=nOEw9iiopwI" />
</video>

The problems

  • The mimetype video/youtube there is no

  • Pages http://www.youtube.com/watch?v=... are of the type text/html, so it’s not the video address but the HTML page address.

  • You cannot directly access the video and "upload it" using the tag <video> because google itself "blockade" or uses "dynamic urls" as:

    https://r1---sn-upfn-bg0l.googlevideo.com/videoplayback?&dur=337.106&expire=1419848481&...&range=0-1031
    

    So this path is totally incorrect

How to share

Youtube and Vimeo itself provide ways to share your videos

  • Vimeo:

    Click on the plane design and copy the generated code, example:

    vimeo share
    (source: vimeocdn.com)

  • Youtube:

    With Youtube you can embark a flash player:

    <object height="350" width="425">
    <param name="movie" value="http://www.youtube.com/v/OdT9z-JjtJk" />
    <embed height="350"
           src="http://www.youtube.com/v/OdT9z-JjtJk"
           type="application/x-shockwave-flash" width="425"></embed>
    </object>
    

    Or use <iframe> (recommendable):

    <iframe allowfullscreen="" width="420" height="315"
            src="http://www.youtube.com/embed/UkWd0azv3fQ#t=2m30s"></iframe>
    

Browser other questions tagged

You are not signed in. Login or sign up in order to post.