K
K
keche2018-04-10 13:57:17
css
keche, 2018-04-10 13:57:17

How to make a working pause for HTML player on JS?

The task is next. There is a button that shows and starts the player through: Pause is written like this: How to make a pause button appear in place of the start button. After all, you can’t assign two properties to one element at the same time, if I pause, then when the player starts, it appears and the video is immediately paused, but it needs to be played.
$('.video-play').show();
video.pause();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-04-10
@webinar

How to make a pause button appear instead of the start button

remove one button, put another. I don't understand what is the problem? Did you start learning the video api without understanding js?
If you pause the video, it will be paused. This is logical to me. If you want to start play, then why are you pausing? If you hit your head against the wall with a run, there will be a bump. Causal relationships. Don't pause if you don't want the video to be paused.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question