-
Notifications
You must be signed in to change notification settings - Fork 4
Add update method to switch the current placeholder and/or video #25
Conversation
…ure specs have autorender option set to false.
f2c5a8e
to
42ba660
Compare
42ba660
to
0422ed8
Compare
@@ -1,6 +1,18 @@ | |||
/* global console */ | |||
import './../../main.js'; | |||
import OVideo from '../../src/js/video'; | |||
|
|||
document.addEventListener("DOMContentLoaded", function() { | |||
document.dispatchEvent(new CustomEvent('o.DOMContentLoaded')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't want to dispatch this if your instantiating it manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
17cfe64
to
924fac4
Compare
924fac4
to
9ca7ecf
Compare
@@ -4,6 +4,8 @@ machine: | |||
post: | |||
- npm install -g Financial-Times/origami-build-tools#node4 | |||
dependencies: | |||
pre: | |||
- sudo apt-get update; sudo apt-get install libpango1.0-0 && sudo apt-get install firefox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth adding -y
to apt-get
?
da6fbf1
to
6fb1aec
Compare
I reckon we're back to CI stability now =] |
}); | ||
|
||
afterEach(() => { | ||
window.fetch.restore(); | ||
HTMLVideoElement.prototype.canPlayType.restore(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like there are indentation issues
maybe indentation issues? rest looks good! |
…issues on CI not supporting H264
6fb1aec
to
598aed0
Compare
Oops, fixed =] |
This adds a new method to instances of o-video that enables the video and/or placeholder to be swapped.
Usage like so:
Also fixes some testing trip hazards.