The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 23, 2019, 10:21:58 AM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Html5 playground  (Read 1378 times)
Phaėton
Lifer
*****
Offline Offline

Posts: 555


⎝⏠⏝⏠⎠


View Profile
« on: June 26, 2010, 10:49:13 AM »

http://techcrunch.com/2010/06/22/html5rocks-google/

http://www.html5rocks.com/
Logged

When I was your age we used to walk to the TV to change the channel....  _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
isthisthingon
Global Moderator
Lifer
*****
Offline Offline

Posts: 2879



View Profile
« Reply #1 on: June 26, 2010, 11:11:31 AM »

Popcorn

Can't wait for it to be the standard.
Logged

I would love to change the world, but they won't give me the source code.
Phaėton
Lifer
*****
Offline Offline

Posts: 555


⎝⏠⏝⏠⎠


View Profile
« Reply #2 on: July 01, 2010, 01:39:39 AM »

Its pretty smooth...

my task was to play a file and then refresh to a new page.... simple enough with
html5 <audio> element:

Code:
    <script type="text/javascript">     
      function trackEnded(){
        window.location = "http://www.html5rocks.com/"
      }
    </script>
   
    <audio id=aplayer src="http://developer.mozilla.org/@api/deki/files/2926/=AudioTest_(1).ogg" 
           onEnded="trackEnded();" autoplay> 
      Your browser does not support the <code>audio</code> element. 
    </audio> 

 Applause  Things are getting more organized.... the tower of babel just might reach the sky...
Logged

When I was your age we used to walk to the TV to change the channel....  _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
Phaėton
Lifer
*****
Offline Offline

Posts: 555


⎝⏠⏝⏠⎠


View Profile
« Reply #3 on: July 01, 2010, 01:44:25 AM »

you know, versus something unwieldy like:

Code:
<script language="javascript" type="text/javascript">

var player = $('audio_player');

function playerError()
{
window.alert(player.error.code + ' Could not play this sound file: ' + player.currentSrc);
}

function nextAudio()
{
setTimeout("window.location = '/student_vocab/next_stage';", 3000);
}

function myAddListener(obj, evt, handler, captures)
{
obj.addEventListener(evt, handler, captures);
}

function RegisterListeners()
  {
      if ( null == player )
      {
          alert("QT plug-in not instantiated on <body> load event???");
          return;
      }
      myAddListener(player,'ended', nextAudio, false);
      myAddListener(player,'error', playerError, false);
  }
RegisterListeners();
var value_audio = "http://somefile.mp3";
player.src = value_audio;
player.load();
player.play();
</script>

Logged

When I was your age we used to walk to the TV to change the channel....  _̴ı̴̴̡̡̡ ̡͌l̡̡̡ ̡͌l̡*̡̡ ̴̡ı̴̴̡ ̡̡͡|̲̲̲͡͡͡ ̲▫̲͡ ̲̲̲͡͡π̲̲͡͡ ̲̲͡▫̲̲͡͡ ̲|̡̡̡ ̡ ̴̡ı̴̡̡
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!