Skip to content

Commit

Permalink
Merge pull request #293 from NDLA-H5P/feature/video-type
Browse files Browse the repository at this point in the history
  • Loading branch information
boyum authored Jan 25, 2022
2 parents 3915fa8 + 7395a84 commit 49c1233
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"machineName": "H5PEditor.TopicMap",
"majorVersion": 0,
"minorVersion": 1,
"patchVersion": 12,
"patchVersion": 13,
"runnable": 0,
"preloadedJs": [
{
Expand Down
5 changes: 4 additions & 1 deletion src/components/SemanticsForm/SemanticsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ export const SemanticsForm: React.FC<SemanticsFormProps> = ({
}, [fields, params, parent, generatedFormRef, hasRendered]);

return (
<form className={`${formClassName} h5peditor`}>
<form
className={`${formClassName} h5peditor`}
onSubmit={event => event.preventDefault()}
>
<div ref={generatedFormRef} />
<button
type="button"
Expand Down
5 changes: 3 additions & 2 deletions src/types/CommonItemType.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Image } from "./h5p/Image";
import { Video } from "./h5p/Video";

export type CommonItemType = {
id: string;
Expand All @@ -19,8 +20,8 @@ export type CommonItemType = {
heightPercentage: number;

dialog?: {
links?: Array<string> | undefined;
links?: Array<string>;
text?: string;
video?: unknown;
video?: Video;
};
};
12 changes: 6 additions & 6 deletions src/types/h5p/Copyright.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export type Copyright = {
author: string;
license: string;
source: string;
title: string;
version: string;
year: string;
author?: string;
license?: string;
source?: string;
title?: string;
version?: string;
year?: string;
};
7 changes: 7 additions & 0 deletions src/types/h5p/Video.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Copyright } from "./Copyright";

export type Video = {
path: string;
mime?: string;
copyright?: Copyright;
};

0 comments on commit 49c1233

Please sign in to comment.