Forum Moderators: open

Message Too Old, No Replies

Should I use an iframe for my SWF player?

         

charlee

7:30 pm on Apr 11, 2008 (gmt 0)

10+ Year Member



Im designing a website for a magazine and they want a swf player in the top of the page with some music. This player should of be there in every page, normally i just use an include directive in the php code to build up these templates but the thing is that this way is gonna re-play the swf every time i click the menu bar, so the music is gonna start over again, and they dont want that. Should i use an iframe for this? Dont have a clue really cause never used them in my life, i know some good web applications wich employ them like google maps tough. Right now im reading an article to know more about this, i would really appreciate any extra help on this specific example.

thanks in advance.

webfoo

7:04 pm on Apr 12, 2008 (gmt 0)

10+ Year Member



I would use just a regular frame. Have the music player in a horizontal frame at the bottom, and the site content in a frame taking up most of the screen. Iframes are not supported in so many browsers.

Personally, I would advise against the music. People don't like music suddenly starting without their consent. Unless it's part of a fancy flash intro to the site, I'd ask them if you can leave the music off.

Xapti

4:16 am on Apr 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



iframes are supported by virtually all modern browsers, I thought. They can be much more useful and/or easy to manage than normal frames, except they would have no purpose for this application.
Normal frames would be the only way to go to get music playing continually while navigating different pages, unless the entire page was something like flash. It could also potentially be possible to get relatively uninterrupted music over multiple pages by adding some script that transmits the position the music was playing, and send that info to the next page so that it will position the music to the right spot... but that would add bloat to the page, wouldn't work for those people with javascript disabled, and would still have interruptions in between page loads (I'm not even sure if it can be done, but it seems possible).

As webfoo said, overall for most situations, music playing is a bad thing to be doing in the first place anyways. Even with toggleable control (a must), unless its off by default, it would still make sound at the start. Even when off by default, you then have a likelyhood of no one noticing the 'on' button, as well as the fact that it makes your page use more bandwidth, slowing page load.

rocknbil

5:17 pm on Apr 13, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My abhorrence of anything that has the word frames in it prompts me to suggest a different solution.

I would set a cookie and read the cookie in, pass this value to the Flash object. The cookie value would be used as a queue point within the Flash to determine on, off, current play position. No cookie? Leave it off by default.

webfoo

1:11 am on May 9, 2008 (gmt 0)

10+ Year Member



Just thought of another way to do it: Do a JavaScript pop-under with the music playing in that. Then it will continue no matter what page you are on in the main window.

Make sure it's a pop-under, because pop-ups get annoying fast. Beware that people may have popup blockers.

thecoalman

9:14 am on May 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If there is anything that is going to annoy someone I would think its a pop-under that continuously plays music that you have no visible control over, especially if it doesn't go away when you go to another site.

What I did for a bands site is created a user activated pop-up with the player embedded. Nice and compact and really gave it the feel of a separate program. There is one additional benefit, once they navigate away from the site they still have the window open so can continue to listen to the music. I set mine up to generate random playlists on each load, in effect creating a mini-radio station.

paulmadillo

8:45 am on May 13, 2008 (gmt 0)

10+ Year Member



That's exactly how I would do it.

Users don't like things popping up at random or playing music without their consent.

Just have a nice visible clickable image that generates a popup and make it visible on all pages.

If your client wants you to go down the frames route, advise against it but at the end of the day having a nice subtle frame with an swf wouldn't be the end of the world. Just don't make it autoplay whatever you do.