Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Fix Video build #186

Merged
merged 5 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`video Basic renders as expected 1`] = `
className="block mx-auto"
loop={true}
muted={true}
src="https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true"
src="./assets/browser-example.mp4"
title="A video!"
type="video/mp4"
width="100%"
Expand All @@ -16,7 +16,7 @@ exports[`video Basic renders as expected 1`] = `
Your browser doesn't support HTML5 video. Here is a

<a
href="https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true"
href="./assets/browser-example.mp4"
>
link to the video
</a>
Expand All @@ -32,7 +32,7 @@ exports[`video Reduced motion renders as expected 1`] = `
className="block mx-auto"
controls={true}
muted={true}
src="https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true"
src="./assets/browser-example.mp4"
title="A video!"
type="video/mp4"
width="100%"
Expand All @@ -41,7 +41,7 @@ exports[`video Reduced motion renders as expected 1`] = `
Your browser doesn't support HTML5 video. Here is a

<a
href="https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true"
href="./assets/browser-example.mp4"
>
link to the video
</a>
Expand Down
6 changes: 2 additions & 4 deletions src/components/video/__tests__/video-test-cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ testCases.basic = {
component: Video,
description: 'Basic',
props: {
src:
'https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true',
src: './assets/browser-example.mp4',
title: 'A video!'
}
};
Expand All @@ -17,8 +16,7 @@ noRenderCases.reducedMotion = {
component: Video,
description: 'Reduced motion',
props: {
src:
'https://github.com/mapbox/android-docs/blob/publisher-production/src/video/example-bathymetry-activity.mp4?raw=true',
src: './assets/browser-example.mp4',
title: 'A video!'
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/video/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Video extends React.Component {
loop: true
};
const reducedMotion =
window !== 'undefined'
typeof window !== 'undefined'
? window.matchMedia('(prefers-reduced-motion: reduce)').matches
: false;
if (reducedMotion) {
Expand Down