hydra_hls 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -0
  3. data/app/assets/javascripts/embed.js +1 -0
  4. data/app/assets/javascripts/hls_initialize.js.erb +14 -3
  5. data/app/assets/stylesheets/embed.css +1 -0
  6. data/app/models/concerns/hydra_hls/file_set_behavior.rb +12 -0
  7. data/app/views/_playlist.html.erb +7 -0
  8. data/config/routes.rb +0 -0
  9. data/lib/hydra_hls.rb +0 -0
  10. data/lib/hydra_hls/engine.rb +0 -0
  11. data/lib/hydra_hls/version.rb +1 -1
  12. data/lib/tasks/hydra_hls_tasks.rake +0 -0
  13. data/spec/dummy/README.rdoc +0 -0
  14. data/spec/dummy/Rakefile +0 -0
  15. data/spec/dummy/app/assets/javascripts/application.js +0 -0
  16. data/spec/dummy/app/assets/stylesheets/application.css +0 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +0 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +0 -0
  19. data/spec/dummy/app/views/layouts/application.html.erb +0 -0
  20. data/spec/dummy/config.ru +0 -0
  21. data/spec/dummy/config/application.rb +0 -0
  22. data/spec/dummy/config/boot.rb +0 -0
  23. data/spec/dummy/config/database.yml +0 -0
  24. data/spec/dummy/config/environment.rb +0 -0
  25. data/spec/dummy/config/environments/development.rb +0 -0
  26. data/spec/dummy/config/environments/production.rb +0 -0
  27. data/spec/dummy/config/environments/test.rb +0 -0
  28. data/spec/dummy/config/initializers/assets.rb +0 -0
  29. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -0
  30. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -0
  31. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -0
  32. data/spec/dummy/config/initializers/inflections.rb +0 -0
  33. data/spec/dummy/config/initializers/mime_types.rb +0 -0
  34. data/spec/dummy/config/initializers/session_store.rb +0 -0
  35. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -0
  36. data/spec/dummy/config/locales/en.yml +0 -0
  37. data/spec/dummy/config/routes.rb +0 -0
  38. data/spec/dummy/config/secrets.yml +0 -0
  39. data/spec/dummy/public/404.html +0 -0
  40. data/spec/dummy/public/422.html +0 -0
  41. data/spec/dummy/public/500.html +0 -0
  42. data/spec/dummy/public/favicon.ico +0 -0
  43. metadata +26 -25
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c32e4c406781d813aaee77d4af330e021b4b526f
4
- data.tar.gz: c39f8ec36f2967a31d468944575a956051c3156c
3
+ metadata.gz: a3586cd6caaef6a3efbf1ac9367298c006409e08
4
+ data.tar.gz: 3b63cd3824a4bfc4e2313bfd642764bdde10918c
5
5
  SHA512:
6
- metadata.gz: 24ec6986e2a6f3b20e58c8391d4998606b860f4ab1712e0dc2c500589e22ce4dd5276ad94ea0cbfc5b86eb114df0a0ad0c7b35e418c9b4b21d71f46dc084d6b4
7
- data.tar.gz: c41ccd0fa7f7259da38e92ce41e8773a2f641cdb0f1abee7fca41ec37702f1f2e8535fbd3eb321258123936ff76fff51424a6ab142c9557c4b603736b2115c3d
6
+ metadata.gz: e20c3c8b06d5de1ff4081362baa791d80579ed966ff567f7d41466eed9ba5695728a60b6b52fe1af429c4b4d474aec05c12a02e06aff97401dea5b02101379e3
7
+ data.tar.gz: 67e4a8f244fad1357c3df667cbeee66962b8db5b2b9b09b5f63b33222a5495aaaf5e6eb3b9d10b67aa6146023f31393cb45cbc652aad9c14a49499af49f45aa0
data/Rakefile CHANGED
File without changes
@@ -12,5 +12,6 @@
12
12
  //
13
13
  //= require jquery
14
14
  //= require mediaelement-and-player
15
+ //= require mep-feature-playlist
15
16
  //= require hls_initialize
16
17
 
@@ -1,5 +1,16 @@
1
1
  $(document).ready(function(){
2
- $(".hls-media").mediaelementplayer({
3
- flashName: "<%= asset_path("flashmediaelement.swf") %>"
4
- });
2
+ if(isPlaylist) {
3
+ $(".hls-media").mediaelementplayer({
4
+ loop: true,
5
+ shuffle: false ,
6
+ playlist: true,
7
+ playlistposition: 'bottom',
8
+ features: ['playlistfeature', 'prevtrack', 'playpause', 'nexttrack', 'loop', 'shuffle', 'playlist', 'current', 'progress', 'duration', 'volume'],
9
+ flashName: "<%= asset_path("flashmediaelement.swf") %>"
10
+ });
11
+ } else {
12
+ $(".hls-media").mediaelementplayer({
13
+ flashName: "<%= asset_path("flashmediaelement.swf") %>"
14
+ });
15
+ }
5
16
  });
@@ -11,4 +11,5 @@
11
11
  * file per style scope.
12
12
  *
13
13
  *= require mediaelementplayer.min
14
+ *= require mep-feature-playlist
14
15
  */
@@ -59,6 +59,18 @@ module HydraHls
59
59
  playlist
60
60
  end
61
61
 
