Skip to content

Commit 788ba29

Browse files
committed
patch v3.0.5: IE<10 dataset patch, border fix
1 parent ac5ed8f commit 788ba29

File tree

7 files changed

+67
-24
lines changed

7 files changed

+67
-24
lines changed

README.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Turn any element into a lightbox or popover link for Youtube and Vimeo videos.
66
### MAJOR BUG IN (3.0.0 - 3.0.2)
77
If you are using these versions you will be unable to initialize on elements specified by id rather than a class.
88

9-
**Corrected in version 3.0.3**, so upgrading is highly recommended.
9+
**Corrected in version 3.0.3+ **, so upgrading is highly recommended.
1010

1111
### 3.0 is a significant update (complete re-write).
1212
Some things have changed, though the only real non-backward compatible change is a couple updated defaults.
@@ -107,7 +107,9 @@ Alternatively, for a simple setup you could initialize on a class, set your opti
107107
```
108108
109109
### Passing in Options
110-
Options can be passed in any of three ways. They can be passed as attributes off the element object:
110+
Options can be passed in any of the following three ways.
111+
112+
#### Options as attributes off the element object (local to element):
111113
112114
```javascript
113115
videoLightning({
@@ -123,7 +125,7 @@ videoLightning({
123125
});
124126
```
125127
126-
They can be passed as attributes of the `setting` object (doesn't apply to jQuery style init):
128+
#### Options as attributes of the `setting` object (global, overwritten by local, doesn't apply to jQuery style init):
127129
128130
```javascript
129131
videoLightning({
@@ -142,9 +144,14 @@ videoLightning({
142144
});
143145
```
144146
145-
Or they can be passed as data attributes: *(Note that data attributes are all prefixed with `data-video` and camel cased options should be dashed instead in data attributes. So `startTime` becomes `data-video-start-time`)*
147+
#### Options as data attributes:
148+
149+
*(Note that data attributes are all prefixed with `data-video` and camel cased options should be dashed instead in data attributes. So `startTime` becomes `data-video-start-time`)*
150+
151+
*IE<10 does not support `dataset` and as such the only backported settings that work with older IE versions are `id`, `width`, and `height`*
152+
146153
```html
147-
<div class="video-link" data-video-id="y-PKffm2uI4dk" data-video-width="1280" data-video-height="720" data-video-autoplay="true"></div>
154+
<div class="video-link" data-video-id="y-PKffm2uI4dk" data-video-width="1280" data-video-height="720"></div>
148155
```
149156
150157
### Available Options
@@ -183,7 +190,7 @@ Video Lightning exposes all available basic API options for both Youtube and Vim
183190
Color of iframe video will fill
184191
185192
- **frameBorder** *(String [border/outline css shorthand] - default="none")*
186-
Video iframe border `ex: '3px solid #555'`
193+
Video iframe border `ex: '3px solid #555'`, *note: will change aspect ratio of video*
187194
188195
- **glow** *(Integer - default=20)*
189196
Glow around video frame
@@ -280,6 +287,10 @@ Some of Youtube's options are not listed below, but everything on their params p
280287
Changes
281288
----
282289
290+
### Patch [3.0.5]
291+
- [BUGFIX] backport `id`, `width`, and `height` data-attribute specification to work with IE<10
292+
- [BUGFIX] use CSS `border` property for borders instead of `outline` (note, will change aspect ratio if `frameBorder` enabled)
293+
283294
### Patch [3.0.4]
284295
- [FEATURE] added options for iframe background color `frameColor`, iframe border `frameBorder`, close button border `xBorder`
285296

demo/javascripts/videoLightning.js

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/videoLightning.js

Lines changed: 15 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)