Skip to content

Commit

Permalink
Update: AAT v1 readyness (fixes: #23) (#24)
Browse files Browse the repository at this point in the history
* Bower normalization & updates
* ES Linting
* Add v1 AAT schemas & made updates
* Tested in AAT v1
* README Adjustments
  • Loading branch information
joe-replin authored Feb 24, 2023
1 parent 6f4b8c4 commit d31aa47
Show file tree
Hide file tree
Showing 7 changed files with 219 additions and 40 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ The attributes listed below are used in *components.json* to configure **Adapt V

**_layout** (string): This defines the horizontal position of the component in the block. Acceptable values are `full`, `left` or `right`.

**instruction** (string): This optional text appears above the component. It is frequently used to
guide the learner’s interaction with the component.
**instruction** (string): This optional text appears above the component. It is frequently used to guide the learner’s interaction with the component.

**_setCompletionOn** (string): This determines when Adapt will register this component as having been completed by the user. Acceptable values are `inview` (triggered when the component is fully displayed within the viewport), `play` (triggered when playback is initiated), or `ended` (triggered when the video has reached the end of playback).


**_media** (object): The media configuration, containing values for **_source**, **_autoplay**, **_loop** and **_pauseWhenOffScreen**

>**_source** (string): The URL of the Vimeo video. This can be a direct link or an embed link
Expand All @@ -36,7 +34,6 @@ guide the learner’s interaction with the component.
>**_pauseWhenOffScreen** (boolean): If set to `true`, pause playback when video is no longer in view. The default is `false`.

**_transcript** (object): The transcript attributes group contains values for **_inlineTranscript**, **_externalTranscript**, **inlineTranscriptButton**, **inlineTranscriptCloseButton**, **inlineTranscriptBody**, **transcriptLinkButton**, and **transcriptLink**.

>**_setCompletionOnView** (boolean): This determines if Adapt will register this component as having been completed by the user when the inline transcript is opened. This is true by default.
Expand All @@ -55,14 +52,12 @@ guide the learner’s interaction with the component.
>**transcriptLink** (string): File name (including path) of the optional external transcript. Path should be relative to the *src* folder (e.g., *course/en/pdf/video01_transcript.pdf*).

### Accessibility

### Limitations

No known limitations

----------------------------
**Version number:** 3.0.0
**Framework versions:** 5.19.1
**Framework versions:** 5.19.1<br>
**Author / maintainer:** Adapt Core Team with [contributors](https://github.com/adaptlearning/adapt-vimeo/graphs/contributors)
15 changes: 6 additions & 9 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "adapt-vimeo",
"repository": {
"type": "git",
"url": "git://github.com/adaptlearning/adapt-vimeo.git"
},
"version": "3.1.1",
"framework": ">=5.19.1",
"homepage": "https://github.com/adaptlearning/adapt-vimeo",
"issues": "https://github.com/adaptlearning/adapt-vimeo/issues/new",
"issues": "https://github.com/adaptlearning/adapt-vimeo/issues",
"component": "vimeo",
"displayName": "Vimeo Player",
"description": "Vimeo Player for Adapt",
"targetAttribute": "_vimeo",
"displayName": "Vimeo",
"description": "Media player for when content needs to be streamed from the video hosting platform, Vimeo.",
"main": "/js/adapt-vimeo.js",
"keywords": [
"adapt-plugin",
"adapt-component"
],
"license": "GPL-3.0",
"private": true,
"authors": [
"Dan Storey <[email protected]>"
],
"license": "GPL-3.0",
"private": true,
"devDependencies": {
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
Expand Down
2 changes: 1 addition & 1 deletion js/VimeoView.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class VimeoView extends Backbone.View {
this.player.on(eventType, data => {
this.trigger(eventType, {
type: eventType,
data: data
data
});
});
});
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
{
"name": "adapt-vimeo",
"repository": {
"type": "git",
"url": "git://github.com/adaptlearning/adapt-vimeo.git"
},
"version": "3.1.1",
"framework": ">=5.19.1",
"homepage": "https://github.com/adaptlearning/adapt-vimeo",
"issues": "https://github.com/adaptlearning/adapt-vimeo/issues/new",
"issues": "https://github.com/adaptlearning/adapt-vimeo/issues",
"component": "vimeo",
"displayName": "Vimeo Player",
"description": "Vimeo Player for Adapt",
"targetAttribute": "_vimeo",
"displayName": "Vimeo",
"description": "Media player for when content needs to be streamed from the video hosting platform, Vimeo.",
"main": "/js/adapt-vimeo.js",
"keywords": [
"adapt-plugin",
"adapt-component"
],
"license": "GPL-3.0",
"private": true,
"authors": [
"Dan Storey <[email protected]>"
],
"license": "GPL-3.0",
"private": true,
"devDependencies": {
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/git": "^10.0.1",
Expand Down
30 changes: 16 additions & 14 deletions properties.schema
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
"ariaRegion": {
"type": "string",
"required": true,
"title": "Vimeo: ARIA region",
"default": "This is a media component which displays a Vimeo video. Select the play / pause button to watch it.",
"inputType": "Text",
"validators": []
},
"skipToTranscript": {
"type": "string",
"required": false,
"required": true,
"default": "Skip to transcript",
"inputType": "Text",
"validators": []
"validators": [],
"translatable": true
}
},
"properties": {
Expand All @@ -30,10 +32,11 @@
"instruction": {
"type": "string",
"required": false,
"default": "",
"default": "Select the play button to start the video.",
"inputType": "Text",
"validators": [],
"help": ""
"help": "This is the instruction text",
"translatable": true
},
"_setCompletionOn": {
"type": "string",
Expand Down Expand Up @@ -96,32 +99,31 @@
"type": "boolean",
"required": false,
"default": true,
"title": "Trigger completion?",
"title": "Mark this component as complete when transcript is shown",
"inputType": "Checkbox",
"validators": [],
"help": "Whether to have this component mark as completed when the transcript is shown."
"validators": []
},
"_inlineTranscript": {
"type": "boolean",
"required": false,
"default": false,
"title": "Show Inline",
"title": "Enable inline transcript",
"inputType": "Checkbox",
"validators": []
},
"_externalTranscript": {
"type": "boolean",
"required": false,
"default": false,
"title": "Show Link",
"title": "Enable linked transcript file",
"inputType": "Checkbox",
"validators": []
},
"inlineTranscriptButton": {
"type": "string",
"required": false,
"default": "",
"title": "Inline Open Button",
"title": "Inline transcript open button label",
"inputType": "Text",
"validators": [],
"translatable": true
Expand All @@ -130,7 +132,7 @@
"type": "string",
"required": false,
"default": "",
"title": "Inline Close Button",
"title": "Inline transcript close button label",
"inputType": "Text",
"validators": [],
"translatable": true
Expand All @@ -139,7 +141,7 @@
"type": "string",
"required": false,
"default": "",
"title": "Inline Transcript",
"title": "Inline transcript",
"inputType": "TextArea",
"validators": [],
"help": "Optional text appears below the video",
Expand All @@ -149,7 +151,7 @@
"type": "string",
"required": false,
"default": "",
"title": "Link Open Button",
"title": "Linked transcript file button label",
"inputType": "Text",
"validators": [],
"translatable": true
Expand All @@ -158,7 +160,7 @@
"type": "string",
"required": false,
"default": "",
"title": "Transcript Link",
"title": "Linked transcript file source",
"inputType": "Asset:other",
"validators": [],
"help": "Select a file for the transcript link"
Expand Down
149 changes: 149 additions & 0 deletions schema/component.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
{
"$anchor": "vimeo-component",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$merge": {
"source": {
"$ref": "component"
},
"with": {
"required": [
"_media"
],
"properties": {
"_supportedLayout": {
"type": "string",
"title": "Supported layout",
"default": "both",
"enum": [
"full-width",
"half-width",
"both"
],
"_adapt": {
"editorOnly": true
}
},
"instruction": {
"type": "string",
"title": "Instruction",
"description": "This is the instruction text",
"default": "Select the play button to start the video.",
"_adapt": {
"translatable": true
}
},
"_setCompletionOn": {
"type": "string",
"title": "Set completion of Video on",
"description": "Defines what media event should trigger completion of this component.",
"default": "play",
"enum": [
"inview",
"play",
"ended"
],
"_backboneForms": "Select"
},
"_media": {
"type": "object",
"title": "Media settings",
"properties": {
"_source": {
"type": "string",
"title": "Source URL",
"description": "The URL of the Vimeo video you want to be displayed. This can be a direct, or an embed link",
"default": "",
"_backboneForms": {
"editorAttrs": {
"placeholder": "//www.vimeo.com/288344114"
}
}
},
"_autoplay": {
"type": "boolean",
"title": "Autoplay",
"description": "Specifies whether or not the video will automatically start to play when the player loads (where supported).",
"default": false
},
"_loop": {
"type": "boolean",
"title": "Loop",
"description": "Whether to play the video on a loop or not.",
"default": false
},
"_pauseWhenOffScreen": {
"type": "boolean",
"title": "Pause playback when video is no longer in view.",
"default": false
}
}
},
"_transcript": {
"type": "object",
"title": "Transcript",
"default": {},
"properties": {
"_setCompletionOnView": {
"type": "boolean",
"title": "Mark this component as complete when transcript is shown",
"default": true
},
"_inlineTranscript": {
"type": "boolean",
"title": "Enable inline transcript",
"default": false
},
"_externalTranscript": {
"type": "boolean",
"title": "Enable linked transcript file",
"default": false
},
"inlineTranscriptButton": {
"type": "string",
"title": "Inline transcript open button label",
"default": "",
"_adapt": {
"translatable": true
}
},
"inlineTranscriptCloseButton": {
"type": "string",
"title": "Inline transcript close button label",
"default": "",
"_adapt": {
"translatable": true
}
},
"inlineTranscriptBody": {
"type": "string",
"title": "Inline transcript",
"default": "",
"_adapt": {
"translatable": true
},
"_backboneForms": "TextArea"
},
"transcriptLinkButton": {
"type": "string",
"title": "Linked transcript file button label",
"default": "",
"_adapt": {
"translatable": true
}
},
"transcriptLink": {
"type": "string",
"isObjectId": true,
"title": "Linked transcript file source",
"_backboneForms": {
"type": "Asset",
"media": "other"
}
}
}
}
}
}
}
}
Loading

0 comments on commit d31aa47

Please sign in to comment.