Giter Club home page Giter Club logo

muses's Introduction

#Muses Radio Player

The Flash MP3/OGG/AAC Live Stream Player.

Here you can find the source code from versions 0.4.6 and above. For older versions please visit https://sourceforge.net/projects/ffmp3/files/

If you're trying to make live audio streaming with shoutcast/icecast, work on all major browsers in all major OS maybe you're needing this. Live Mp3/OGG/AAC Flash Player that works great with Shoutcast and Icecast 2. It has some interesting and necessary features like reconnect on network errors to make sure users never get silence and cache management to avoid memory huge memory consumption. Developed in haXe, this project only needs Flash 10.1 plugin (or newer) to work.

http://www.muses.org | Twitter: @MusesPlayer

###License

Muses Radio Player - A simple Flash MP3/OGG/AAC Live Streaming player written in Haxe.

Copyright © 2009 Federico Bricker

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

###Special Thanks

  • BrowserStack, who let us test the player on many platforms and browsers (www.BrowserStack.com)
  • Juan Manuel Vera, who designed the new Logo. Tandil, Argentina
  • Ezequiel Geringer, who provided great help developing and keeping this project alive! Tandil, Argentina
  • Daniel Uranga, who developed the AAC library for MRP. Tandil, Argentina
  • Matías Rubio, who designed the original Cardinal Bird Logo, and website templates for this project. Tandil, Argentina
  • Bill Farmer, as this Project was initially based on FOggPlayer by him, and still have Classes :) London, United Kingdom
  • Giorgos Trakadas (the DeuceD), who designed skins and encouraged many other features! Athens, Greece
  • Our Sponsors, who helps to keep this project growing!
  • The whole Open Source Community!

muses's People

Contributors

allmoz avatar fbricker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

muses's Issues

Licence !

@fbricker
Hi federico,
We are investigating to use the library in production, some headers have GPL assertions some are LGPL and root licence seems to be LGPL.

Can you please clarify, is the "whole" code base LGPL ?

Thanks !

server:port/mount?arguments fix

i did just saw there is a 0.4.8 in the official page, but didnt finde where to post about code.

in 0.4.7 i did a line change since the metadata loaded for icecast, on a mount that had arguments, did fail

this is de commit

https://github.com/Allmoz/ffmp3/commit/2a319ef9a39aa21d1dbf3b0b860bb770b8117583

Español:

como se que hablan español, el arreglo es simple, pero no se si sea aplicable a todos los casos, quisas el commit no esta bien echo, ha sido el primero y unico que he hecho

:) saludos y larga vida a muse!

Opus

i was reading about opus codec, and find it interesting

also found a a haxe extension:
https://github.com/soywiz/haxe-nme-opus/blob/master/haxelib.xml

the bad thing is that is not updated, opus is already in 1.0.2 and 1.1 alpha

and wiki say : "Opus support is mandatory for WebRTC implementations"

so firefox and chrome are already suporting it

is something to keep in mind for the future

Connect radio api to analyzer - canvas

Hi,
I want to connect audio/radiostream from your MUSES radio API to analyzer, here is function demo, with stream from SoundCloud: http://jakubkrizka.cz/radio.html

