-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
playsInline
attribute on the video element (#7928)
- Loading branch information
1 parent
4f80c6b
commit e4e4d5b
Showing
4 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
describe('VideoOverlay', function () { | ||
var c, map; | ||
var videoBounds = L.latLngBounds([[32, -130], [13, -100]]); | ||
|
||
beforeEach(function () { | ||
c = document.createElement('div'); | ||
c.style.width = '400px'; | ||
c.style.height = '400px'; | ||
document.body.appendChild(c); | ||
map = new L.Map(c); | ||
map.setView(new L.LatLng(55.8, 37.6), 6); // view needs to be set so when layer is added it is initilized | ||
}); | ||
|
||
afterEach(function () { | ||
map.remove(); | ||
map = null; | ||
document.body.removeChild(c); | ||
}); | ||
|
||
it('create VideoOverlay', function () { | ||
var overlay = L.imageOverlay().setStyle({opacity: 0.5}); | ||
expect(overlay.options.opacity).to.equal(0.5); | ||
|
||
|
||
var videoUrls = [ | ||
'https://www.mapbox.com/bites/00188/patricia_nasa.webm', | ||
'https://www.mapbox.com/bites/00188/patricia_nasa.mp4' | ||
]; | ||
|
||
var videoOverlay = L.videoOverlay(videoUrls, videoBounds).addTo(map); | ||
|
||
expect(map.hasLayer(videoOverlay)).to.be.ok(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters