V
V
Valery Stolyarchuk2016-03-20 14:44:52
JavaScript
Valery Stolyarchuk, 2016-03-20 14:44:52

Auto play video excluding one video, how to do?

Hello! There is a script : jsfiddle.net/jAsDJ which works for me, but I need to disable auto scroll play for one video, how can I do that ?
I tried the selection of elements does not work, please help. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Ratnik, 2016-03-20
@Ratnick

In this line

var videos = document.getElementsByTagName("video")

instead of searching by tag, use a class that applies to all videos except the one that should not be played:
and write this class to all videos except one
class="video"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question