Can MP3 Tags Be Used to Trigger Certain Flash Player Functions?

Please note: I'm guessing that the answer to this question probably needs to come from an audio engineer, someone who knows the nuts-and-bolts workings of MP3 tags and customizable flash players.

I have a file containing a number of mp3 tracks which can be accessed online (and yes, all the required music licensing fees have been paid). The playback is done using a flash player I had built, which automatically plays one track after another. Each time you listen to the file, the tracks are randomly shuffled, so that you do not hear the playlist in the same exact order.

The player was designed with some simple user controls, one of which allows a listener to hit a forward arrow graphic and skip to the next track, if the listener so chooses. I need to know if it's possible to "fix it" so that the skipping function can be disabled for particular tracks.

The first thought that crossed my mind, not being an engineer or an audio expert, was "Could the solution be as simple as adding some bit of information to one of the mp3 track information tags to 'tell' the player NOT to skip to the next track?"

So there you have it, audio experts. Let me know if you need more info and/or if this is a simple or complicated challenge.
RadioGeorgeOwner/ProgrammerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

LajuanTaylorCommented:
Take a look at the Adobe documentation for sound playback within Flash. You might be able to prevent track skipping by using some custom Action Scripting:
Pausing and resuming a sound
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d12.html

Monitoring playback
http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d1e.html
RadioGeorgeOwner/ProgrammerAuthor Commented:
Thanks, but I'm not technically oriented enough to mess around with something like this (which is why I posted here).

I'm willing to contract with someone IF it can be confirmed in advance that what I'm asking about is actually possible.
LajuanTaylorCommented:
@RadioGeorge - Based on my understanding of MP3 tags i.e. metadata there are no provisions in the tagging specification to control file playback. Please see reference site - http://id3.org/ID3v2Easy

My initial thoughts were that you could add some Action Scripting to your Flash Player MP3 playback controls to prevent track skipping.

What software did you use to create your Flash Player?

Did you consider using a single play button for the tracks that you don't won't skipped?
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

RadioGeorgeOwner/ProgrammerAuthor Commented:
Lajuan,

Thanks for your suggestion on checking the reference site you listed. It will help me in several ways, although it does seem that I'm asking for an easy solution to a tough problem.

I did not create the Flash Player. I contracted it out and the programmer who put it together is no longer available to me. I think he used Adobe. And I don't quite understand your question on a "single play button." The tracks start playing automatically and the controls are used to pause, stop altogether, and move back or forward one track.
LajuanTaylorCommented:
@RadioGeorge - I was thinking that certain tracks could have a player with only pause, play, and stop controls. Which, essentially would be like not providing a way to skip a track.

Did the previous programmer provide you with any of the Flash project files? They would be files with extensions like .flp, .fla,.as, or .jsfl.

Secondly,  does the Flash Player automatically detect your music files added to a particular directory or do it use some sort of text or XML file to store the MP3 file names?
BillDLCommented:
That's a good question by LajuanTaylor, and is the first thing I thought of also.  Many web media players that use the Flash Player plugin will have a configuration file and possibly also companion files like images that are used to provide the "buttons" on the player frame, a background image, the playlist, and other user modifiable settings.  it is possible that, having been created specifically for your needs, the designer has not provided an external configuration file and that the buttons are embedded within the player.

It's impossible to say where you might find the player files in relation to the media files on your server, but I would guess that if you go back up one directory from the audio files and look in other sub-directories, you may find a file named "player.swf" or similar.  You may find an XML (or other text-based) configuration file alongside the Flash file, and even other *.swf and standard image files that provide the user interface of the player.

If you could let us know what you have, we might be able to suggest a way forward.
RadioGeorgeOwner/ProgrammerAuthor Commented:
I knew this would be complicated, but this looks a very heavy-duty situation to my mostly non-tech mind!

I DO have all the original coding and files, so I'll dig them out so that I can attempt to answer your questions. This may take a day or so, but I need answers so I'll retrieve them and get back to you here ASAP.
RadioGeorgeOwner/ProgrammerAuthor Commented:
OK, gang, I dug out the original files, circa 2010.

Here's what I see:

jazz_player.fla      4/15/2010 3:37:46 PM      1,177.50
jazz_player.swf      4/15/2010 3:29:22 PM      94.71
oldies_player.fla      4/15/2010 3:25:26 PM      1,219.50
oldies_player.swf      4/15/2010 3:25:22 PM      113.97
variety_player.fla      4/15/2010 3:29:10 PM      1,159.00
variety_player.swf      4/15/2010 3:29:08 PM      103.63

AuxFunctions.as      10/5/2007 2:14:22 PM      2.60
Equations.as      9/7/2007 8:00:00 PM      32.22
PropertyInfoObj.as      9/19/2007 12:24:08 PM      3.80
SpecialProperty.as      10/5/2007 1:40:32 PM      1.66
SpecialPropertyModifier.as      4/28/2007 2:40:04 PM      0.96
SpecialPropertySplitter.as      7/14/2007 8:48:16 PM      1.19
Tweener.as      6/9/2009 10:12:16 PM      42.83
TweenListObj.as      10/5/2007 1:34:36 PM      10.98

There are some others, but I believe they are all used for the behind-the-scenes tracking that is done.

I have no idea what most of these are. At the risk of yelling too loudly, I do find it helpful when using Experts-Exchange to say: I  AM  NOT  A  TECH!

Next?
LajuanTaylorCommented:
@RadioGeorge - The Adobe Flash development software saves projects as .fla. The .as are action script files, which are used in projects to control things like object animation, sound play back, user interface buttons, etc. When a project is published for use on a web site it uses the .swf file extension.

Can you provide a URL to us so that the current player can be reviewed?

I noticed that there are three .swf player types listed in the original files - jazz, oldies, and variety.

Are you looking to not allow track skipping across all music categories?

Depending on the design of your player, the functionality tweak can possibly be made by modifying an existing .as (action script) file .as. If that's not feasible, the tweak could possibly be made to the fast forward button... I'm guessing because I have no idea how your player is designed.

Basically, your source project file(s) need to be modified, republished, and uploaded to your web site. That's based on the assumption that the published .swf doesn't use any external configuration files for the player controls.
RadioGeorgeOwner/ProgrammerAuthor Commented:
LaJuan,

THANK YOU for an excellent, easily understood comment.

The same player configuration is used for each of the three categories, oldies, jazz and variety.
You can see them in action on many pages, but here are pages that will work just fine, I believe:

http://www.radiogeorge.com/jazz/jazz1.htm
http://www.radiogeorge.com/oldies/oldies5.htm
http://www.radiogeorge.com/variety/amgraf2013.htm

I should point out that these "channels" all play mp3 files from playlists that are shuffled randomly each time you  listen to one, so you never hear the same songs in the same order each time you listen.

I'll mention one other piece of information that at first thought may not be useful, but as I said, I'm not a tech!

I did have my programmer modify the player to use for several specific channels that play mp3 files in consecutive sequence. That is, all files must be named like this:

1-firstsegment.mp3
2-spotbreak1.mp3
3-secondsegment.mp3
4-spotbreak2.mp3

and so on--the important thing is the number at the beginning of the file name, which "tells" the player to play the tracks in numerical order,

Also: The player for these channels has a somewhat different user control panel, which does not have a skip forward (or repeat last track) function.  There are several of these channels. Two are:

http://www.radiogeorge.com/neonbeat/
http://www.radiogeorge.com/COS/

I'll be interested to hear what your analysis using this info turns out to be.
BillDLCommented:
Hello George

I am not sure whether you actually created the pages on your website or not.  If you did, then the following GENERAL information will already be known to you.  I am only providing it to give you a slightly better insight into how the players display on your pages if you weren't already aware.

Looking first at your "Radio George Country Oldies" show page:
http://www.radiogeorge.com/COS/

An embedded Flash player file like this is able to accept a bunch of command parameters strung together between the <embed> and </embed> tags in the HTML code of the web page.  In the case of the first player on the "Country Oldies" page, the embed code is:

<embed src="/embeddedmp3/neonbeat_player.swf?channel_id=120&imageName=%2Fembeddedmp3%2Fskins%2FCOSskin1%2Ejpg" quality="high" bgcolor="#000000" width="271" height="328" name="neonbeat_player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</embed>

Open in new window


Break that down into separate parameters to see what is going on:

The first main chunk is:

http://www.radiogeorge.com/embeddedmp3/neonbeat_player.swf?channel_id=121&imageName=%2Fembeddedmp3%2Fskins%2FCOSskin1%2Ejpg

Open in new window


The ? symbol is a scripting character used to indicate that the string that follows is to be treated as a command.
The & symbol is used in scripting to join commands together.
%2F is the replacement character for / and %2E is the character replacement for the dot in the file name.

using the Relative URL:
http://www.radiogeorge.com/embeddedmp3/neonbeat_player.swf?channel_id=121&imageName=/embeddedmp3/skins/COSskin1.jpg

using the Absolute URL:
http://www.radiogeorge.com/embeddedmp3/neonbeat_player.swf?channel_id=121&imageName=http://www.radiogeorge.com/embeddedmp3/skins/COSskin1.jpg

