- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM Video paused Property
The HTML DOM Video paused property returns a boolean (true/false) corresponding to whether the video is playing or not.
Syntax
Following is the syntax −
Returning boolean value
mediaObject.paused
Let us see an example of HTML DOM Video paused property −
Example
<!DOCTYPE html> <html> <head> <title>HTML DOM Video paused</title> <style> * { padding: 2px; margin:5px; } form { width:70%; margin: 0 auto; text-align: center; } input[type="button"] { border-radius: 10px; } .dimLight { background-color: #000; } </style> </head> <body> <form class="dimLight" id="formSelect"> <fieldset> <legend>HTML-DOM-Video-paused</legend> <div onclick="getTrackDetails()"> <video id="demo" width="320" controls><source src='http://www.tutorialspoint.com/html5/foo.mp4' type="video/mp4"></video><br> </div></fieldset></form> <script> var formSelect = document.getElementById("formSelect"); var demo = document.getElementById("demo"); demo.autoplay = true; function getTrackDetails() { if(demo.paused) formSelect.classList.add('dimLight'); else formSelect.classList.remove('dimLight'); } </script> </body> </html>
Output
Before clicking video to pause it −
After clicking video to pause it −
Advertisements