Button show up at a time during video html5 - html

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)

Related

How to autoplay play unmuted media without user interaction on angular

Can it be done? I've been tryind to find some workarounds for a couple of hours now, like triggering a click event on an undisplayed button after the page loaded or using ngAfterViewChecked, I need to do this because I'm trying to create a game and I want the main menu to have some background music, obviously I'll add the options to mute it and turn up/down the volume later, but I'd really like it to start with it instead of having something that says "ehy click me to turn on the music" coz that would be quite stupid and ugly on the page, what's odd is that like 80% of the times when I re-compile the music starts, but when I reload the page not
Most browsers today require user interaction unfortunately, no way around it. The button could just say "click to start"
https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide

vimeo js api seekTo leaves the play/pause button visible

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);

html 5 audio pause and play issues

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/

How to change video status to set to start point, while accordion hidden?

I have a accordion with 4 titles, each titles have one video. while user click on the title, the content will slideup, so it will hidden. while the video player with accordion slide, the user can change in to next slide, but in case the user come back to previous one, the video is 'on' and that in playing state.
what is need is, while accordion slideup, the video has to stop and set to back in the start point of the video, every time the user click, then only it need to play. in case if the slide is hidden, video has top and set to back in the start point.
i found a answer to set back to currentTime to 0...is that correct way? any one help me to showing correct way to archive this?
Thanks in advance...
it's works for me:
videos.each(function (n,v) {
v.pause(); v.currentTime = 0;
} )

How to reactivate sounds from youtube after using SoundMixer.stopAll()?

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.