Skip to content

Commit

Permalink
feat(video): add new video files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Jun 13, 2020
1 parent 75a18a1 commit 83b6769
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 13 deletions.
13 changes: 9 additions & 4 deletions apps/demol/src/app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"groups": [
{
"grouped": false,
"row": false,
"content": [
{
"type": "text",
Expand Down Expand Up @@ -73,6 +74,8 @@
]
},
{
"grouped": false,
"row": false,
"content": [
{
"value": "Anna lebt mit ihrer Familie im Ruhrgebiet. Sie ist gerade 12 Jahre alt geworden. Ihr Vater arbeitet unter Tage im Bergbau. Ihre Mutter kümmert sich um Anna, ihre 3 Geschwister sowie ihren alten Großvater. Der Lohn des Vaters reicht gerade aus, um sie alle zu versorgen.",
Expand All @@ -98,25 +101,25 @@
{
"type": "video",
"layer": "fore",
"value": "Anna_Großvater",
"value": "3_Annas_Alltag",
"title": "Annas Alltag"
},
{
"type": "video",
"layer": "fore",
"value": "Anna_Großvater",
"value": "4_Annas_Zuhause",
"title": "Annas Lebensumfeld"
},
{
"type": "video",
"layer": "fore",
"value": "Anna_Großvater",
"value": "2_Anna_Familie",
"title": "Annas Familie"
},
{
"type": "video",
"layer": "fore",
"value": "Anna_Großvater",
"value": "1_Anna_Großvater",
"title": "Annas Großvater"
},
{
Expand All @@ -133,6 +136,7 @@
},
{
"grouped": true,
"row": false,
"content": [
{
"type": "text",
Expand All @@ -153,6 +157,7 @@
},
{
"grouped": true,
"row": false,
"content": [
{
"type": "text",
Expand Down
Binary file removed apps/demol/src/assets/movies/1_Anna_Großvater.mov
Binary file not shown.
Binary file not shown.
Binary file removed apps/demol/src/assets/movies/2_Anna_Familie.mov
Binary file not shown.
Binary file added apps/demol/src/assets/movies/2_Anna_Familie.mp4
Binary file not shown.
Binary file removed apps/demol/src/assets/movies/3_Annas_Alltag.mov
Binary file not shown.
Binary file added apps/demol/src/assets/movies/3_Annas_Alltag.mp4
Binary file not shown.
Binary file removed apps/demol/src/assets/movies/4_Annas_Zuhause.mov
Binary file not shown.
Binary file added apps/demol/src/assets/movies/4_Annas_Zuhause.mp4
Binary file not shown.
Binary file removed apps/demol/src/assets/movies/Anna_Großvater.mp4
Binary file not shown.
5 changes: 3 additions & 2 deletions libs/data/src/lib/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ export enum ContentType {
}

export interface Content {
type: ContentType
type: string
layer: string
value: string
}

export interface Group {
content: Content[]
grouped: boolean
row: boolean
content: Content[]
}

export interface Chapter {
Expand Down
8 changes: 2 additions & 6 deletions libs/ui/src/lib/chapter/chapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const ChapterComponent = (props: Chapter) => {
{contentList.map((content) =>
<>
{content.type === ContentType.Text && <Text value={content.value} />}
{content.type === ContentType.Video && <Video value={content.value} />}
{content.type === ContentType.Video && <Video value={content.value} title={content.title} />}
{content.type === ContentType.Image && <Image value={content.value} />}
{content.type === ContentType.Decission && <Decission value={content.value} />}
{content.type === ContentType.Misc && <Smokingpit value={content.value} />}
Expand All @@ -47,7 +47,7 @@ export const ChapterComponent = (props: Chapter) => {
contentList.map((content, index) =>
<div key={index} className={`parallax__layer parallax__layer--${content.layer}`}>
{content.type === ContentType.Text && <Text value={content.value} />}
{content.type === ContentType.Video && <Video value={content.value} />}
{content.type === ContentType.Video && <Video value={content.value} title={content.title} />}
{content.type === ContentType.Image && <Image value={content.value} />}
{content.type === ContentType.Decission && <Decission value={content.value} />}
{content.type === ContentType.Misc && <Smokingpit value={content.value} />}
Expand All @@ -56,10 +56,6 @@ export const ChapterComponent = (props: Chapter) => {
return grouped ? chapterGroupContent : chapterContent
}

const setAudioRef = element => {
this.audio = element;
};

return (
<div className='parallax'>
<div className='parallax__group parallax__header'>
Expand Down
4 changes: 3 additions & 1 deletion libs/ui/src/lib/video/video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import './video.scss';

/* eslint-disable-next-line */
export interface VideoProps {
value: string
value: string,
title: string
}

export const Video = (props: VideoProps) => {
Expand All @@ -16,6 +17,7 @@ export const Video = (props: VideoProps) => {

return (
<div className="video">
<p>{props.title}</p>
<video>
<source type='video/mp4' src={"./assets/movies/"+props.value+VIDEO_SUFFIX}></source>
Your browser does not support the video tag.
Expand Down

0 comments on commit 83b6769

Please sign in to comment.