pili 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/example/example.rb +1 -1
- data/lib/pili/api.rb +2 -2
- data/lib/pili/stream.rb +4 -8
- data/lib/pili/version.rb +1 -1
- data/pili.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bdd98a636d069b4881c5e56299f4c7bcad99517
|
4
|
+
data.tar.gz: ec1f0d4f9ebae2919b379391714b16611e6e491c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 872674195d5e1818a288173c5aca64dff64a4b151503b7a12bf9688d3a07b9cdfcadd4227732eba517e34d836ccd678f45db4f258440d75716b909c4361b127b
|
7
|
+
data.tar.gz: a9f4227fbbc8a70fe68322f155eb823b35ec237bdd18afc61e0b7007b9730ff0e46aef774fd09840df601ae9fb32365c1e37eb6c41d21332fc29ae6f84cb3c39
|
data/README.md
CHANGED
data/example/example.rb
CHANGED
@@ -162,9 +162,9 @@ end
|
|
162
162
|
# Save Stream as
|
163
163
|
begin
|
164
164
|
name = "videoName.mp4" # required, string
|
165
|
-
format = "mp4" # required, string
|
166
165
|
start_time = 1440067100 # required, int64, in second, unix timestamp
|
167
166
|
end_time = 1440068104 # required, int64, in second, unix timestamp
|
167
|
+
format = "mp4" # optional, string
|
168
168
|
notify_url = nil # optional
|
169
169
|
result = stream.save_as(name, format, start_time, end_time, notify_url)
|
170
170
|
puts "Stream save_as() =>\n#{result.inspect}\n\n"
|
data/lib/pili/api.rb
CHANGED
@@ -58,7 +58,7 @@ module Pili
|
|
58
58
|
|
59
59
|
body = {}
|
60
60
|
body[:publishKey] = options[:publish_key]
|
61
|
-
body[:publishSecurity] = options[:publish_security]
|
61
|
+
body[:publishSecurity] = options[:publish_security]
|
62
62
|
body[:disabled] = options[:disabled]
|
63
63
|
|
64
64
|
body.delete_if { |k, v| v.nil? }
|
@@ -118,4 +118,4 @@ module Pili
|
|
118
118
|
|
119
119
|
end
|
120
120
|
end
|
121
|
-
end
|
121
|
+
end
|
data/lib/pili/stream.rb
CHANGED
@@ -105,13 +105,9 @@ module Pili
|
|
105
105
|
|
106
106
|
|
107
107
|
def hls_playback_urls(start_second = -1, end_second = -1)
|
108
|
-
|
109
|
-
|
110
|
-
urls = { Config.origin => "
|
111
|
-
|
112
|
-
@profiles.each do |profile|
|
113
|
-
urls[profile] = "http://#{playback_hls_host}/#{@hub}/#{@title}@#{profile}.m3u8?start=#{start_second}&end=#{end_second}"
|
114
|
-
end
|
108
|
+
name = Time.now.to_i.to_s
|
109
|
+
resp = API.save_stream_as(@credentials, @id, name, nil, start_second, end_second)
|
110
|
+
urls = { Config.origin => resp["url"] }
|
115
111
|
|
116
112
|
urls
|
117
113
|
end
|
@@ -160,4 +156,4 @@ module Pili
|
|
160
156
|
end
|
161
157
|
|
162
158
|
end
|
163
|
-
end
|
159
|
+
end
|
data/lib/pili/version.rb
CHANGED
data/pili.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Pili::VERSION
|
9
9
|
spec.authors = ["Miclle"]
|
10
10
|
spec.email = ["pili@qiniu.com"]
|
11
|
-
spec.summary = %q{Pili
|
12
|
-
spec.description = %q{Pili
|
11
|
+
spec.summary = %q{Pili Streaming Cloud server-side library for Ruby.}
|
12
|
+
spec.description = %q{Pili Streaming Cloud server-side library for Ruby.}
|
13
13
|
spec.homepage = "https://github.com/pili-engineering/pili-sdk-ruby"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pili
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miclle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.13.3
|
55
|
-
description: Pili
|
55
|
+
description: Pili Streaming Cloud server-side library for Ruby.
|
56
56
|
email:
|
57
57
|
- pili@qiniu.com
|
58
58
|
executables: []
|
@@ -97,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: '0'
|
98
98
|
requirements: []
|
99
99
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.
|
100
|
+
rubygems_version: 2.5.1
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
|
-
summary: Pili
|
103
|
+
summary: Pili Streaming Cloud server-side library for Ruby.
|
104
104
|
test_files: []
|