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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53ab7ac8e79f10070380910236ebe229c6d83813
4
- data.tar.gz: 6f992c146547afb3f7f79ab5ee371969efad4fed
3
+ metadata.gz: 6bdd98a636d069b4881c5e56299f4c7bcad99517
4
+ data.tar.gz: ec1f0d4f9ebae2919b379391714b16611e6e491c
5
5
  SHA512:
6
- metadata.gz: dccbd1b051bfcbe11ba12b27eef7c293c069f7c3c25e8e11deb38f326c644b5470dfce255e8b67a2dfd731a8f3c926260d9f7b54f57b56146360d1f1b0c8bc94
7
- data.tar.gz: 1fa536931e109076f5a9cc6f20ccb34dc3a24b60b0ce1bd461b326983712296deb6af30d627977f4391ca7b1278ff9a010807c5dc077a6735c4836f82ce63977
6
+ metadata.gz: 872674195d5e1818a288173c5aca64dff64a4b151503b7a12bf9688d3a07b9cdfcadd4227732eba517e34d836ccd678f45db4f258440d75716b909c4361b127b
7
+ data.tar.gz: a9f4227fbbc8a70fe68322f155eb823b35ec237bdd18afc61e0b7007b9730ff0e46aef774fd09840df601ae9fb32365c1e37eb6c41d21332fc29ae6f84cb3c39
data/README.md CHANGED
@@ -526,6 +526,8 @@ end
526
526
 
527
527
  ## History
528
528
 
529
+ - 1.5.3
530
+ - Use saveas in hls_playback_urls
529
531
  - 1.5.0
530
532
  - Add stream.http_flv_live_urls()
531
533
  - Add stream.disable()
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] == "static" ? "static" : "dynamic"
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
- playback_hls_host = @hosts["playback"]["hls"]
109
-
110
- urls = { Config.origin => "http://#{playback_hls_host}/#{@hub}/#{@title}.m3u8?start=#{start_second}&end=#{end_second}" }
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
@@ -1,3 +1,3 @@
1
1
  module Pili
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
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 SDK for Ruby.}
12
- spec.description = %q{Pili SDK for Ruby. https://github.com/pili-engineering/pili-sdk-ruby}
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.2
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: 2015-11-05 00:00:00.000000000 Z
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 SDK for Ruby. https://github.com/pili-engineering/pili-sdk-ruby
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.4.5
100
+ rubygems_version: 2.5.1
101
101
  signing_key:
102
102
  specification_version: 4
103
- summary: Pili SDK for Ruby.
103
+ summary: Pili Streaming Cloud server-side library for Ruby.
104
104
  test_files: []