diff --git a/karma.conf.js b/karma.conf.js index 87cd0a5cc94..6361fb2c41f 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -46,6 +46,15 @@ const newWebpackConfig = Object.assign({}, webpackConfigProd, { }, { test: /\.svg$/, loader: 'url?limit=10000&mimetype=image/svg+xml', + }, { + test: /\.jpg$/, + loader: 'url?limit=10000&mimetype=image/jpeg', + }, { + test: /\.webm$/, + loader: 'url?limit=10000&mimetype=video/webm', + }, { + test: /\.mp4$/, + loader: 'url?limit=10000&mimetype=video/mp4', }], }, output: undefined, diff --git a/src/disco/containers/DiscoPane.js b/src/disco/containers/DiscoPane.js index 9a40471983e..4857dcbb0b9 100644 --- a/src/disco/containers/DiscoPane.js +++ b/src/disco/containers/DiscoPane.js @@ -5,29 +5,62 @@ import { gettext as _, camelCaseProps } from 'core/utils'; import Addon from 'disco/components/Addon'; +import videoPoster from 'disco/img/AddOnsPoster.jpg'; +import videoMp4 from 'disco/video/AddOns.mp4'; +import videoWebm from 'disco/video/AddOns.webm'; + class DiscoPane extends React.Component { static propTypes = { results: PropTypes.arrayOf(PropTypes.object), } + constructor() { + super(); + this.state = {showVideo: false}; + } + + showVideo = (e) => { + e.preventDefault(); + this.setState({showVideo: true}); + this.refs.video.play(); + } + + closeVideo = (e) => { + e.preventDefault(); + this.setState({showVideo: false}); + this.refs.video.pause(); + } + render() { const { results } = this.props; + const { showVideo } = this.state; + return (
{_(dedent`There are thousands of add-ons that let you make Firefox all your - own—everything from fun visual themes to powerful tools and features. - Here are a few great ones to check out.`)}
+{_(dedent`There are thousands of add-ons that let you make Firefox all your + own—everything from fun visual themes to powerful tools and features. + Here are a few great ones to check out.`)}
+- {_('Click to play')} - {_('to find out more about add-ons')} -
-