This tells the browser what *.swf file to load, tells the loaded player to find the channel, and tells it what image to show as the background image within the player's "window", in this case the sunset coloured image with the guitar and graphic equaliser bearing the title of the radio channel.

The second main chunk is:

bgcolor="#000000" width="271" height="328" name="neonbeat_player" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"

Open in new window


This sets the background colour, width, height, name of player, restrictions, type of content for the browser to recognise, and the URL for Adobe Flash Player in the event tat it is not installed.

Broken down into all the elements (incorrect syntax used only for explanation) here are all the parameters used for the embedded Flash object:
 
<embed>
src = "http://www.radiogeorge.com/embeddedmp3/neonbeat_player.swf"
channel_id = 121
imageName = "http://www.radiogeorge.com/embeddedmp3/skins/COSskin1.jpg"
quality = "high"
bgcolor = "#000000"
width = "271"
height = "328"
name = "neonbeat_player"
align = "middle"
allowScriptAccess = "sameDomain"
allowFullScreen = "false"
type = "application/x-shockwave-flash"
pluginspage = "http://www.adobe.com/go/getflashplayer"
</embed>

The "neonbeat_player.swf" is used on other pages, and seems to be programmed to ONLY show the Play, pause, and Stop Transport Control Buttons and does not show the Fast Forward or Rewind ones.  It loads the following images for the control buttons in the player's frame:

http://www.radiogeorge.com/Graphics/playbutton.gif
http://www.radiogeorge.com/Graphics/playingbutton.gif
http://www.radiogeorge.com/Graphics/stopbutton.gif

If you look at the player used on other pages, for example the Jazz Channel 1 page, the embed code loads:
http://www.radiogeorge.com/embeddedmp3/jazz_player.swf
and tells it to:
Load channel ID 29
Use the saxophonist background image: http://www.radiogeorge.com/embeddedmp3/skins/jazz.jpg
Display at 315 pixels wide by 270 pixels high.

The other parameters are the same, but this player displays ALL of the transport control buttons.  It does not appear to be fetching the small *.GIF images for these buttons externally from the folder:
http://www.radiogeorge.com/Graphics/
so we can only assume that they are all embedded within "jazz_player.swf".

In earlier comments we mentioned an *.XML file.  Sometimes these Flash web players are programmed to load a configuration file and/or a playlist file in XML format.  When used as configuration files the web designer has the option of keeping the same *.SWF player file, but renaming multiple copies and creating an XML file to make each copy display and behave in a different way.  For example, say you had one standard player that existed as "jazz1.swf", "cos.swf", and "oldies.swf".  You could then have "jazz1.xml", "cos.xml", and "oldies.xml" to provide different configurations for each player.

Depending on how a SWF file is programmed, an XML configuration file can be used to dictate anything from the size, background colour and image, volume level and play state at startup, through to whether to hide or show certain elements like the transport buttons, and is able to supply the parameters that would otherwise have to be given in the "Embed" code on the web page.

We are not able to see the contents of your "http://www.radiogeorge.com/embeddedmp3/" folder to see whether tere are any XML files in there alongside the SWF files because it is protected by username and password, which is a good thing.

I have to say at this point that I do not know enough about the actual programming of Flash, so *.FLA and *.AS files would only really be useful to LajuanTaylor who I can safely assume DOES have in-depth knowledge of Flash programming.  If you weren't prepared to attach any of your source files here, then I would have no objection to you liaising directly with LajuanTaylor or any other expert in private messages to share source files, but sometimes moderators form a different view of this.

As I mentioned at the top, the above is only for general information.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LajuanTaylorCommented:
@BillDL -  Excellent post.  I was thinking to keep things simple for RadioGeorge why not add a new page and player for music spotlights. I believe that the source files for the project jazz_player.fla can be modified to only include controls for - stop, play, and pause.

@RadioGeorge - I was thinking that the new player could be modified to only playback files with specific names. For example:
1-spotlightjazz.mp3
2-spotlightjazz.mp3
3-spotlightjazz.mp3

The main caveat to this approach is that you are adding a new page and player to support your music spotlights. However, the this approach still leverages the modular design of your existing Flash players.

