How can I do to continue playing a video when the user close the tab? Is there any possible way?
For example, YouTube.
I thought that perhaps before closing the tab I could store the current position and continue playing from there, but I could not figure out how.
A simple way could be to store their position in the video every 5 seconds or so? I'm not sure how expensive that could become on the back end though.
Related
Sorry if I am not posting in the correct way or in the correct spot, but I am in dire need of help and you are kinda my last resort.
My problem is:
We have Monitor A and Monitor B.
On monitor B I need to have a webpage open at all times that has a list of things that refreshes automatically every 30s.
Problem is, when I click anywhere else on Monitor A, that automatic refresh stops and it does not start again until I click anywhere on that webpage on Monitor B.
Is there a way to make that list think that the webpage is not in the background so it won't stop the refresh?
I can not use an autorefresh for the whole webpage because if I do that, it will also erase all the filters from my list.
I have tried using it always on top, but it does not help :(
If someone is able to help me with this, I would gladly appreciate it 🙏
You are my last resort other than connecting a laptop to it 😔
I'm trying to rebuild the audio effects this page has http://resn.co.nz/
When hovering over one of the icons an audio file is played that keeps playing even when the next page is loaded. This feels smooth and has a good UX. I have rebuild it as far as I could, however in my case when I click the icon the audio clip stops … How can I prevent this?
Your problem is that when your page redirects and the new one opens, there is a break while everything is loading. On the example you cited, it is never actually redirecting the page, it is just changing the URL. You know it's not redirecting because of the # in the URL. You can learn more here.
I have a JWPlayer playing video in a page, when people accidentally click a link in that page or the F5 button, the player will stop playing automatically and start to redirect to other page.
I use below function to help viewer to make sure this action is not made accidentally, but this could not keep the player continue playing, so is there any solution?
window.onbeforeunload=function(){...};
The best solution would be to update a cookie with the player's position on reload, then do seek on('ready') with that value. I don't think you can continue video play when a page is reloaded, but this would give the impression of continuous play.
I am fiddling with Youtube API for my project, with the iFrame API in particular. And what I want to do is to show the player controls only when it is playing, not when it is stopeed or paused. I've searched through all the API for this feature, but it seems it is possible to change the player's appearance only by destroying at and creating a new one.
So, the question is, is it true? Or can I still change the player somehow?
Thank you!
I am 99% sure that you can only do this by "destroying" it and starting again. As you said there is no mention of it in the docs and the Parameters are sent on load, so you would have to resend them somehow, and not allow the reply back to change the video.
The only thing I suggest, is could you using the API trace what time in the video the change occurs, then reload the page with the new params and start the video where you left off?
I need a video to automatically pop up, ideally in a lightbox. It needs to automatically pop up when a user first visits the page, play the video then close. I also need a button to play again if needed. I also only want this video to play the first time a person visits the homepage, so when you navigate back to the homepage it will not play again.
Diodeus has a good point. The stack overflow community is to help specific questions, not to write programs for each other.
You have a number of needs, and I will try to help you sort them out:
Embedded Video
Lightbox
Automatic Popup
Stored State
Embedding videos can be a challenge. Quickly searching TheGoogle (embed a video) gives me this link:
http://www.hunlock.com/blogs/Everything_You_Ever_Needed_To_Know_About_Video_Embedding
I did not read it, but the point is you can find many resources for video embedding.
Lightbox
There are many lightbox scripts ( http://www.lokeshdhakar.com/projects/lightbox2/ ), you will have to slog through them to find one that you like.
Automatic Popup
If you're using jQuery I would suggest the jQuery.ready function.
Stored State
To see if a user has visited the homepage before, I would suggest setting a cookie. http://www.quirksmode.org/js/cookies.html