Hi All, I haven't received any responses for a long time. Does anybody know a solution for this issue?
---- Darshan On Jul 29, 10:25 am, Darshan <cmb...@gmail.com> wrote: > Hi All, > > Right now I am building a web page that plays videos using HTML5 > <video> element. > > Here is the sample page: > > ******************************************************************************************************************** > <html> > <head> > <title>HTML5 Android Error Video Sample</title> > <meta http-equiv="content-type" content="text/html; charset=utf-8"> > <script type="text/javascript"> > //videoEndedListener > function videoEndedListener() { > var videoElement = > document.getElementById('html5Player'); > videoElement.removeEventListener('ended', > videoEndedListener, > false); > videoElement.src="VIDEO_URL_2"; > videoElement.load(); > videoElement.play(); > alert("Playing 2nd Video"); > }; > > //addEndedListener --> > function addEndedListener(){ > var videoElement = > document.getElementById('html5Player'); > videoElement.addEventListener('ended', > videoEndedListener, false); > }; > </script> > </head> > > <body onload="addEndedListener()"> > <video id="html5Player" src="VIDEO_URL_1" autoplay width=480 > height=320 poster="some_logo.gif" onclick="this.play()"></video> > </body> > </html> > ******************************************************************************************************************** > > In the above sample, I am trying to play 2 videos one after the other. > > Here is what I am experiencing in Android Emulator V2.2: > ******************************************************************* > 1. If VIDEO_URL_1 and VIDEO_URL_2 are valid mp4 urls, then both the > videos gets played out in the order as expected. > > 2. If VIDEO_URL_1 is a valid mp4 url but VIDEO_URL_2 is a url pointing > to a non-existing mp4 video, then the 1st video gets played out and > the 2nd video ends up in "Sorry this video cannot be played" message > as expected. > > 3. If VIDEO_URL_1 is a url pointing to a non-existing mp4 video but > VIDEO_URL_2 is a valid mp4 url, then the 1st video ends up in "Sorry > this video cannot be played" message as expected and the > videoEndedListener() is also fired. The statements in > videoEndedListener() gets executed successfully and the alert "Playing > 2nd Video" is also thrown but the 2nd video never gets played out. > > Please let me know if I am doing something wrong. If not, please let > me know a solution for this issue as I need it urgently. > > Thanks in advance. > > ---- > Darshan -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en