0

I am breaking my head with this html5 video tag for the past few hours. I have checked the answers in this site and nothing works for me.

I want to load a video file on andriod phones version 2.3 and above. Any help will be highly appreciatable. I took code from this url: HTML5 Video Javascript

My Javascript function:

<script type="text/javascript">
    function PlayVideo() {
        new_video = document.createElement('video');
        new_video.setAttribute('scr', 'Work.mp4'); 
        window.onload = function() { new_video.play(); } 
        //new_video.play(); 
     }
</script>

My HTML

<input type="button" onclick="PlayVideo()" value="Play2" />

Kindly help me with this code. And one more question, will andriod versions 2+ supports HTML5 video tag?

Thanks Haan

Community
  • 1
  • 1
hjaffer2001
  • 933
  • 6
  • 18
  • 38
  • Just wanted to make sure that the second line of your `PlayVideo` function was a typo (specifically trying to set a `scr` attribute instead of a `src` attribute... – natlee75 Jul 11 '12 at 17:35

1 Answers1

0

As we already discussed in one other thread there seems to be no soltion that work on all 2.3 devices using pure HTML 5 (I, together with many others, had problems on making the solution of the thread working in Nexus One). I found a solution that seems to work on all devices, but it also needs adding of some native code. Please consider my answer to the above thread.

Community
  • 1
  • 1
Boris Strandjev
  • 46,145
  • 15
  • 108
  • 135