I developed a band website using wordpress, and I placed a flash MP3 player that autoplays in the header. Whenever you click on a link, the entire page refreshes and the mp3 player starts playing the first song all over again. I wish to have the entire header including the mp3 player) stay constant while the content/sidebar/footer reloads when you click a link. That way the music will continue playing while the rest of the page loads, and the user can have a real listening experience.
To all of your knowledge, is there any way to do this without making the rest of the site completely dynamic?
Thanks in advance
There are acutally only two ways to do this without Ajax:
Use a frameset (which is a very bad idea nowadays)
Use a pop-up which holds the player
I know that pop-ups might be blocked, but this is the only way that users will accept. many large sites with audio players use pop-ups for such a functionality.
Related
I am building a WordPress website for an radio station. They want to integrate the streaming option into the header and give user the ability to navigate their site without taget_blank or _blank and keep streaming.
So basically they would like users to listening to their radio without putting the streaming window in a popup or any other window what is not the landing page.
Only think i could think is to not refresh or load the entire new page while user is surfing and leave the header fix.
Does anybody has any idea how to get this done?
Appreciate the gesture.
I found a solution based on Frameset, but I think their must be something better, maybe ajax or something.
The problem can be seen this page: http://ignitingthesixthsense.com/pre-launch-1
The issue is with the pluggin called Social Discount Press. The purpose of this pluggin is that it prompts the user to share your webpage via social media, and if they do so a link will then appear giving them access to restricted content.
There are actually 2 problems, but I am not sure if they stem from the same issue or not.
1) The first issue is that I have placed the social share buttons on the page twice using this shortcode:
[social_sharing_discount index="2"]
And the second instance of the share buttons (towards the bottom of the page) do not work properly. The Facebook and Twitter button activate the share box when clicked, but after sharing, the "instant access" button does not appear beneath the share button as it should. And the Google button does nothing at all when clicked. I have found that if I remove the 1st instance of the share buttons (at the top of the page), then the second instance of them starts working, so in other words it only seems to work properly if there is one instance on the page at a time.
2) The second and much much smaller issue, is that when the Google share button is clicked, the access button appears before the person actually shares.
And assistance with this would be greatly appreciated.
I have found that the main cause of the issue was due to the pluggin being built mainly on ID's which need to be unique across the page. And having multiple instances of the same ID was causing many errors.
The solution was to rewrite some of the php and js to use Classes instead of ID's. This allowed for two instances of the pluggin to work on the same page, thus solving problem number one.
The reason why the google one is so inaccurate is because the author simply opens up a popup to the google share page in a popup, this doesn't allow us to see the JS events such as when we share.
On the other hand because the twitter and facebook jssdk are loaded into the page, we know the exact moment when there has been either of those have been shared and thus accurately display the instant access button.
Due to this the author of the pluggin is just doing a best guess as to when the user is likely to have shared. It this case the author is guessing that when the javascript onunload event fires, that logically the user has shared on google. Now the onunload event can be fired in multiple ways, one is when the user closes the popup, i.e the best guess scenario as to if the user has shared. However the onunload event also fires when the form loses focus, a user naviagtes a way or a link is clicked.
Furthermore the onunload event is only properly supported in IE, FF and Safari, not Chrome and Opera. Which in the end gives it differeing behaviour in different browsers.
All of this can lead to unpredicatable behaviour, such as what you are noticing.
A better solution would be for google to have a jssdk for the the google plus share that let's us create a share box on the fly, however it's lacking that functionality as of now.
I have an asp.net page with an iframe in it that shows a youtube video. I have buttons that use the youtube api to control the video. I'm finding that often the video doesn't show up, and I have to do a view-refresh to make it work. This problem is limited to Internet Explorer, I believe that Google chrome does not have the same problem.
I've been told not to use iframes at all by a tech support person at the server company that hosts my site. They say people are moving away from iframes, and that I should use other methods of embedding youtube videos.
I could certainly do that, but youtube recommends using iframes, because they are more flexible.
If I could make the 'refresh' problem predictable, I would submit it to Microsoft, but I can't figure out why it happens sometimes, but not other times.
I could also force a refresh.
My question is, does anyone have a clue why this bug is happening.
Thanks.
This happens a lot with IFRAME content. I believe it's to do with the way that Internet Explorer caches stuff, but to be perfectly honest, I'm not sure on the details.
What I can share is an old trick we used to use with dialog boxes.
Say your src attribute is "http://www.youtube.com/watch?v=1wL7RHoDnxs"
You can bang an extra parameter onto that GET string, like:-
"http://www.youtube.com/watch?v=1wL7RHoDnxs&doesntmatter=203933"
See the extra doesntmatter parameter there? The value is random, or based on a timestamp. Your choice. The trick is to give a different URL to IE each time. This'll stop it from trying to use a cache for your IFRAME content.
I noticed that the PlayN doc says that you can only call Playn.run once. Here is my scenario and I'm looking for advice on how to tackle it.
Let's say I have a list of games to choose from in a menu on my web page. Upon clicking a game, I call PlayN.run on that game and it runs on my web page inside the playn-root div. Now lets say I want the user to be able to stop and load a new game by selecting a different one in the game list and load that into the div and play that.
How would I go about tackling that? Do I need to re-register the HtmlPlatform all over again and the play the new game? Or is there a way to destroy the current game and then play the new game using the existing platform which is already registered in PlayN?
The easiest route would be to just use normal HTML links and have each PlayN game be on its own web page (which could be in an iframe if you don't want the URL to change at the top of the browser).
Trying to clear out and reinitialize everything internally is just a big waste of effort when the web browser will take care of all of that for you when you reload the web page.
I need to track youtube video status.I need to check the video is played till the end or not.After clicking an play button,user has to see the video till the end. Depending upon this i need to issue a certificate to my user. For this task i need to track the status of youtue video. how can i do this in asp.net?
I doubt you can do it for certain, best I imagine you could do is with some Javascript, start an embedded youtube video playing (set it to autoplay and it will start as soon as the page has loaded), then start a timer in Javascript for the same length of time as the video takes to play.
If the time gets to the end, and the user is still on the page, then they might have watched the whole video. In which case you could make a call back to the server (Ajax or to a ashx handler) saying that is is complete. Then redirect the viewer to the certificate page.
You'll never know for certain as they could start teh video running then walk away to make coffee or something. And I doubt Youtube expose this data themselves (ie, did the end of the video play).
This can be done using Youtube Javascript API. Learn more at YouTube guide for dot net developers. Also see YouTube JavaScript Player API Reference and especially the section on event handlers.