From 4adce91dcdbb293fd8ad20fd10034a0da848ad88 Mon Sep 17 00:00:00 2001 From: mister-ben Date: Mon, 4 Dec 2023 17:52:00 +0100 Subject: [PATCH] fix: Use full 8601 datetime for uploadDate --- index.html | 2 +- src/plugin.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index add736e..c442bd0 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@ name: 'NAME', description: 'DESCRIPTION', duration: 150, - publishedAt: '2019-02-12T09:07:44', + publishedAt: '2019-02-12T09:07:44Z', poster: 'https://loremflickr.com/1280/720', textTracks: [{ "src": trackSrc, diff --git a/src/plugin.js b/src/plugin.js index 740a3f0..c000496 100644 --- a/src/plugin.js +++ b/src/plugin.js @@ -65,8 +65,8 @@ const schema = function(options) { '@type': 'VideoObject', 'name': mediainfo.name, 'thumbnailUrl': mediainfo.poster, - 'uploadDate': mediainfo.publishedAt.split('T')[0], - // Poor man's ad macros + 'uploadDate': mediainfo.publishedAt, + // Subset of videojs-contrib-ads macros '@id': options.schemaId .replace('{id}', mediainfo.id) .replace('{referenceId}', mediainfo.referenceId)