(in chrome don't working change currentTime() and firefox limited to 30 FPS)

<html>
    <head>
        <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0">
        <style>
            body {background-color: black}
            div#mp3_player{ width:600px; margin:33px auto; text-align: center}
            div#mp3_player > div > audio { width:100%; }
            div#mp3_player > canvas{ width:100%; height:333px; text-align: center }
        </style>
        <script>
            // define RequestAnimationFrame()
            (function() {
                var lastTime = 0,
                        vendors = ['ms', 'moz', 'webkit', 'o'],
                // Feature check for performance (high-resolution timers)
                        hasPerformance = !! (window.performance && window.performance.now);

                for (var x = 0, max = vendors.length; x < max && !window.requestAnimationFrame; x += 1) {
                    window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
                    window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame']
                            || window[vendors[x] + 'CancelRequestAnimationFrame'];
                }
                if (!window.requestAnimationFrame) {
                    console.log('Polyfill');
                    window.requestAnimationFrame = function(callback, element) {
                        var currTime = new Date().getTime();
                        var timeToCall = Math.max(0, 16 - (currTime - lastTime));
                        var id = window.setTimeout(function() {
                            callback(currTime + timeToCall);
                        }, timeToCall);
                        lastTime = currTime + timeToCall;
                        return id;
                    };
                }
                if (!window.cancelAnimationFrame) {
                    window.cancelAnimationFrame = function(id) {
                        clearTimeout(id);
                    };
                }
                // Add new wrapper for browsers that don't have performance
                if (!hasPerformance) {
                    console.log("Browser doesn't have performance");
                    // Store reference to existing rAF and initial startTime
                    var rAF = window.requestAnimationFrame,
                            startTime = +new Date;
                    // Override window rAF to include wrapped callback
                    window.requestAnimationFrame = function(callback, element) {
                        // Wrap the given callback to pass in performance timestamp
                        var wrapped = function(timestamp) {
                            // Get performance-style timestamp
                            var performanceTimestamp = (timestamp < 1e12) ? timestamp : timestamp - startTime;

                            return callback(performanceTimestamp);
                        };
                        // Call original rAF with wrapped callback
                        rAF(wrapped, element);
                    }
                }
            })();
            // Create a new instance of an audio object and adjust some of its properties
            var audio = new Audio();
            // import audio stream or file
            audio.src = 'http://api.soundcloud.com/tracks/215138926/stream?client_id=17a992358db64d99e492326797fff3e8';
            // audio.src = 'color128.mp3';
            audio.crossOrigin = "anonymous";
            audio.controls = true;
            audio.loop = false;
            audio.autoplay = true;
            // audio.addEventListener('ended', foo);
            // Establish all variables that your Analyser will use
            var canvas, ctx, source, context, analyser, fbc_array, bars, bar_x, bar_width, bar_height, grd;
            // Initialize the MP3 player after the page loads all of its HTML into the window
            window.addEventListener("load", initMp3Player, false);
            function initMp3Player(){
                document.getElementById('audio_box').appendChild(audio);
                context = new (window.AudioContext || window.webkitAudioContext || window.mozAudioContext || window.oAudioContext || window.msAudioContext)(); // AudioContext object instance
                analyser = context.createAnalyser(); // AnalyserNode method
                canvas = document.getElementById('analyser_render');
                ctx = canvas.getContext('2d');
                // Re-route audio playback into the processing graph of the AudioContext
                source = context.createMediaElementSource(audio);
                source.connect(analyser);
                analyser.connect(context.destination);
                frameLooper();
            }
            // frameLooper() animates any style of graphics you wish to the audio frequency
            // Looping at the default frame rate that the browser provides(approx. 60 FPS)
            function frameLooper(){
                window.requestAnimationFrame(frameLooper);
                fbc_array = new Uint8Array(analyser.frequencyBinCount);
                analyser.getByteFrequencyData(fbc_array);
                ctx.clearRect(0, 0, canvas.width, canvas.height); // Clear the canvas
                // set up nice Gradient
                grd = ctx.createLinearGradient(0, 200, 0, 0);
                grd.addColorStop(0, "#51FF00");
                grd.addColorStop(1, "#FF0000");
                ctx.fillStyle = grd;
                //ctx.fillStyle = '#fff'; // Color of the bars
                bars = 1010;
                for (var i = 0; i < bars; i++) {
                    bar_x = i * 1;
                    bar_width = 1;
                    bar_height = -(fbc_array[i] / 2);
                    //  fillRect( x, y, width, height ) // Explanation of the parameters below
                    ctx.fillRect(bar_x, canvas.height, bar_width, bar_height);
                }
            }
        </script>
    </head>
    <body>
        <div id="mp3_player">
            <div id="audio_box"></div>
            <canvas id="analyser_render"></canvas>
            <iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/215138926&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
        </div>
    </body>
</html>

can you help me please? 👍

Work of the player together with the cookies

Tell me how you can write your player worked with cookies and save the autoplay values there when you click on the checkbox?
`<script type="text/javascript">
var ap = false;
$('#chk1').prop( "checked", ap);
MRP.insert({
'url':'https://xxx.ru/radio/8000/radio.mp3',
'lang':'ru',
'codec':'mp3',
'volume':50,
'autoplay':ap,
'forceHTML5':true,
'jsevents':true,
'buffering':0,
'title':'Korea freedom',
'welcome':'Корейское радио',
'wmode':'transparent',
'skin':'faredirfare',
'width':269,
'height':52
});

	$('#chk1').click(function(){
		// save this.checked to cookies
	});
</script>`

Skin has incorrect name in zipfile so autogenerator script doesnt work with that one

Hello,
no idea if i have to post this here, but the autogenerator script doesnt work because of a skin is having another xml filename than the autogenerator script expects.

See http://www.musesradioplayer.com/download.php

The Skin faredirfare is called faredirfare.xml in the skin zip (http://www.musesradioplayer.com/skins/faredirfare.zip) instead of ffmp3-faredirfare.xml zo autogenrator script doesn't work.

Keep up the great work, really nice program.

Maybe its a good idea to insert some usefull information with ffmp3Callback javascript examples (in the script generated with the autogenerator) Extra option if you choose Enable JS Events

Greetings,
Jan Willem Lenting

playSound is not a function

The test-skin.html example file is not working correctly. Every javascript fuction like play, stop, mute... is not working. You get a "Uncaught TypeError: instance3.playSound is not a function" error in chrome. I am not able to find the fix

edit:
Found the issue, it is browser related, try different types of objects like
var instance3= document.getElementsByTagName("embed")[0];
var instance3=(document.instance3)?document.instance3:document.getElementById('instance3');

Song querymetada not working

I was trying to play this stream:

http://pub7.rockradio.com:80/rr_hardrock

It is played but... I cannot get any information about song which is played.

My code:

<object id="myContent" width="300" height="120" type="application/x-shockwave-flash" data="http://hosted.musesradioplayer.com/muses-hosted.swf">
<param name="allowscriptaccess" value="always">
<param name="wmode" value="window">
<param name="flashvars" value="url=http://pub7.rockradio.com:80/rr_hardrock&lang=auto&codec=mp3&tracking=true&volume=65&autoplay=false&buffering=5&skin=http://hosted.musesradioplayer.com/muses-mcclean.xml&title=Radio Vermont&welcome=&jsevents=true&querymetadata=shoutcast&interval=25&movie=http://hosted.musesradioplayer.com/muses-hosted.swf">
</object>

And I see only this js events:

event: "source", value: "http://pub7.rockradio.com:80/rr_hardrock"
event: "fallback", value: "false"
event: "buffering", value: "0"
event: "play", value: "0"
event: "stop", value: "0"
event: "play", value: "0"
event: "source", value: "http://pub7.rockradio.com:80/rr_hardrock"
event: "fallback", value: "false"
event: "source", value: "http://pub7.rockradio.com:80/rr_hardrock"
event: "fallback", value: "false"

Any help, ideas or is it a bug?

I am using 1.0b version.

I was trying to use icecast / shoutcast with same result - it is not working :(

html5 player?

the web page mentions support for html5 player but I haven't found a way to use it, do you have samples or indication on how to use it? thanks

How to use HTML5 version in an offline application

I'm trying to develop an application for embedding in Electron (which is essentially a Chrome shell bundled with a javascript application for offline use), but I can't see how to download the HTML5 version so I can use it in this context (Flash isn't supported). Can you provide instructions for this?

[QUESTION] How do I test skins that I create or edit?

I downloaded a zip folder. I saw the xml file. It is easy to understand how to edit it. I saw the folder with images in it. It is easy to understand how I should edit my images. But after I edit the xml and edit the images, how do I test the player out? I need to see how the new skin looks and I need to test it to see if it works. But I have no idea how to do that. Will someone please provide clear, detailed instructions on how to test skins that we customize?

bandwidth leak

The player is consuming my bandwidth web hosting, the same amount consumed by streaming, many GB

No pause functionality

Hello,

Thanks for this good product.

One of the broadcasts I listen to uses Muses. That's how I knew about it.
I noticed though that the player doesn't have the pause functionality (the website uses the HTML5 version).
While certainly the HTML Audio element has a pause method, I see that the JS code generated for Muses pauses and resets the element instance (in the stopAudio method):
stopAudio = (function (a){this.desiredStatus="stop";null!=this.audio&&(this.audio.pause(),this.audio.src="");a&&(this.lastAudioStatus=4,this.metadataLoader.stop())})

Haxe is not my profession, but I see that the MP3Player class uses flash.media.Sound which doesn't have a pause method.

Why the need to pause? Sometimes one wants to leave for a reason or another, and I want to pause then continue from where I left. The HTML Audio element (at least on Firefox where I listen) continue buffering streamed audio when paused.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.