snaphash/README.md

22 lines
467 B
Markdown
Raw Normal View History

2015-09-25 15:33:45 +00:00
Snaphash
========
2015-09-25 15:41:15 +00:00
Preview video frames on `<img>` elements with ease.
2015-09-25 15:33:45 +00:00
2015-09-25 15:41:15 +00:00
How does it work?
2015-09-25 15:33:45 +00:00
```html
<video id="myvideo" src="big-buck-bunny.mp4"></video>
<img data-snap="#myvideo@00:00:15" />
```
```javascript
Snaphash('img');
```
2015-09-25 15:41:15 +00:00
That's all, a preview of video's frame at 00:00:15 will be shown in the `img` element.
2015-09-25 15:33:45 +00:00
2015-09-25 15:41:15 +00:00
You can omit unnecessary zeros from time, i.e. `#myvideo@15` is the same as `#myvideo@00:00:15`.
2015-09-25 15:33:45 +00:00
See a [demo](http://mdibaiee.github.io/snaphash)