I am using Brightcove for my videos, however, I need to be able to click on a selection of buttons to go to specific timestamps within the video.
I have found how to deep-link (https://support.brightcove.com/deep-linking), but this is to start a video at a specific point, rather than change the time of an existing or playing video.
I need to be let the user click on links like this (as an example):
Go to 60 seconds
Go 5 minutes
Go to 20 minutes
Clicking on any of those links will update the video.
Please help! Thank you.
Use the player API
myPlayer.currentTime(60);
Related
I'm trying to add videos to a media source in javascript following this example.
I added the below to the original javascript file, after line 44
//Original file
sourceBuffer.appendBuffer(clipsToAppend[clipIndex]);
//Added
$("button").click(function(){
sourceBuffer.appendBuffer(vid);
})
What I was expecting was to be able to add videos by button click but what happens is that the original videos are added and play, but when I click the button to append, it adds the time to the video seeker (if the video is 5 seconds for example, and original videos add up to 20, clicking the video 4 times will 20 seconds, so 40 seconds total) but the video stops playing at the original 20 second mark with a loading symbol. I know that the problem isn't with the videos because I've tested them all in the original appendBuffer and they work just fine.
Also, is there a way to continue to add video before it reaches the end? I was thinking of using a settimeout unless there's a better way.
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.
I'm looking at automatically deleting recordings on my Hotjar account where videos are longer than 30 seconds, and where users land on a specific page.
There are Javascript triggers available, but there doesn't appear to be any Javascript trigger to automatically achieve this.
We're looking at only recording videos where they are shorter than 30 seconds.
Hi to everyone and thank you in advance for the help! I have an html page with only videos (about 20 of them). What i'd like to have is the play/pause click in every one of them (without showing the controls).
Basically when you click in the area of one video, that video should stop and when i click back it should continue playing...
Any help will be very appreciated!
If you're using the html5 video tag, there are play() and pause() functions associated with it. You can put a div over the video and toggle the video on its click event. Here's a jsfiddle with an example of this.
Videos also have a currentTime variable that is both readable and writeable, so you can do useful things with that as well.
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