Lastly, it might be possible to use the song title information that's displayed in the jazz, oldies, and variety players to disable controls when certain songs are played. However, that becomes more complex...
RadioGeorgeOwner/ProgrammerAuthor Commented:
You guys are great! I'll make some time to do some heavy-duty analysis of what you've said here. With regards to who built the pages, the master coding was provided by the programmer I hired to build all the stuff, and I tweaked it via edited trial and error enough to get the displays that I wanted, although said tweaking consisted of trial-and-error cutting and pasting with no deep coding know-how (no surprise there, eh?).

 ALSO: I have conferred with a friend of mine at M.I.T. who is a PhD in audio engineering with a deep background in computers, who ha examine some pages on the site and also provided some info. In part, he said:

...Anyway, without the button control exposed, it will be necessary to modify the player's code to either expose button control or to, as you proposed, passing metadata with each track in the play list to control buttons, etc. There might be additional track-by-track control that you'd like to do in the future, e.g., volume for voice-insert tracks. Your proposal is best, but complicated.

His comment about "passing metadata with each track in the play list to control buttons, etc.' seems to be to possibly dovetail with some of your comments, but I am not 100% certain of that.

My immediate reaction was "Is he saying that somehow, the player would be 're-started' to  play/display graphics for EACH mp3 file, so that certain player controls would not appear/not be available for skipping a selection?" And if so, would there be a jarring, annoying visual change for the user or a seamless, smooth transition with just the control bar doing a little change only a couple of times for designated mp3 files?

The plot thickens!
RadioGeorgeOwner/ProgrammerAuthor Commented:
I've been digging and digging to the best of my ability, but so far have been unable to find anything online about my idea of being able to deactivate the "skip" button on the player.

If anyone had any suggestions on the proper forums in which to post this problem, let me know.

I am thinking that if what I'm asking for is not possible, I may just replace the players in question with the other ones I mentioned that simply do not have pause controls.
LajuanTaylorCommented:
@RadioGeorge - Yes, the quick fix would be to just replace or add players without the skip and pause controls. The downside is that end-users would have to navigate away from the page if they wanted to stop playback. I'm not sure if this would be good for your ad revenue potential...

I'm not sure what the plans are for the future of your site, but you may want to look into using a different type of player. Maybe something that also supports playback on mobile devices. There's lots of options to choose from but, I thought the following player was promising https://amazingaudioplayer.com/. It allows you to create an HTML5 based player that works for desktops and mobile devices within your web browser.

http://www.w3schools.com/HTML/html5_audio.asp (HTML5 provides a standard for playing audio files.)

Also, the amazingaudioplayer.com site mentions support for WordPress. To free yourself from having to depend on a programmer, you might also want to take a look at what WordPress can offer.  Here's a couple of resource links:
https://en.support.wordpress.com/ (learn about WordPress)
https://www.wonderplugin.com/wordpress-audio-player/ (Plug-in for managing your MP3 audio with WordPress)
 
If you want to expand your listener base, adding support for mobile devices is the way to go. Android and iOS (Apple) based devices don't support the Flash plugin.
RadioGeorgeOwner/ProgrammerAuthor Commented:
LaJuan,

Regarding the quick fix: the player being used right now DOES have a pause control that allows the listener to pause playback and still continue on from that point. I'm thinking now that one possible solution would be to just eliminate the skip backwards and skip forward buttons.

The thought of changing players literally just crossed my mind today. The one you suggested looks pretty good.


Regarding expanding the listener base, I discovered after getting my Samsung Note II that I could not listen to Radio George on it--until I downloaded the Puffin App, which did the trick just fine. I emailed my newsletter subscribers, and received many replies about how easy it was to use and how well it worked. And, to my great surprise, the stats, which show what type of access device listeners use to listen, lists phone-type devices as SECOND on a list of about ten types! I'm sure more can be done, as you suggest. I did have a company develop an app a couple of years ago, but it was terrible, and after three or four reworks, I yanked them all.

I hate the thought of learning Wordpress, simply because of the demands on my time right now, and my familiarity with FrontPage, which still works just fine for simple pages.

After I hear from some other experts (at least I hope they are!) I have contacted outside of EE, I will wrap this up here and award the points.
RadioGeorgeOwner/ProgrammerAuthor Commented:
Under the circumstances, a VERY good job by both experts who spent time and attention to providing understandable information. While the exact solution is still out there, the information provided here is a solid basis upon which to find and probably build the best answer. Thanks to both!
RadioGeorgeOwner/ProgrammerAuthor Commented:
Directed to the EE honchos: the system of awarding points currently being used is a real pain in the you-know-what. "Best solution" is often not really applicable, as in this particular question, where I wanted simply to split the total between the two experts who participated. There has to be an easier way to do this other than the truly cumbersome way it's being done now.
BillDLCommented:
Thank you George, and I fully agree about the cumbersome process.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MultiMedia Applications

From novice to tech pro — start learning today.