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 +4 -4
- data/lib/abrizer/canvas.rb +65 -25
- data/lib/abrizer/filepath_helpers.rb +8 -0
- data/lib/abrizer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2cc86e1f64991ede59039402b26923049110110
|
4
|
+
data.tar.gz: 03522fe0d4fdf46fd41387356969cf416a84a524
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7034f59f985cda22b3fd31f6f4f4cbe2574d7e45b80a00b89aa61ba0cb8c83e92ae8d6e18d21473457f6d41ac596a61c5714b232666dfdfc0add5d0cb8e311e9
|
7
|
+
data.tar.gz: 1486ff06789e71d6d9e29d7a9825318ff1fb564b2b08ba2de3a08f8b52159e5088cb5fafa908a19d814afba69949fda88c405af4698bcbeef5131faec1c91a73
|
data/lib/abrizer/canvas.rb
CHANGED
@@ -43,25 +43,39 @@ module Abrizer
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def media_json(json)
|
46
|
-
json.
|
46
|
+
json.content do
|
47
47
|
json.child! do
|
48
|
-
json.type "
|
49
|
-
|
50
|
-
json.
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
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
|
121
|
-
|
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.
|
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
|
160
|
+
def sprites_item(json)
|
135
161
|
if File.exist? sprites_filepath
|
136
162
|
json.child! do
|
137
|
-
json.
|
138
|
-
json.
|
139
|
-
json.
|
140
|
-
json.
|
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
|
data/lib/abrizer/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|