62
+
63
+ module ClassMethods
64
+
65
+ def audio_mime_types
66
+ # audio/x-wave is the mime type that fits 0.6.0 returns for a wav file.
67
+ # audio/mpeg is the mime type that fits 0.6.0 returns for an mp3 file.
68
+ ['audio/mp3', 'audio/mpeg', 'audio/wav', 'audio/x-wave', 'audio/x-wav', 'audio/ogg', 'audio/flac','audio/x-flac', 'audio/x-aiff', 'audio/aiff', ]
69
+ end
70
+ end
71
+
72
+
73
+
62
74
  private
63
75
 
64
76
  def segment_url_base
@@ -0,0 +1,7 @@
1
+ <audio controls="controls" class="hls-media" preload="auto">
2
+ <% file_sets.each do |file_set| %>
3
+ <source src="<%= File.join(request.base_url,"file_set",file_set.id,"hls.m3u8") %>" type="application/x-mpegurl"/>
4
+ <%end %>
5
+ Your browser does not support the audio tag.
6
+ </audio>
7
+ <script type="text/javascript">isPlaylist = true</script>
data/config/routes.rb CHANGED
File without changes
data/lib/hydra_hls.rb CHANGED
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module HydraHls
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
File without changes
File without changes
data/spec/dummy/Rakefile CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/spec/dummy/config.ru CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra_hls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ned Henry, UCSC Library Digital Initiatives
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.2.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.6
27
27
  description: This gem allows a hydra application to create hls derivative media files
@@ -42,6 +42,7 @@ files:
42
42
  - app/controllers/concerns/hydra_hls/file_sets_controller_behavior.rb
43
43
  - app/models/concerns/hydra_hls/file_set_behavior.rb
44
44
  - app/services/hydra_hls/hls_output_file_service.rb
45
+ - app/views/_playlist.html.erb
45
46
  - app/views/curation_concerns/file_sets/embed.html.erb
46
47
  - app/views/curation_concerns/file_sets/media_display/_audio_hls.html.erb
47
48
  - app/views/curation_concerns/file_sets/media_display/_video_hls.html.erb
@@ -122,38 +123,38 @@ signing_key:
122
123
  specification_version: 4
123
124
  summary: An engine to add hls adaptive streaming to a hydra based application.
124
125
  test_files:
125
- - spec/dummy/README.rdoc
126
- - spec/dummy/Rakefile
127
126
  - spec/dummy/config.ru
128
- - spec/dummy/app/assets/javascripts/application.js
129
- - spec/dummy/app/assets/stylesheets/application.css
130
- - spec/dummy/app/controllers/application_controller.rb
131
- - spec/dummy/app/helpers/application_helper.rb
132
- - spec/dummy/app/views/layouts/application.html.erb
133
- - spec/dummy/bin/bundle
134
- - spec/dummy/bin/rails
127
+ - spec/dummy/README.rdoc
135
128
  - spec/dummy/bin/rake
136
129
  - spec/dummy/bin/setup
130
+ - spec/dummy/bin/bundle
131
+ - spec/dummy/bin/rails
132
+ - spec/dummy/Rakefile
137
133
  - spec/dummy/config/routes.rb
138
- - spec/dummy/config/application.rb
139
134
  - spec/dummy/config/environment.rb
140
- - spec/dummy/config/secrets.yml
141
- - spec/dummy/config/environments/development.rb
142
- - spec/dummy/config/environments/production.rb
143
- - spec/dummy/config/environments/test.rb
144
- - spec/dummy/config/initializers/assets.rb
135
+ - spec/dummy/config/initializers/session_store.rb
145
136
  - spec/dummy/config/initializers/backtrace_silencers.rb
137
+ - spec/dummy/config/initializers/inflections.rb
146
138
  - spec/dummy/config/initializers/cookies_serializer.rb
139
+ - spec/dummy/config/initializers/wrap_parameters.rb
147
140
  - spec/dummy/config/initializers/filter_parameter_logging.rb
148
- - spec/dummy/config/initializers/inflections.rb
149
141
  - spec/dummy/config/initializers/mime_types.rb
150
- - spec/dummy/config/initializers/session_store.rb
151
- - spec/dummy/config/initializers/wrap_parameters.rb
152
- - spec/dummy/config/locales/en.yml
142
+ - spec/dummy/config/initializers/assets.rb
143
+ - spec/dummy/config/secrets.yml
153
144
  - spec/dummy/config/boot.rb
145
+ - spec/dummy/config/application.rb
154
146
  - spec/dummy/config/database.yml
147
+ - spec/dummy/config/environments/test.rb
148
+ - spec/dummy/config/environments/development.rb
149
+ - spec/dummy/config/environments/production.rb
150
+ - spec/dummy/config/locales/en.yml
151
+ - spec/dummy/app/controllers/application_controller.rb
152
+ - spec/dummy/app/views/layouts/application.html.erb
153
+ - spec/dummy/app/assets/stylesheets/application.css
154
+ - spec/dummy/app/assets/javascripts/application.js
155
+ - spec/dummy/app/helpers/application_helper.rb
156
+ - spec/dummy/public/favicon.ico
157
+ - spec/dummy/public/500.html
155
158
  - spec/dummy/public/404.html
156
159
  - spec/dummy/public/422.html
157
- - spec/dummy/public/500.html
158
- - spec/dummy/public/favicon.ico
159
160
  - spec/test_app_templates/lib/generators/test_app_generator.rb