Audio player script help

I have constructed a mini audio player with the help of a
tutorial, action script 3 (code provided below) and flash cs3.
I'm fairly new to Flash and just am curious what I need to
add and what's missing...Q. I want this play/stop button to only
place the audio file once and then stop. Right now the audio file
just loops over and over until the stop button is clicked. Other
than this the produced swf works great... just don't want it to
loop. So, what am I missing in my script?
action script
========================================

I'm fairly new to AS3 but I have some code that is working
for me.
I think you need to add an event listener to your startPlay
function:
function startPlay(event:MouseEvent):void {
playBtn.visible = false;
stopBtn.visible = true;
channel = sound.play(0,5);
channel.addEventListener(Event.SOUND_COMPLETE,
onPlaybackComplete, false, 0, true);
then add a function to call when the sound has played
completely:
private function onPlaybackComplete(evt:Event):void {
channel.stop();
channel.removeEventListener(Event.SOUND_COMPLETE,
onPlaybackComplete);
I've not tested this specific combination of code, I just
pulled parts from some code I have that is working. But this should
work.
I am also a little uncomfortable with your object names. I'm
afraid the might be too close to a reserved word. I only say this
because that bit me last week when I was first working on this.
In any case, I hope this helps. :-)
Peter H.

Similar Messages

  • Flash audio player script played MP3 sped-up for only one user

    Hello all,
    My first post here; I hope this is the right forum for a
    general/newbie
    Flash question.
    I'm using a Flash audio player script that I got here:
    http://www.1pixelout.net/code/audio-player-wordpress-plugin/
    Here it is on the web page, a few lines down from the top of
    the blog post:
    http://mojomom.blogspot.com/2008/06/mojo-mom-podcast-momma-zen.html
    It's an MP3 of a podcast which has been working fine
    everywhere I've tested
    it. But we just heard from someone who says that when she
    tried it, the
    audio was sped up so that "the voices were like chipmunks".
    Anyone have any idea what might have caused that?
    Thanks very much in advance for any help,
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

    I've reinstalled flash and checked that I have the latest version but this is getting ridiculous
    Everytime I want to use skype or itunes or iplayer, I have to log in as the other user, close down all their web browsers, then go back to my account to get it to work, much to the annoyance of the other user.
    Flash now: 11.1.102.55
    OSX: 10.6.8

  • Please help me install this audio player!

    Hello anyone reading this,
    I am very new to designing a website, and decided to venture out and add some audio to it.  I am a piano instructor and am VERY determined to do this.
    I recently purchased some files from this site:
    http://www.flashcomponents.net/component/advanced-mp3-player-with-play list-totally-customizable-xml-driven.html
    That is the same exact one I purchased.
    I recently engaged in a little email session with the author / developer and he was sending me emails that had a lot of technical language of which I couldn't understand.  I needed help, and he didn't seem to pay much attention to my problem, just kept repeating the same thing.
    I eventually was able to research his terminology and I finally got around to being able to comprehend his 'steps' listed for me to get this thing up and running.
    He basically said everything I needed was in a folder titled 'deploy' ... and that I just copy that folder into my Dreamweaver site project , along with my images, root folder, etc.  Ok, easy enough.  I did that.
    His next step was to insert the .swf file into my web page in Dreamweaver.  Ok, easy enough.  Did that.  BUT, there is a problem.  A fairly large grey box shows up with an F inside it.  This is in 'design' view.  In 'Live view', I see nothing at all of the player, just a large grey box with no F inside it.
    The peculiar thing is that there are 3 files inside this 'deploy' folder that when I double click them ... a beautiful audio mp3 player pops up and performs perfectly.  It's the real thing.  Just when I insert the .swf file into my site, nothing at all happens.  And this was what the guy told me to do.
    Since then he stopped corresponding with me.  Not sure why.  Here are the files I have in 'Deploy'.
    playlist.xml
    playerstyles.css
    playersettings_v4.xml
    Mp3player_v4.swf
    index.php
    index.html
    BG.jpg
    AC_RunActiveContent.js
    The 2 index files open up a perfect audio player as shown on the site.  So does the Mp3player_f4.swf.
    I also have a folder called 'scripts' that has 2 scripts listed for the audio player.
    swfobject_modified.js
    expressInstall.swf
    Please oh please, if any of this makes any sense and if what I typed is a symptom of something, please help me.  I am desperate as all the research I've done is getting me nowhere!!!

    Your testing confirms my suspicion that it’s a pathing problem
    “Then I tested out the index.html and the index.php files that are located in 'deploy'
    They didn't work.  no image at all ... nothing. “
    That is working correctly. If you path it to work from the Web page, of course it will not work from “index.html” in the deploy folder… it’s not supposed to. It’s supposed to work from the Web page one folder level up. Did you test it from YOUR Web page after changing the paths?
    “I noticed that as I said the index.html and the index.php didn't work ... but the mp3player_v4.swf STILL worked perfectly fine.  All 3 of those files are under 'deploy'”
    This is also to be expected, because when testing the .swf directly (not on YOUR Web page), the paths in the xml file to the mp3s is correct. But remember, when you place that .swf on YOUR Web page, you are removing the .swf from “deploy” and placing it in the same folder as your Web page….. it’s not in deploy anymore.
    “Also, a peculiar thing happened as well as I was playing around with things. “
    Well for testing you could take everthing out of “deploy” and move it into the same folder as YOUR Web page and just change the path on your web page to the .swf (delete the “deploy/” part). Now every thing is in the root folder, there is no deploy folder, only a “sound” folder which holds the mp3s and the palyer would work just fine, because RELATIVE to the location of the .swf on the WEB PAGE, all the paths are correct.
    But then you don’t really learn how to resolve pathing issues.

  • Help with mediaelement audio player, iPad resizing, and lytebox.

    I'm a noob but trying to build my own site in iWeb and using Coda to edit code.
    I am a music producer and my website has a page on it that showcases some audio.
    I have 3 issues that after about 30 hours of research and fiddling...I can't for the life of me figure out.
    I am a music producer and my website has a page on it that showcases some audio.
    1. Lytebox - I am using a lytebox to open a page I designed (HTML page in iWeb) that has 2 links on it so the viewer can choose where they want to go. When said lytebox opens and one clicks one of the two links, the linked page will open within the lytebox. I dont want this. I want the lytebox to close and the linked page to navigate normally in a regular web page.
         After much research I have found a code that lytebox posted to be able to do such a thing. They posted this code:
              <a href="javascript:void(0)"
                      onclick="parent.$lb.end()">End Lytebox from my page inside Lytebox</a>
         I have pasted that code everywhere I can think of and it doesn't work. I'm not even sure where to post it (on the first page where the lytebox links from? on      the page that opens in lytebox? on the page lytebox is linking to?)
         Here is the page i'm referring to: http://dallaskruse.com/dallaskruse.com/dallaskruse.html
         The lytebox link is in the Gramophone at the bottom left of the page.
    2. MediaElement Audio Player - I am trying to build a page where I can showcase about 15-20 audio clips (about 20-30) seconds each.  It is very important to me to be able to hear/view this page correctly on multiple browsers along with tablets and mobile phones. Someone recommended medialement.js.
    After HOURS of trying to figure this out, I finaly found a way to add multiple players but not have them load the audio so as to not slow down the web page...and it just was simply not loading on an iPad.
    Here's my issue:
         I couldn't figure out how to design (in code) how to add text (song name, artist info, etc) that was to my liking in the HTML so I added the <audio> player via <HTML> and just added text around it in iWeb manually. Problem: iPad is somehow resizing the layout and by the time you get to the bottom of the page, the <audio> players have moved and are now covering up the text. Its all a big mess.
         Question: can mediaelement.js use a jukebox style playback?
         Here's a link to the page in question: http://dallaskruse.com/dallaskruse.com/arrangements.html
    3. MediaElement Not Playing Back on iPad - I've ran some tests and when I just have 1 <audio> player on the page, it'll play fine on the iPad. But when there's more than 1 player then none of the <audio> players want to work. I'm not sure what's going on but even after about 20+ hours of sitting at my laptop, I'm thinking of searching around for a jukebox that has HTML5 and Flash fallback that looks NICE and easy to modify for beginners.
    If ANYONE has ANY pointers or can help in ANY way ... I'd be forever greatful. Sorry for the long post.

    in iWeb, on the page in question, i've only got 2 HTML snippets (windows). One for the "Vocals" and one for the "Orchestrations".
    In the HTML snippet, I've coded in 12 players for the "Vocals" snippet and 10 in the other snippet for the "Orchestrations" players.
    So, I guess I only have 2 snippets.
    heres the "Vocals" code
    <!DOCTYPE html>
    <html>
    <head>
              <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
              <script src="http://dallaskruse.com/mediaelement/build/jquery.js"></script>
              <script src="http://dallaskruse.com/mediaelement/build/mediaelement-and-player.min.js"></script>
              <link rel="stylesheet" href="http://dallaskruse.com/mediaelement/build/mediaelementplayer.min.css" />
    </head>
    <body>
    <div class="player"><p class="song"> Wade in the Water</p><p class="artist">performed by dallas kruse</p>
    <audio id="player1" src="http://dallaskruse.com/mediaelement/media/Vocals/wadevoxMASTERCLIP.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player2" src="http://dallaskruse.com/mediaelement/media/Vocals/45sMasterClip.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player3" src="http://dallaskruse.com/mediaelement/media/Vocals/4amBlues.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player4" src="http://dallaskruse.com/mediaelement/media/Vocals/sunshinevocalsMASTERCLIP.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player5" src="http://dallaskruse.com/mediaelement/media/Vocals/IllSayNothingVocals.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player6" src="http://dallaskruse.com/mediaelement/media/Vocals/ImOnYourSideVocalsMasterClip.mp 3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player7" src="http://dallaskruse.com/mediaelement/media/Vocals/BenjaminOrchVoxMasterClips.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player8" src="http://dallaskruse.com/mediaelement/media/Vocals/MoonRiverVocalArr_2.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player9" src="http://dallaskruse.com/mediaelement/media/Vocals/justsouthvocalMASTERCLIP1.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player10" src="http://dallaskruse.com/mediaelement/media/Vocals/NewJerusalemVocals.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player11" src="http://dallaskruse.com/mediaelement/media/Vocals/RevolvingVocalsMasterClip.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    <br/>
    <br/>
    <audio id="player12" src="http://dallaskruse.com/mediaelement/media/Vocals/StopThis_Vocal Arr.mp3" type="audio/mp3" controls="controls" preload="none">
    </audio>
    <script>
    $('audio').mediaelementplayer();
    </script>
    </body>
    </html>

  • Need Help with Audio player

    Hi i have this flash audio player which is great. The only
    thing is i want the music to play as soon as it loads. At the
    moment you have to push play to start.
    Thanks for any help.
    Carly

    That isn't a function of QuickTime Pro; it's only available in QuickTime X.
    (90840)

  • Audio Player SkinMaker script

    Lately, I've been working on a demo for a new digital media distribution with DPS and found out how tedious it is to generate the skin PNGs for an audio file from Ai.
    So... I wrote a little script that does it for me.
    Then I thought "why not share it with others..."
    So here's a link to my DPS Audio Player SkinMaker script.
    To install it, copy the JSX file to the Scripts folder of Ai.
    It's compatible with Ai CS3 or later (Mac and PC).
    To use it, the following building guidelines must be kept:
    1. Place the Play and Pause art in separate layers and name those layers so you'll be able to identify them for the script.
    2. Group the progress bar objects and name the group so you'll be able to identify it for the script.
    For example, see in the sample player file.
    Enjoy

    That's genius.
    Thanks so much. Really time-saving script that's a must for DPS users.
    Just incase other Mac Users reading this thread may need the location of the Scripts folder clarifying it is: Adobe Illustrator CS6 / Presets / en_GB / Scripts.
    I'm sure it would be a similar path in older versions, and the en_GB bit may change depending on your chosen install region I guess....
    (sorry I don't install stuff on PCs often so am not as familiar with the file stucture but it may be similar)

  • Mp3 Files in HTML5 Audio player are working fine in Windows browsers but not playing song in Linux browsers. Please help

    I have build an Audio player with HTML5 and jquery. Its working fine in firefox browser in windows OS.
    But when i run that code on Linux OS browser. It doesn't play the song. Is this a bug or there is problem in my code ? Please help

    On Linux you need proper GStreamer support to play mp3 files with the HTML5 media player.
    *media.gstreamer.enabled = true
    *Bug 794282 - Enable GStreamer in official builds

  • Audio Player in Apex 4.2

    Hi Everyone,
    Am using oracle apex 4.2 with 11g express edition, I like to use the audio player in my application.
    I have downloaded the audio player plugin from the following link:http://www.apex-plugin.com/oracle-apex-plugins/item-plugin/audio-player-item_99.html and imported in my application also uploaded some mp3 files in wwv_flow_files table. but i don't know how to play the files from wwv_flow_files table can any one help me to achieve this.
    Region Name: Audio Player
    Item Name : P10_PLAYER
    Media Title :
    Width : 100
    Height:80
    Default Volume : 100%
    Display Time : Yes
    Thanks & Regards
    SriG.

    Hello,
    Just edit your item >>> Element >>> Value Placeholder :
    Without HTML 5, you can do it with Java script. Something similar to this:
    var emailField = document.getElementById("email");
    emailField.onfocus = function() {
         if ( emailField.value == "your email") {
              emailField.value = "";
    emailField.onblur = function() {
         if ( emailField.value == "") {
              emailField.value = "your email";
    };Best Regards,
    Fateh
    If you believe that my answer was correct, then please mark the answer as correct

  • How can i add an HTML5 audio player to iWeb?

    I'm trying to add an HTML5 audio player to my iWeb website.
    I tried using the java script codes from players like speakker, jquery or JMS. Even though I downloaded everything from their websites, when I sent the code to the HTML snipet of iWeb, nothing happened.
    Do you know how I can do this?
    Thanks in advance,
    Brazilian_girl

    Thank you so much for all your info, that really helps.
    I read the instructions for the  speakker player, but they seemed so confusing to me in terms of how to do everything, setp by step in regards to iWeb.
    So, let me make sure I got it:
    1) I go to my FTP site/hosting create a new folder
    2) add the music and the graphic content from the player (images form the buttons, etc...)
    3) get a link from the FTP hosting site with all this stuff
    4) Write the link in the code
    5) paste the code (with the link in it) into the HTML snipet widget of iWeb.
    Is this correct?
    Thank you again, I really appreciate it!

  • Custom audio player

    I'd like to create an audio player like the CSMonitor uses
    for its daily podcast at csmonitor.com
    I'm able to create one using a simple rewind, stop, start,
    and jump to end button using actionscript, but how do I get start
    button to change to pause button when pushed and vice versa,
    progress bar with blue ball, and counter that shows time played out
    of total time length of audio file?
    Do I make a separate image for the blue ball and the progress
    bar? then how do I script the ball to move and the time indicators.
    Actionscript I'm currently familiar with using:
    gotoAndStop(1)
    rewindBtn.onPress = function () {
    gotoAndStop(1);
    stopBtn.onPress = function () {
    stop();
    playBtn.onPress = function () {
    play();
    endBtn.onPress = function () {
    gotoAndStop(2560);
    pauseBtn.onRelease = function () {
    (toggle = (toggle) ? false : true) ? stop() : play();
    };

    I found this tutorial by Neutron Creations (all credits to them) that seems to meet the requirements for my custom audio player.
    The problem is that, not being a Javascript/jQuery savy, I'm having quite a bit of difficulty in adapting the code to Edge's context.
    Could you please lend a help?

  • Where is the HTML5 Audio player in DWCS6 Cloud version?

    I just joined the subscription version of the Cloud and re-installed DWCS6 from there and don't see the new updates I've read about.  Like the HTML5 Audio player I read about.  Where the heck is it?  Thanks!  So far this I'm not sold on this Cloud thing and the terrible support I received by phone with Adobe.

    Well... it was a bit of a pain to be honest.  I had spoken to 3 different support agents who all had different information on what I needed to do to start using the Cloud.  So I became very confused on who was giving the right info.  When the account became active I went to update DW but it said I was up to date.  It was my 19 year old son who suggested I uninstall my previous version of DW and then download it and re-install from the Cloud.  I saved all my site logins first and noted which extentions I had.  Once I did that I was able to update to the latest version of DW which has the new HTLM5 Video and Audio plugins.
    I spoke to 6 different people yesterday while I was on the phone for nearly 2 hours and not one of them gave the right info.  And I'll try and make this sound right, but 5 of those people were from a foreign country.  While they were polite for the most part, they were very hard to understand and quite often would put me on hold for 5 minutes while they asked someone else for answers.  I found myself not trusting anything they said because each one had different answers.  I finally complained to a supervisor and stated that for the amount of money I've invested in their products over the last 13 years, it's crazy to have such unprofessional support.
    Sorry if I've ranted here but I feel it's part of the experience that I had that may help someone else as you mentioned.  Technically, trust your own intuitions or have someone with common sense around. 
    In closing, I did have to uninstall the programs I had previous to the Cloud and then reinstalled them to get the Cloud versions. AND I had to reinstall all of my DW and FW extentions.  Thankfully all of my site logins for DW were still there.
    Now that I'm up and running it seems to be working fine.  But, not with much help from Adobe phone support.  They get a D minus.
    Thanks for listening and good luck all.

  • Audio player with some extra's - can't get player realized

    I try to build an audio player with some extra's like looping between 2 time marks.
    Till now i have an interface that can play back audio files but after that the problems start.
    There is no way i can add functions without creating a {color:#ff0000}NotRealizedError{color}.
    According to the documentation the start() method should realize (etc) the player, but it doesn't in my program and neighter does the method player.realize();.
    Can someone give me a hint to get me on the road again.
    Thanks in advance.
    Here is the complete code which generates the NotRealizedError on the dp.setRate(); method:
    (most of it is older source from a basic player on the internet).
    package dictaplayer;
    import java.awt.*;*
    *import java.awt.event.*;
    import java.io.*;*
    *import java.net.MalformedURLException;*
    *import java.net.URI;*
    *import java.net.URL;*
    *import javax.swing.*;
    import javax.media.*;
    public class DictaPlayer extends JFrame {
    private Player dp;
    private URI uri;
    private URL url;
    private boolean realized = false;
    public DictaPlayer()
    super( "Testing DictaPlayer" );
    JButton openFile = new JButton( "Open file to play" );
    openFile.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    openFile();
    createPlayer();
    getContentPane().add( openFile, BorderLayout.NORTH );
    setSize( 300, 300 );
    setVisible(true);
    private void openFile()
    File file = null;
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setFileSelectionMode(
    JFileChooser.FILES_ONLY );
    int result = fileChooser.showOpenDialog( this );
    // user clicked Cancel button on dialog
    if ( result != JFileChooser.CANCEL_OPTION )
    file = fileChooser.getSelectedFile();
    try {
    uri = file.toURI();
    } catch (SecurityException e) {
    e.printStackTrace();
    // Convert the absolute URI to a URL object
    try {
    url = uri.toURL();
    } catch (IllegalArgumentException e) {
    e.printStackTrace();
    } catch (MalformedURLException e) {
    e.printStackTrace();
    private void createPlayer()
    if ( url == null )
    return;
    removePreviousPlayer();
    try {
    // create a new player and add listener
    dp = Manager.createPlayer( url );
    // blockingRealize();
    dp.addControllerListener( new EventHandler() );
    dp.start(); // start player
    dp.setRate(2);
    catch ( Exception e ){
    JOptionPane.showMessageDialog( this,
    "Invalid file or location", "Error loading file",
    JOptionPane.ERROR_MESSAGE );
    private void removePreviousPlayer()
    if ( dp == null )
    return;
    dp.close();
    Component visual = dp.getVisualComponent();
    Component control = dp.getControlPanelComponent();
    Container c = getContentPane();
    if ( visual != null )
    c.remove( visual );
    if ( control != null )
    c.remove( control );
    private synchronized void blockingRealize() {
    int teller = 1;
    dp.realize();
    while (!realized && teller <= 20) {
    try {
    wait(1000);
    System.out.println("not realized " +teller);+
    +teller++;
    } catch (java.lang.InterruptedException e) {
    System.exit(1);
    public static void main(String args[])
    DictaPlayer app = new DictaPlayer();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    System.exit(0);
    // inner class to handler events from media player
    private class EventHandler implements ControllerListener {
    public void controllerUpdate( ControllerEvent e ) {
    if ( e instanceof RealizeCompleteEvent ) {
    Container c = getContentPane();
    // load Visual and Control components if they exist
    Component visualComponent =
    dp.getVisualComponent();
    if ( visualComponent != null )
    c.add( visualComponent, BorderLayout.CENTER );
    Component controlsComponent =
    dp.getControlPanelComponent();
    if (!realized) {
    System.out.println("not realized.");
    if ( controlsComponent != null )
    c.add( controlsComponent, BorderLayout.SOUTH );
    c.doLayout();
    }

    captfoss,
    Thank you for your comment.
    captfoss wrote:
    Start does realize the player, automatically, before it starts it... if it isn't realizing then it also isn't starting.Right, I thought so, but my test was wrong. I now tested it with getState() and I can see it's going from unrealized to realized.
    First off, you can only call setRate on a player that is realized but not started... further, any of the calls like configure, realize, start, stop, etc... are non-blocking calls...so you have to wait for them to finish before you go on to the next step.So you say that when the rate is changed (f.i. by a user in a gui) the program first has to bring player in non-started realized mode (stop + realize), call the setRate() and start the player again (on the exact position it was stopped)?
    The easiest solution would be to use Manager.createRealizedPlayer rather than Manager.createPlayer...Didn't find out yet why, but when i change this (only this), there is no playing.
    Also, ++teller++ is about the most-confused looking code I've ever seen...Just like all the asterisks, i now know that code changes when i toggle between the tabs (rich/plain/preview) in the message box.
    Beyond that, your "blocking realize" function doesn't appear to do anything except suggest you have no business coding anything this advanced. Your boolean value "realize" isn't ever changed, so, I'm not entirely sure what the point of that function is other than to wait 10 seconds.I got this somewhere from the internet. Thought it could help me realize the player, but it didn't (obvious) so i commented it out.
    Slowly I begin to understand the basics of JMF (at least i think so), but I also understand that there are other (Java) ways to build the application I need. Unfortunatly I have to little (hardly any) knowledge of all those (sound) API's (f.i. JLayer) to find my way through them and to decide which is the best for my use (user controled audio playback (at least WAV and MP3) with looping possiblities between 2 marked positions).
    If someone could give me an advise which API (method or whatever you call it) is best to focus on I shurely would appriciate that.

  • Using FMS v4.5.5 with a browser-based audio player running on iPad/iPhone

    Hello,
    I’m seeking some clarity/guidance on using FMS v4.5.5 (Streaming Edition) with a browser-based audio player running on iPad/iPhone (i.e. under iOS).
    Background
    I have a Microsoft Windows 2008 R2 Web Server running IIS v7.5 and supporting a website built using ASP.NET and C#. Parts of the website allow a visitor to play a selection of audio clips from our bespoke MP3 library. Due to UK music licencing constraints, we must stream the clip to the client browser – we must not download either part or all of the source MP3 file(s). We therefore had a custom audio player built for us some time ago using Flash/AS3. This has and continues to work very well, and uses RTMP to stream the clips from FMS to the client browser.
    As our site has become more established the number of visitors has steadily grown. In the early days the number of visitors from the iOS platform was relatively small but, last month, it had risen to 40%! As Flash is not supported on the iOS platform, this growing group of visitors are unable to fully maximise the benefits offered by the website, which I am now trying to address.
    What I’m Trying To Do…
    From what I’ve researched and read, I believe that FMS v4.5.5 supports HLS and I need to use this (instead of RTMP) over HTTP between FMS and the iOS Safari client. I have been experimenting with an Open Source player (JPlayer) and a commercial player (JWplayer) and appear to have these playing a MP3 file as a “progressive download” (I think that’s the right term) as all I’m doing is specifying the file path (no HTTP prefix etc.), i.e. the audio is not really being streamed as I require. Unfortunately, I’ve not found / worked out how to configure my FMS to respond to a path request along the lines of:
    http://www.myserver.com/live/audio1.mp3
    Hopefully someone reading this who is much more expert on FMS, HLS, HDS, HTML5, etc. than me can point me in the right direction!
    What I’m confused about…
    1) Can all my MP3 assets stay as is and still be streamed to the iOS Safari client? To the best of my knowledge, the key properties of my MP3 files are CBR, 44,100Hz, 320Kbps.
    2) If not, can they be converted on-the-fly by FMS or do I need to create additional audio assets to support HLS etc.?
    3) If I have to manually create additional audio assets, how do I do that (I’ve seen references to tools from both Adobe and Apple but not actually found the kits)?
    4) Some of the Adobe documentation I’ve read implies that FMS support for HLS etc. is only available when FMS is used in conjunction with the bundled Apache web server. As stated earlier, my entire site runs on IIS so does that mean to achieve what I want I’ll have to run two web servers on my physical server – IIS for the website itself and Apache for RTMP/HLS/etc.?
    5) What changes do I need to make to my current FMS configuration to get HLS to work? I’m sure someone has been here already and can enlighten me with their experience and hopefully point me to some straight forward documentation to follow!
    6) Lastly, and really part of (5), once I’ve got FMS configured correctly, what would be the typical path to a given MP3 audio file that I would give the iOS Safari browser to make this all work.
    I appreciate this is rather a lengthy first post but hopefully the background puts my questions (and confusion!) in context. Bottom line is… I simply want to be able to stream audio clips only (no video) to iOS Safari browsers from FMS v4.5.5 running on a Win2K8R2 platform with IIS v7.5, and with no audio content being stored (even temporarily) on the iOS platform.
    My thanks and appreciation in advance to anyone who can help me achieve this.
    Steve Barker
    Business IT Solutions

    Hi Apurva,
    Thank you for your reply. Unfortunately I am not much further forward, despite having read more Adobe documentation (FMS v4.5 Configuration and Administration Guide, FMS v4.5 Developer’s Guide) and trying different configuration options.
    First to confirm a point you made when answering point 4 yesterday. Yes, in my current RTMP scenario I have several MP3 assets (let’s call them Audio1.mp3, Audio2.mp3, Audio3.mp3, etc.) that are made available to a bespoke Flash/AS3 player via the LIVE application. I understand that as I purchased the Streaming Edition of FMS v4.5, a Flash-based player is restricted to using the LIVE application. You go on to say that I “publish” these assets to the LIVE application. I set this up a while back but do not recall having to “publish” anything. All I recall doing was to ensure that all the assets (the .mp3 files) were in a single folder and that the folder was identified by the <Streams> tag in the following file (example shown):
    Flash Media Server 4.5\applications\live\Application.xml
                    <StreamManager>
                                    <VirtualDirectory>
                                                    <Streams>/;C:\MP3Library</Streams>
                                    </VirtualDirectory>
                    </StreamManager>
    To the best of my knowledge, I didn’t have to do anything else to make the current solution work. Having read more of the documentation I am still none the wiser as to what I need to do (step-by-step) to “publish” my converted MP3 assets (see next paragraph) to the LIVEPKGR application. Please could you explain these steps to me by way of an example.
    WRT your answer to point 1 yesterday, I wish to clarify the exact output I need to create when converting my MP3 assets. Am I expected to produce a Audio1.aac file, or a Audio1.mp4, file, or a Audio1.m4a file, etc.? Or am I meant to be using ffmpeg (either directly or indirectly) with a much more sophisticated command line that somehow generates stream-rated info/files as well? An example of how you would use ffmpeg to convert one of my MP3 assets would be very much appreciated.
    Lastly, the coexistence of IIS and Apache (ref your answer to point 2 yesterday). That all made sense but given all the testing/changes I’ve been making I thought it wise to start afresh! So I completely removed FMS from my dev server and re-installed Flash Media Streaming Server v4.5.5 with the bundled Apache v2.2 server. When presented with the dialogue “Would you like for Apache to listen on port 80. If not FMS will be using port 80 instead.” I answered NO. When presented with the dialogue regarding FMS server ports, I entered 1935 NOT 1935,80 (should I have done that as the preamble makes reference to HTTP webserver proxy and HTTP Dynamic Streaming origin services?). I then modified the Application.xml file as described above.
    To test the new set-up, I did the following. First, the test environment…
    DEV Server
    Windows Web Server 2008 R2 SP1
    IIS v7.5
    ASP.NET v4.0
    Flash Media Streaming Server v4.5.5
    Apache v2.2
    IE v9.0
    Adobe Flash Player 11 ActiveX v11.5.502.146
    TEST Client
    Apple iMac (Intel)
    Mac OS X v10.6.8
    Safari v5.1.7
    Adobe Flash Player 11 Plug-in v11.5.502.146
    On DEV Server… launched IE and loaded the home page of my website, which has two elements on it – one to load/run our bespoke Flash player, the other to run JPlayer (configured to use HTTP). I selected our bespoke Flash player and it played a MP3 audio file. I verified this in real-time via the FMS Admin Console on the server.
    On TEST Client… entered http://192.168.20.250:8134 into Safari – it comes up with the FMS install completed / test your server page. In the middle of the video display area a black box appears saying “10000 OK” – I clicked OK. I then clicked HDS Single Bitrate – the video plays (Not Using Hardware Acceleration is briefly displayed). There is NO activity logged in the FMS Admin Console back on the DEV server under “live”, “livepkgr” or “vod”. I assume this is because I’ve gone straight to the Apache Server via the port reference – is that correct? Next I tried the HLS Single Bitrate – same results.
    The HDS Single Bitrate logs the following in the Apache access_log file:
    "GET /hds-vod/sample1_1500kbps.f4v.f4m HTTP/1.1" 304 - "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    The HLS Single Bitrate logs this:
    "GET /hds-vod/sample1_1500kbps.f4v.f4m HTTP/1.1" 304 - "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    "GET /hls-vod/sample1_1500kbps.f4v.m3u8 HTTP/1.1" 304 - "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    "GET /hls-vod/sample1_1500kbps.f4v.m3u8 HTTP/1.1" 200 816 "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    "GET /hls-vod/sample1_1500kbps.f4vFrag1Num0.ts HTTP/1.1" 200 1143416 "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    "GET /hls-vod/sample1_1500kbps.f4vFrag1Num1.ts HTTP/1.1" 200 873072 "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    "GET /hls-vod/sample1_1500kbps.f4vFrag2Num2.ts HTTP/1.1" 200 1591984 "-" "Apple Mac OS X v10.6.8 CoreMedia v1.0.0.10K549"
    etc…
    At this point I’m stuck once again since I’m not clear how to construct the JPlayer HTTP reference. You have suggested:
    http://192.168.20.250:8134/hls-live/livepkgr/_definst_/livestream/livestream.m3u8
    That produces the following in the Apache error_log file:
    [error] [client 192.168.20.4] File does not exist: D:/Program Files/Adobe/Flash Media Server 4.5/webroot/hls-live
    If I change the JPlayer HTTP reference to:
    http://192.168.20.250:8134/hls-vod/sample1_1500kbps.f4v.m3u8
    the audio from the video plays.
    Also, if I look in the applications\livepkgr folder structure there is only \events (with sub-folder _definst_ and sub-sub-folder liveevent) – there are no _definst_ , livestream , streams folders etc. So besides me not quite understanding the logic/flow here, I seem to be missing a few folders/files too! I’d be very grateful for any light you can shed on all this. Plus an example of what my HTTP string should ultimately look like; for example:
    http://192.168.20.250:8134/hls-live/livepkgr/_definst_/livestream/Audio1.m3u8
    Apologies for such a long reply but I’ve been at this for over 10 hours today! I feel I’m getting closer but clearly there are still some gaps and configuration errors.
    Thanks again for your time, support, patience and understanding.
    Kind Regards, Steve

  • Audio player problem !!

    Hey amigoses ^^
    I'm a little bit stuck again with this time trying to make a mere mp3 player !!
    Probabilly the most simple one !!
    I have a list view that will contain the music titles but again, nothing comes that esay ^^
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package audioplayer;
    import java.io.File;
    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.ListView;
    import javafx.scene.control.Slider;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.stage.FileChooser;
    import javafx.stage.FileChooser.ExtensionFilter;
    import javafx.stage.Stage;
    * @author Minedun6
    public class AudioPlayer extends Application {
        ListView list = new ListView();
        Button btn_load = new Button("Load File");
        Button btn_play = new Button("play");
        Button btn_stop = new Button("Stop");
        Button btn_pause = new Button("Pause");
        ObservableList<String> array;
        FileChooser chooser = null;
        File file;
        Media media;
        MediaPlayer player;
        Slider longeur;
        @Override
        public void start(Stage primaryStage) {
            list.setLayoutX(210);
            list.setLayoutY(10);
            list.setPrefSize(160, 260);
            btn_load.setLayoutX(295);
            btn_load.setLayoutY(260);
            btn_stop.setLayoutX(50);
            btn_pause.setLayoutX(100);
            longeur.setPrefSize(150,10);
            longeur.setLayoutX(5);
            longeur.setLayoutY(50);
            btn_load.setOnMouseClicked(new EventHandler<MouseEvent>(){
                @Override
                public void handle(MouseEvent t) {
                   chooser = new FileChooser();
                   ExtensionFilter mp3 = new ExtensionFilter("MP3 Files(*.mp3)", "*.mp3");
                   ExtensionFilter aac = new ExtensionFilter("AAC Files(*.aac)", "*.aac");
                   chooser.getExtensionFilters().addAll(mp3,aac);
                    file = chooser.showOpenDialog(null);
                   String fi = file.getAbsoluteFile().toURI().toString();
                   String name = file.getName().toString();
                   list.getItems().add(name);
                    array = FXCollections.observableArrayList();
                    array.addAll(fi);
                    System.out.println(array);
            btn_play.setOnMouseClicked(new EventHandler<MouseEvent>(){
                @Override
                public void handle(MouseEvent t) {
                    media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                    player = new MediaPlayer(media);
                    player.play();
            btn_stop.setOnMouseClicked(new EventHandler<MouseEvent>(){
                @Override
                public void handle(MouseEvent t) {
                    player.stop();
            btn_pause.setOnMouseClicked(new EventHandler<MouseEvent>(){
                @Override
                public void handle(MouseEvent t) {
                    player.pause();
            Group root = new Group();
            root.getChildren().addAll(list,btn_load,btn_play,btn_stop,btn_pause,longeur);
            Scene scene = new Scene(root, 400, 300);
            primaryStage.setTitle("Hello World!");
            primaryStage.setScene(scene);
            primaryStage.show();
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         * @param args the command line arguments
        public static void main(String[] args) {
            launch(args);
    }I really tried to do something very simple but seems no !!
    And by the way, the pause button, when i press on it, it should only pauses the play but seems it's making the player stop not pause ^^

    Thx again !!
    For the images/text, i'll be trying myself to do something and i hope this time i'll do it without yur help !!
    As for the Mp3 Player, here is the code, would be nice of to see if there is something that can be added, perfectionized !!
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package audioplayer;
    import java.io.File;
    import javafx.application.Application;
    import javafx.beans.InvalidationListener;
    import javafx.beans.Observable;
    import javafx.beans.binding.Bindings;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.ListView;
    import javafx.scene.control.Slider;
    import javafx.scene.input.KeyCode;
    import javafx.scene.input.KeyEvent;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.AnchorPane;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.LinearGradient;
    import javafx.stage.FileChooser;
    import javafx.stage.FileChooser.ExtensionFilter;
    import javafx.stage.Stage;
    import javafx.util.Duration;
    * @author Minedun6
    public class AudioPlayer extends Application {
    //Creating the GUI Form
        Button btn_play = new Button("Play");
        Button btn_pause = new Button("Pause");
        Button btn_stop = new Button("Stop");
        Button btn_previous = new Button("Prev");
        Button btn_next = new Button("Next");
        Button btn_load = new Button("Load");
        ListView list = new ListView();
        ObservableList array = FXCollections.observableArrayList();
        FileChooser choose;
        File file;
        Media media;
        MediaPlayer player;
        Slider status = new Slider();
        Slider volume = new Slider();
    //End of GUI
        @Override
        public void start(Stage stage) throws Exception {
            //Styling btn_previous
            btn_previous.setPrefSize(80, 30);
            btn_previous.setLayoutX(10);
            btn_previous.setLayoutY(330);
            //end of btn_previous
            //Styling btn_pause
            btn_pause.setPrefSize(80, 30);
            btn_pause.setLayoutX(100);
            btn_pause.setLayoutY(330);
            //end of btn_pause
            //Styling btn_play
            btn_play.setPrefSize(80, 30);
            btn_play.setLayoutX(190);
            btn_play.setLayoutY(330);
            //end of btn_play
            //Styling btn_stop
            btn_stop.setPrefSize(80, 30);
            btn_stop.setLayoutX(280);
            btn_stop.setLayoutY(330);
            //end of btn_stop
            //Styling btn_next
            btn_next.setPrefSize(80, 30);
            btn_next.setLayoutX(370);
            btn_next.setLayoutY(330);
            //end of btn_next
            //Styling list
            list.setPrefSize(280, 300);
            list.setLayoutX(500);
            list.setLayoutY(10);
            //end of list
            //Styling btn_load
            btn_load.setPrefSize(80, 30);
            btn_load.setLayoutX(600);
            btn_load.setLayoutY(330);
            //end of btn_load
            //Styling status slider
            status.setPrefSize(450, 10);
            status.setLayoutX(10);
            status.setLayoutY(290);
            //end of status slider
            //Styling volume slider
            volume.setPrefSize(100, 10);
            volume.setLayoutX(350);
            volume.setLayoutY(310);
            volume.setValue(100.0);
            volume.setMin(0.0);
            volume.setMax(100.0);
            //end of volume slider
            btn_play.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
            btn_next.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
            btn_previous.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
            btn_pause.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
            btn_stop.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
            list.setOnKeyReleased(new EventHandler< KeyEvent>(){
                @Override
                public void handle(KeyEvent t) {
                    if(t.getCode() == KeyCode.DELETE){
                        list.getItems().remove(list.getSelectionModel().getSelectedIndex());
                        array.remove(list.getSelectionModel().getSelectedIndex());
            btn_load.setOnMouseClicked(new EventHandler<MouseEvent>() {
                //Evenement associé au clic du bouton Load
                @Override
                public void handle(MouseEvent t) {
                    //Ajout des Filtres de choix !!
                    ExtensionFilter mp3 = new ExtensionFilter("MP3 Files(*.mp3)", "*.mp3");
                    ExtensionFilter aac = new ExtensionFilter("AAC Files(*.aac)", "*.aac");
                    choose = new FileChooser();
                    choose.getExtensionFilters().addAll(mp3, aac);
                    file = choose.showOpenDialog(null);
                    if (file != null) {
                        //Ajout à la liste pour stocker les titres chansons !!
                        String fi = file.getAbsoluteFile().toURI().toString();
                        String name = file.getName().toString().substring(0, file.getName().toString().lastIndexOf("."));
                        list.getItems().add(name);
                        array.add(fi);
            btn_play.setOnMouseClicked(new EventHandler<MouseEvent>() {
                //Evenement associé au click du button play
                @Override
                public void handle(MouseEvent t) {
                    if (!(list.getItems().isEmpty())) {
                        //player.stop();
                        media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                        player = new MediaPlayer(media);
                        player.play();
                        player.setOnReady(new Runnable() {
                            @Override
                            public void run() {
                                status.setMin(0.0);
                                status.setValue(0.0);
                                status.setMax(player.getTotalDuration().toSeconds());
                                volume.setValue(100.0);
                                player.setVolume(100.0 / 100);
                                player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                    @Override
                                    public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                        status.setValue(t1.toSeconds());
            status.valueProperty().addListener(new InvalidationListener() {
                @Override
                public void invalidated(Observable o) {
                    if (status.isValueChanging()) {
                        player.seek(Duration.seconds(status.getValue()));
            volume.valueProperty().addListener(new InvalidationListener() {
                @Override
                public void invalidated(Observable o) {
                    if (volume.isValueChanging()) {
                        //le volume doit être divisé par 100 pour ressentir la dégradation du volume
                        //sinon ça passe trop vite
                        player.setVolume(volume.getValue() / 100);
            btn_next.setOnMouseClicked(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent t) {
                    if ((list.getItems().size() != 0) || (list.getItems().get(list.getItems().size() + 1) != null)) {
                        player.stop();
                        list.getSelectionModel().selectNext();
                        media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                        player = new MediaPlayer(media);
                        player.play();
                        player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                    @Override
                                    public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                        status.setValue(t1.toSeconds());
            btn_previous.setOnMouseClicked(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent t) {
                    if ((list.getItems().size() != 0) || (list.getItems().get(-1) != null)) {
                        player.stop();
                        list.getSelectionModel().selectPrevious();
                        media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                        player = new MediaPlayer(media);
                        player.play();
                        player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                    @Override
                                    public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                        status.setValue(t1.toSeconds());
            Group root = new Group();
            root.getChildren().addAll(btn_play, btn_previous,
                    btn_pause, btn_stop, btn_next, btn_load, list,
                    status, volume);
            Scene scene = new Scene(root, 800, 450);
            stage.setScene(scene);
            scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
            stage.setTitle("Audio Player");
            stage.show();
        public void disableAll(){
            if(list.getItems().isEmpty()){
            btn_play.setDisable(true);
            btn_pause.setDisable(true);
            btn_next.setDisable(true);
            btn_previous.setDisable(true);
            btn_stop.setDisable(true);
        public static void main(String[] args) {
            launch(args);
    }

  • No Progress on Audio Player

    Hi all,
    I have been trying to figure out why my audio player ain't
    displaying the progress of the stream but
    still can't find a way around it. Could you pros help me out
    here. Really am out of solutions >_<
    Thanks in advance

    I'm afraid that you've WAY over complicated this, and the use
    of prototyping here is unnecessary. to monitor the progress of a
    streaming mp3 download this is all you need (use your textfield
    constructor if you wish, or just place an dynamic instance on the
    stage):

Maybe you are looking for

  • External hard drive won't connect

    I have been using an external drive to transport material from an old computer to the Macbook Pro.  Normally I have used the firewire 400 port on both ends of the journey.  Suddenly, the MacBook will not connect to the hard drive.  I meticulously pow

  • Message no. RSM1130

    Hi ! I get the following massage from the manage data view  of a cube : Loaded data is not yet visible in Reporting (see long text) Message no. RSM1130  Diagnosis There is an inconsistency between the load status of the data and the option of reporti

  • Itunes match on different devices

    I have itunes match turned on. I see the album arts on all devices except my ipad. Does any one know on how to fix this.

  • Can i use itunes radio without wifi like while driving in my car?

    can i use itunes radio without sifi like while driving in my car?

  • Synchronize with outlook

    After installing Ovi Suite, i have a question: Is there a possibility to sychronize with outlook on schedule? My users are connected most of the day, and it would be nice if the (outlook) calendar is updated several times per hour.