abrizer 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fc9378a163fb93bef80e0850ac0133674ac9106f
4
- data.tar.gz: 633f89376f94e84237122b36a4aba365d34ef3db
3
+ metadata.gz: b2cc86e1f64991ede59039402b26923049110110
4
+ data.tar.gz: 03522fe0d4fdf46fd41387356969cf416a84a524
5
5
  SHA512:
6
- metadata.gz: 5a9aff673d64f3ae930cdffc748aed9a844f82414dd1fd12bb93ddbcc0ae9624096c5a869a5a930ad75f90481aa34e12a8f3b12e0662bb68e6751fa6dbba5891
7
- data.tar.gz: 3ef0a0a10a9b21f7645fb9f869f6df5b3a34aff48a87f02928077eb29d0259226fa7860d5c69b9acb41bdfab7382d51b01ed9075853587c4830621c380de2881
6
+ metadata.gz: 7034f59f985cda22b3fd31f6f4f4cbe2574d7e45b80a00b89aa61ba0cb8c83e92ae8d6e18d21473457f6d41ac596a61c5714b232666dfdfc0add5d0cb8e311e9
7
+ data.tar.gz: 1486ff06789e71d6d9e29d7a9825318ff1fb564b2b08ba2de3a08f8b52159e5088cb5fafa908a19d814afba69949fda88c405af4698bcbeef5131faec1c91a73
@@ -43,25 +43,39 @@ module Abrizer
43
43
  end
44
44
 
45
45
  def media_json(json)
46
- json.media do
46
+ json.content do
47
47
  json.child! do
48
- json.type "Annotation"
49
- json.motivation 'painting'
50
- json.target canvas_id
51
- json.body do
52
- json.type "Choice"
53
- json.items do
54
- mpd_item(json)
55
- hlsts_item(json)
56
- vp9_item(json)
57
- mp4_item(json)
58
- end
59
- json.seeAlso do
60
- # TODO: Allow for adding more than one captions/subtitle file
61
- captions_seealso(json)
62
- sprites_seealso(json)
48
+ json.type "AnnotationPage"
49
+
50
+ json.items do
51
+ json.child! do
52
+ json.type 'Annotation'
53
+ json.motivation 'painting'
54
+ json.target canvas_id
55
+ json.body do
56
+ json.child! do
57
+ json.type "Choice"
58
+ json.choiceHint 'client'
59
+ json.items do
60
+ mpd_item(json)
61
+ hlsts_item(json)
62
+ vp9_item(json)
63
+ mp4_item(json)
64
+ aac_item(json)
65
+ end
66
+ end
67
+ json.child! do
68
+ json.type 'Choice'
69
+ json.choiceHint 'client'
70
+ json.items do
71
+ captions_item(json)
72
+ end
73
+ end
74
+ end
63
75
  end
76
+ sprites_item(json)
64
77
  end
78
+
65
79
  end
66
80
  end
67
81
  end
@@ -117,27 +131,49 @@ module Abrizer
117
131
  end
118
132
  end
119
133
 
120
- def captions_seealso(json)
121
- # TODO: update captions seeAlso for multiple captions
134
+ def aac_item(json)
135
+ if File.exist? hlsts_aac_filepath
136
+ json.child! do
137
+ json.id hlsts_aac_id
138
+ json.type "Audio"
139
+ json.format 'audio/aac'
140
+ end
141
+ end
142
+ end
143
+
144
+ def captions_item(json)
145
+ # TODO: update captions for multiple captions
122
146
  captions_file = File.join output_directory, 'vtt/captions.vtt'
123
147
  if File.exist? captions_file
124
148
  json.child! do
125
149
  json.id vtt_id
126
- json.format 'application/webvtt'
150
+ json.type 'Text'
151
+ json.format 'text/vtt'
152
+ json.kind 'captions'
127
153
  json.label 'English captions'
128
154
  json.language 'en'
129
- json._comments "How make explicit how whether to use these as captions or subtitles?"
155
+ json._comments "How make explicit how whether to use these as captions or subtitles, descriptions, or chapters?"
130
156
  end
131
157
  end
132
158
  end
133
159
 
134
- def sprites_seealso(json)
160
+ def sprites_item(json)
135
161
  if File.exist? sprites_filepath
136
162
  json.child! do
137
- json.id sprites_id
138
- json.format 'application/webvtt'
139
- json.label 'image sprite metadata'
140
- json._comments "How to include resources like video image sprites like those created by https://github.com/jronallo/video_sprites and used by various players?"
163
+ json.type 'Annotation'
164
+ json.motivation 'video-thumbnails'
165
+ json.target canvas_id
166
+ json.body do
167
+ json.child! do
168
+ json.id sprites_id
169
+ json.type 'Text'
170
+ json.format 'text/vtt'
171
+ json.kind 'metadata'
172
+ json.label 'image sprite metadata'
173
+ json._comments "How to include resources like video image sprites like those created by https://github.com/jronallo/video_sprites and used by various players?"
174
+ end
175
+ end
176
+
141
177
  end
142
178
  end
143
179
  end
@@ -162,6 +198,10 @@ module Abrizer
162
198
  File.join media_base_url, hlsts_partial_filepath
163
199
  end
164
200
 
201
+ def hlsts_aac_id
202
+ File.join media_base_url, hlsts_aac_partial_filepath
203
+ end
204
+
165
205
  def mp4_id
166
206
  File.join media_base_url, mp4_partial_filepath
167
207
  end
@@ -54,6 +54,14 @@ module Abrizer
54
54
  File.join output_directory, hlsts_partial_filepath
55
55
  end
56
56
 
57
+ def hlsts_aac_partial_filepath
58
+ 'hls/audio/aac/eng/media.aac'
59
+ end
60
+
61
+ def hlsts_aac_filepath
62
+ File.join output_directory, hlsts_aac_partial_filepath
63
+ end
64
+
57
65
  def mp4_partial_filepath
58
66
  'progressive.mp4'
59
67
  end
@@ -1,3 +1,3 @@
1
1
  module Abrizer
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abrizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Ronallo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-05 00:00:00.000000000 Z
11
+ date: 2017-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler