VID-9: Write microdata into page as well as player

Issue Information

Issue Type: New Feature
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: (VID)
Resolution: Done (2019-04-02 17:39:19)
Target version: v0.13,
Components: Embed Code ,

Created: 2019-04-02 11:33:07
Time Spent Working

As VID-8 implements a basic player page, we now have some basic metadata which could also be embedded into pages for the benefit of search engines (or, at least, those like Google which take changes made by JS into account).

The idea of this feature is to have the embed script write in some markup.

At the very least we should be able to fetch details.json (see VID-8) for the embedded file, and if it exists write in

- name
- url (link to the player page)
- description
- keywords
- playerType (html5)

Toggle State Changes



commit c38ed833504f845182df4d904fa1d1c7bbb5aa42
Author: B Tasker <github@<Domain Hidden>>
Date: Tue Apr 2 17:23:28 2019 +0100

Commit Message: VID-9 Write basic markup into pages when embedding

Will only get used by search engines that execute the JS, but that was a given anyway (as the video won't be embedded if JS isn't active)

resources/embed/embed.js | 72 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 71 insertions(+), 1 deletions(-)

View Commit | View Changes

commit 75e2ef309b32019cfe0fa619784cd9b6dac512f2
Author: B Tasker <github@<Domain Hidden>>
Date: Tue Apr 2 17:35:53 2019 +0100

Commit Message: VID-9 For some reason it doesn't particularly like being embedded in the Player page

It complains that storage isn't defined. Can't currently see why, but this is a relatively unimportant feature so for now just bailing if that situation arises

resources/embed/embed.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

View Commit | View Changes
This now implemented, and the following HTML gets embedded
<meta itemprop="url" content="">
<meta itemprop="name" content="Noisy Alternator Bearing">
<meta itemprop="description" content="Bearing noise from the alternator of a Volvo S60">
<meta itemprop="keywords" content="Vehicle,alternator,failing bearing,volvo">
<meta itemprop="playerType" content="html5">

It also sanely handles missing keys in the JSON
btasker changed status from 'Open' to 'Resolved'
btasker added 'Done' to resolution
btasker changed status from 'Resolved' to 'Closed'