Alpha Video Training
Results 1 to 16 of 16

Thread: Videos... and mp3?

  1. #1
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Videos... and mp3?

    Hi,

    Will the new video plyaer function also wor with mp3 files? I am working a lot with small mp3 files that I need to strem from the grid, would be very happy if this could be done from within alpha now :)

    Regads
    Robert

  2. #2
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    you mean mp4 or just mp3 sound files?
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  3. #3
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    Just mp3 sound files... Would like to be able to have a grid with one mp3 sound file per row and be able to stream separately on each row. Just a small player.

    I got some helo here on this before using jQuery, but I am not good at programming and canät get it to work... :(

  4. #4
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    You won't need the videoplayer for that; html 5 browsers support audio natively otherwise you have to depend on a plugin in the user's browser.

    Here's a way:

    Create an A5W page "audio.a5w"

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <meta name="generator" content="Alpha Five HTML Editor Version 11 Build 2169-3791">
    <!-- must use in order to make XP Themes render -->
    <meta HTTP-EQUIV="MSThemeCompatible" content="Yes" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    
    
    <title></title>
    </head>
    <body>
    <p>&nbsp;</p>
    
    <script> 
    function getQueryVariable(variable) { 
      var query = window.location.search.substring(1); 
      var vars = query.split("&"); 
      for (var i=0;i<vars.length;i++) { 
        var pair = vars[i].split("="); 
        if (pair[0] == variable) { 
          return pair[1]; 
        } 
      } 
      alert('Query Variable ' + variable + ' not found'); 
    } 
    
    var mp3=getQueryVariable("song");
    
    document.write("<audio src="+mp3+" controls=\"controls\" autoplay=\"autoplay\">");
    document.write("</audio>");
    
    </script>
    
    </body></html>
    Create a grid with a field containing the mp3 url & a button to start playing it using the onclick event. See attached screenshots.
    Needs polishing

    mp34.pngmp33.pngmp32.pngmp31.png
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  5. #5
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    Thanks so uch for this eplanation, I actually have it working with HTML5 now but it doesn't seem to be streamed but actually downloaded. If I open a grid with 20 mp3 samples there is a whole lot to download and it takes time before I can start listening to them as they are downloaded one by one. I am looking for a streaming function.

    Thask for your help though!!!

    Robert

  6. #6
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    See that you have them in pop ups, could be a possible solution for not downloading them all (I have them straight in the grid) but it would be so much better to stream...

    thanks again

  7. #7
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    What do you mean by having them straight in the grid ? It's just links you need to put in there so there is no download issue
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  8. #8
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    You can play around with the "preload=auto" attribute to avoid the downloading I think. Also note that FireFox & Opera do not support mp3 so you'd need a .wav or .ogg copy for users with these browsers.
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  9. #9
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    Quote Originally Posted by Clipper87 View Post
    You can play around with the "preload=auto" attribute to avoid the downloading I think. Also note that FireFox & Opera do not support mp3 so you'd need a .wav or .ogg copy for users with these browsers.
    Thanks, I will look into this. The jQuery solution looks better though, will try some more to get it to work. Got a great step by step instruction for doing this (here on the forum) but unfortunatly I still canät get it to work...

    Regards

  10. #10
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    I just tested with a 50 Mb MP3 & preload=auto; works like a charm!

    I am interested to see your solution as well; the learning never stops...
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  11. #11
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    What does the preload = auto do?

    At the moment I have one HTML5 player on each row in the grid, but it seems to be preloading to the browser meaning that you have to wait for the one you want to listen to have been loaded before you can play. You can see my kind of implementation in the following thread in post #4:
    http://msgboard.alphasoftware.com/al...&highlight=mp3

    In post #14 you can see the version I am trying to implement.

    Regards
    Robert

  12. #12
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    OK looking at the screenshot I now understand. I suggest you use preload="none" or preload="metadata" so:

    <audio src="sounds/{data.Firstname}.mp3" controls="controls" preload="none"> or <audio src="sounds/{data.Firstname}.mp3" controls="controls" preload="metadata">

    Upon rendering the grid it then will not download the mp3 files
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  13. #13
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    I found Safari to do what you like with preload="none" , other browsers seem indeed to download every row's mp3 upon rendering the grid

    mp3s.png

    You could go my way but use a hidden div instead rahter then a popup window
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  14. #14
    Member
    Real Name
    Robert Holmström
    Join Date
    Sep 2010
    Location
    Sweden
    Posts
    201

    Default Re: Videos... and mp3?

    Great, thanks for your input!

    I will look at the preload = none solution, if not satisfying I will look more into the jQuery solution or just pop ups as in your example.

    It would be nice to have this solution in v11 as they are spending time on developing video tools anyway...

    Thanks again!

  15. #15
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Videos... and mp3?

    I've been doing some more reading on the html5 audio tag & related browser support. Seems this is still a pretty messy area while browsers continue to change their html5 implementation of the audio tag & the formats they support. No single solution exists (yet).

    Actually it is like with video but Alpha users don't have to worry about video anymore thanks to Bob Moore's great work for the video component. Maybe Bob will be tempted to do it allover for audio after reading this thread?
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  16. #16
    Member Bob Moore's Avatar
    Real Name
    Robert Moore
    Join Date
    Jul 2003
    Location
    Boston, MA
    Posts
    442

    Default Re: Videos... and mp3?

    I hear you guys and I think it's a good idea.

    When time allows, I would like to add a cool HTML5/Flash audio component to R11. Similar in nature to the video component.

Similar Threads

  1. mp3 to play not download?
    By DaveM in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 12-13-2010, 02:11 AM
  2. playing mp3 file
    By joellustigman in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 08-24-2010, 10:16 PM
  3. new features and videos re Alpha Five v10 please check out the last few videos at
    By Richard Rabins in forum Alpha Five Version 10 - Desktop Applications
    Replies: 1
    Last Post: 02-10-2010, 12:29 PM
  4. new features and videos re Alpha Five v10 please check out the last few videos at
    By Richard Rabins in forum Alpha Five Version 9 - Desktop Applications
    Replies: 0
    Last Post: 02-10-2010, 02:39 AM
  5. new features and videos re Alpha Five v10 please check out the last few videos at
    By Richard Rabins in forum Application Server Version 9 - Web/Browser Applications
    Replies: 0
    Last Post: 02-10-2010, 02:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •