A
A
ash_12014-10-23 01:23:32
JavaScript
ash_1, 2014-10-23 01:23:32

Break all connections of uploaded video files on the page, except for the current one?

I use the videojs plugin, I implemented ajax transfer of video files on it, a la YouTube.
So I poke at 1 video, then at 2 videos, 1 video elements on the page are no longer there, but the download still continues (it shows in the logs), although I watch video number 2. So here's how to break the connection with this past video, this happens by the method get inside the videojs script since I'm new there for me there are hieroglyphs everywhere, help me rummage there what to fix.
A similar solution is observed when I click on the progress bar of a video record, the previous connection is broken, a new one is created.

Help, I've been fighting for 2 days now. It is necessary that when you poke on video number 2, only it is loaded, and the past ones stop.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Lepshiz, 2014-10-23
@ash_1

The solution in the forehead is to clean the src of video, to start inserting the url into src and calling .play (). No matter how it was passed to the video url to the source, to src, or using source, the url of the current source is stored in nodeVideo.currentSrc, and clearing the src attribute (even if it is empty, as in the case of source) aborts the download.
jsfiddle.net/0v924kf1/3

W
whats, 2014-10-23
@whats

What is in your understanding - (in the logs shows)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question