samvera_hls 0.4.2 → 0.4.3

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
  SHA256:
3
- metadata.gz: 5b3d2e4963cff58d279c08687c0ff43634a5dd7ff23e3d44d2d0aae3c0a806e8
4
- data.tar.gz: cbb413ab704a1878a4827bd718ba42ae43205de409600f90d0328bf7913d01c8
3
+ metadata.gz: 429e32d69cb67c823121724c99ee962755f963b8e3f58e92849e3a0285a14589
4
+ data.tar.gz: 2121d4ff2088f91979426fda063c53eb4db4c703b19c958f27e995c57fa25933
5
5
  SHA512:
6
- metadata.gz: f43322dd51a20ed089825353a1238589624e1da9bffd2a07c3046336569045277ae62a8c9465a2a8407fb201fe3b8dc079f1820caca64d060c4c9f9a2d58a83f
7
- data.tar.gz: 3040cb55263808cc6e8e4b925aa775752157b11ece6e85c13c34574ae17a09685a373e85bc968b0d41ae396d008d18ae59de9b31d9b152fa8b16e38286adffb9
6
+ metadata.gz: ad3ccca688d0c2e79fbd79f4d83ea3cc696d6f3c136520b8d118e1483d3fb09c570f82d631e355d0bbd7d9b692535c6b2b0f897433660380c467eca786ae4020
7
+ data.tar.gz: 970e6d228a655de302eeec1d1a764e5593bc24384b142928def662d3b096ecfbbfa13e37399556da393d36fbe2b3386c2b1ea2ee008a8da41038c413314f5e27
@@ -6,6 +6,14 @@ module SamveraHls
6
6
  module FileSetBehavior
7
7
  extend ActiveSupport::Concern
8
8
 
9
+ def self.audio_mime_types
10
+ ['audio/mp3', 'audio/mpeg', 'audio/wav', 'audio/x-wave', 'audio/x-wav', 'audio/ogg', 'audio/flac','audio/x-flac', 'audio/x-aiff', 'audio/aiff', ]
11
+ end
12
+
13
+ def self.video_mime_types
14
+ ['audio/mp3', 'audio/mpeg', 'audio/wav', 'audio/x-wave', 'audio/x-wav', 'audio/ogg', 'audio/flac','audio/x-flac', 'audio/x-aiff', 'audio/aiff', ]
15
+ end
16
+
9
17
  def create_hls_derivatives(filename)
10
18
  case mime_type
11
19
  when *audio_mime_types
@@ -20,10 +28,11 @@ module SamveraHls
20
28
  private
21
29
 
22
30
  def audio_mime_types
23
- ['audio/mp3', 'audio/mpeg', 'audio/wav', 'audio/x-wave', 'audio/x-wav', 'audio/ogg', 'audio/flac','audio/x-flac', 'audio/x-aiff', 'audio/aiff', ]
31
+ self.class.audio_mime_types
24
32
  end
33
+
25
34
  def video_mime_types
26
- ['video/mp4', 'video/mpeg', 'video/ogg','video/webm','video.flv','video/mp1s','video/mp2p']
35
+ self.class.video_mime_types
27
36
  end
28
37
 
29
38
  def create_hls_audio_derivatives filename
@@ -45,6 +45,7 @@ module SamveraHls
45
45
 
46
46
  File.open(segment_playlist_path(file_set_id, format),'r') {|file|
47
47
 
48
+ variant_token = false;
48
49
  file.each_line do |line|
49
50
  if line.include? ".ts" then
50
51
  # We only need to set the token once for each variant file.
@@ -1,3 +1,3 @@
1
1
  module SamveraHls
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samvera_hls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
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: 2019-06-06 00:00:00.000000000 Z
11
+ date: 2019-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails