Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariel-MN committed Feb 7, 2021
1 parent 00156e4 commit 757a101
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# js-vido
js-vido — JavaScript Video Download Optimizer
=============================================

A JavaScript library for optimizing html pages with video content that prevents videos from loading on mobile devices.

What it does
------------

Prevents videos with the "optimize-video" class from being downloaded to mobile devices by displaying the poster image instead. This is done by creating the source element of the video node through the data-src attribute only in case the device used is a laptop or desktop computer.

One of the cases where this functionality can be useful is verified with auto-play videos used in web page backgrounds, because auto-play does not work on mobile devices, the video would be downloaded unnecessarily, slowing down the loading of the page and consuming mobile data.
6 changes: 6 additions & 0 deletions js-vido.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 757a101

Please sign in to comment.