favorite-icon-video
v2.3.2
Published
A small library for video manipulating desktop favicon
Downloads
32
Maintainers
Readme
⏩ Favorite Icon Video
Small library for video manipulating with desktop favicon.
Desktop browser support
- Chrome: ✅
- Edge: ✅
- Firefox: ✅
- Opera: ✅
- IE: ❌
- Safari: ❌ (Safari hides favicons)
Installation
npm install favorite-icon-video
Demo
API
.start()
Starts tracking the video and changes the favicon.
import { FaviconVideo } from 'favorite-icon-video';
const video = document.querySelector('video');
const favVideo = new FaviconVideo({ video });
favVideo.start();
video.play();
.stop()
Stop tracking the video and changes the favicon.
import { FaviconVideo } from 'favorite-icon-video';
const favVideo = new FaviconVideo({
video: document.querySelector('video')
});
// ...
favVideo.stop();
.reset()
Reset the favicon.
import { FaviconVideo } from 'favorite-icon-video';
const favVideo = new FaviconVideo({
video: document.querySelector('video')
});
// ...
favVideo.reset();
.destroy()
import { FaviconVideo } from 'favorite-icon-video';
const favVideo = new FaviconVideo({
video: document.querySelector('video')
});
// ...
favVideo.destroy();
License
MIT License