I have an youtube video playing in a specific frame. After researching a lot and not being able to properly destroy the player when exiting the frame, I decided to put a SoundMixer.stopAll() in all frames that can be used to get out from the youtube one. That makes things right in most of cases, because to access the video again I must click a button that reloads the player and everything gets back to the start. But I have some thumbs on the right side of the page that when clicked open a large image, occupying most of the page and not showing the video button, but they have a close button themselves. When I click the close button that movieclip becomes invisible and the one with the youtube video becomes visible again (what's great in all other cases). The point is: the player kept playing in the background and when I close the image you can see it playing again, but without sound. The only way to make the sound audible again is clicking on the seek bar (because it isn't a flash component itself, differently of the play/pause button) or going to another frame (that not one from the thumbs/images) and coming back. How could I make the sound play again automatically when entering the frame? Help to destroy the player when exiting the frame is also welcome.
Related
As we all know that when we minimize the UWP app it goes to suspension. and then again when maximized it is exactly at the same place, for all pages. I want to do the same for specific pages, on my own. meaning that I want to do the same operation for one or more pages, when I switch between pages in my app, without minimizing? when app is minimized, even the videos playing on it pause automatically, and when maximized they play themselves, I want to achieve that functionality when I switch to next page and when I come back to previous page, it should start playing again, like it was suspended. thankyou in advance.
The app I am making plays a video on a url in a webview on a page, I want that when I come back to that page after navigating somewhere else on my app, that webview start playing exactly at the same place. Thats exactly wht happenes when I minimize my app. but i wanna do that without minimizing it.
Also I have tried cahcesize of my frame and set navigationmode of my page to enabled, that just saves the current state, and the media on my page keeps on playing when I navigate to another page, it should pause, but it keeps onplaying
I have a pro account and I have stripped everything off the player. the play/pause button is of course fine but I want it to fade out after a second or so...
I built a little test player, to illustrate the issue. HERE
You can press play from the video or the external control. Once playing if you click the progress bar, that triggers a few calculations then seekTo the point in the video. This all works great.
The issue is that once you "seek" / click the progress bar, the pause button won't fade out.
I know I can't hide the play/pause button in favor of my own but this is pretty detrimental to the video having a huge button in the middle if the user seeks the middle...
I appreciate any help in advance.
You can capture the seek event (you already does in line 53 of your index.html player.addEvent('seek', onPlayProgress);) and place the following code to force the control to fadeOut after 2 seconds (you can play with it)
setTimeout(function(){
$('#player1').contents().find('#player > div.controls-wrapper').fadeOut()
}, 2000);
I'm setting up a radio/stream player on a website. The player could be an iframe with/or an object (type="application/x-shockwave-flash") or an <audio> element, inside the document in a sidebar, repeated all along the website. When the stream is playing and you browse thru any link to another site of the website the stream is obviously interrupted because of the loading of the site.
I want the player to keep playing even if I browse to another part of the site thru a link (ex. click on HOME) just like SoundCloud and Hypem do. I know these site are doing it by refreshing the rest of the site with ajax and leaving the player untouched.
My question is, is there another way to make this iframe/object/audio element to keep playing?
Once you have switched to the next page, everything on the original page is destroyed and stops running. There is no direct way around this fact. As you have said, the other sites work by not actually switching pages.
A common way to keep the audio going is to use a popup window for your player. This way, the audio player page is still around. You can even communicate with it from the other pages. (Check out JunoDownload.com for an example.) This is not typically a good method, as many popup blockers simply block all popups. Most popup blockers only block popups initiated outside of a user action though, so if you had a "play" button that launched the popup window, most users would still get it. Another reason this is a bad idea though is because it is a bit of a jarring user experience.
Another way is to simply set your link targets to _blank, opening them in a new tab or window. Just be careful to only do this from links from your player page.
Finally, some sites will continually post playback status to the server. On the next page, if a song was playing on the previous page, a new player will be started at the point in which the last page stopped. This is a bit annoying though, as the music stops for a period of time while that player loads.
http://jsfiddle.net/BC2VC/
I built an extremely simple audio player. Its just a .png in the background-image: of a <button> that uses .toggleClass() to change the background position of the .png showing a pause button.
I used javascript code that I found on a w3 reference which is a function that links the audio players play and pause events to the <button>.
I have three problems...
One, I cant figure out how to get one audio track to stop when the next when is clicked. I only want one track at a time to be able to play.
Two, if you click the play button for track one it switches to a pause button as it should, but then clicking on track two , both track one and two will show pause buttons. I need track one to switch back to a play button when any other play button is clicked, only one track at a time should show the pause symbol.
The third problem is: The code in the jsfiddle link above works to play the audio everywhere Ive tested except in jsfiddle.
here is a link to a page using the same exact code on my godaddy server...
http://liveoilfree.com/wtrclrwtrclr/index3.html
I'd recommend using one <audio> object and change it's source when user presses play on another song.
Use a javascript for-loop to reset all the play buttons except the active one.
Link that might help:
http://www.html5rocks.com/en/tutorials/webaudio/intro/
I'm trying to have a buttons show up to pick different options as a video is playing. Right now I have the buttons showing up when the page is loaded which means it sometimes trows the button sync out. How do I fix this? here is the link to my site. You have to wait until the video starts to play and you will see the buttons show up. But again it's timed with the page loading not with the video I'm trying to get it timed with the video.
http://preview.visiondesignstudio.net/WesternUniversity/Demo/
the simplest way would be to add an eventlistener to your video element based on timeupdated event. in the code that's called check the video's currentTime and compare that to the time(s) you want the button to be visible (eg you could have an array with elements listing buttonid, start-time and stop-time and show/hide the buttons as appropriate)