Adds Html5 Player automatically

0

I'm looking for a way to add the Html5 player to the pages on my site.

I own videos in mp4, which are embedded.

I would like to convert these videos into Html5 by 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 link

A new Html5 player is added on the page:

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

The goal is to play the Mp4 link 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 whose address is link and ID 1as5df7asd

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

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

Embed is in this format:

Just play the id into the link in mp4

Making a new player on the page.

  <video controls="controls" height="430" poster="" src="" width="680"></video>
    
asked by anonymous 28.12.2014 / 19:47

1 answer

1
  

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

Your initial question:

  

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

     

I have this 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>

Theproblems

  • Mimetypevideo/youtubedoesnotexist

  • Pageshttp://www.youtube.com/watch?v=...aretypetext/html,soitisnotthevideoaddressbuttheHTMLpageaddress.

  • Youcannotdirectlyaccessthevideoand"embark" it by using the <video> tag because it itself "blocks" 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 wrong

How to share

YouTube and Vimeo itself provide ways to share your videos

  • Vimeo :

    Click the airplane drawing and copy the generated code, for example:

  • Youtube :

    With YouTube you can upload 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> (recommended):

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