pili 0.1.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -12
  3. data/lib/pili/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86d62dca154aeb5249516a639629988640789cd4
4
- data.tar.gz: e596e269c677a021e20a65fed7836bd008645c50
3
+ metadata.gz: 0e6d72b1afc06e78983bbf88afbd4e44bfa91cf4
4
+ data.tar.gz: 2e4516932ccff0c5b3d3ef0300a774ee1f9f2f08
5
5
  SHA512:
6
- metadata.gz: d84320ecc9ffd6ec4f1f578b0c23e80868c49d3ed0c1b940267a5518c0c09a1b0bc9b84402f86cc8a7b4c29688a3a7b2d218e219f42ce2d58e865c4dc11ae3db
7
- data.tar.gz: 80dea961acaf2dec714618e608b022d4797cf8a7abc2bc7e6357e82147c3bf848ea27c2616e247aea9c844c8d0db43f955f3da26572ec2b6864af63b738fc915
6
+ metadata.gz: 9afae5cda05c240b3708154b6cdaba42faba0440bf835e752a7987a943a982c8daa1824ed2626eeefc1fed58b6d2e6c048f31679a965c4de35452495ab6146ca
7
+ data.tar.gz: 748ce6651f7121e822b9b3227debb16fc25180cd247d182b09ba1f511b72aca013bc8f445fcedc5db684e07b160eaad994c62d990afddf0a5664443adddceb5b
data/README.md CHANGED
@@ -35,15 +35,26 @@ You'll need to configure it in config/initializes/pili.rb
35
35
 
36
36
  ### Example
37
37
 
38
+ ```ruby
39
+ # Replace with your customized domains
40
+ RTMP_PUBLISH_HOST = "xxx.pub.z1.pili.qiniup.com"
41
+ RTMP_PLAY_HOST = "xxx.live1.z1.pili.qiniucdn.com"
42
+ HLS_PLAY_HOST = "xxx.hls1.z1.pili.qiniucdn.com"
43
+
44
+ # Replace with your hub name
45
+ HUB_NAME = "hub_name"
46
+ ```
47
+
48
+
38
49
  #### Create Stream
39
50
 
40
51
  ```ruby
41
- Pili.create_stream(hub_name)
52
+ Pili.create_stream(HUB_NAME)
42
53
 
43
54
  # title: optional, default is auto-generated
44
55
  # publish_key: optional, a secret key for signing the <publishToken>
45
56
  # publish_security: optional, can be "dynamic" or "static", default is "dynamic"
46
- Pili.create_stream(hub_name, title: title, publish_key: publish_key, publish_security: publish_security)
57
+ Pili.create_stream(HUB_NAME, title: title, publish_key: publish_key, publish_security: publish_security)
47
58
  ```
48
59
 
49
60
  #### Get Stream
@@ -61,12 +72,12 @@ Pili.update_stream(stream_id, publish_key: publish_key, publish_security: publis
61
72
  #### Get Stream List
62
73
 
63
74
  ```ruby
64
- Pili.stream_list(hub)
75
+ Pili.stream_list(HUB_NAME)
65
76
 
66
77
  # hub: string, required
67
78
  # marker: string, optional
68
79
  # limit: integer, optional
69
- Pili.stream_list(hub, marker: marker, limit: limit)
80
+ Pili.stream_list(HUB_NAME, marker: marker, limit: limit)
70
81
  ```
71
82
 
72
83
  #### Delete Stream
@@ -89,29 +100,29 @@ Pili.get_stream_segments(stream_id, start: timestamp, end: timestamp)
89
100
  #### Get Stream Publish URL
90
101
 
91
102
  ```ruby
92
- Pili.get_stream_publish_url(publish_host, stream_id, publish_key, publish_security)
93
- Pili.get_stream_publish_url(publish_host, stream_id, publish_key, publish_security, timestamp)
103
+ Pili.get_stream_publish_url(RTMP_PUBLISH_HOST, stream_id, publish_key, publish_security)
104
+ Pili.get_stream_publish_url(RTMP_PUBLISH_HOST, stream_id, publish_key, publish_security, timestamp)
94
105
  ```
95
106
 
96
107
  #### Get Stream RTMP Live URL
97
108
 
98
109
  ```ruby
99
- Pili.get_stream_rtmp_live_url(rtmp_play_host, stream_id)
100
- Pili.get_stream_rtmp_live_url(rtmp_play_host, stream_id, preset)
110
+ Pili.get_stream_rtmp_live_url(RTMP_PLAY_HOST, stream_id)
111
+ Pili.get_stream_rtmp_live_url(RTMP_PLAY_HOST, stream_id, profile)
101
112
  ```
102
113
 
103
114
  #### Get Stream HLS Live URL
104
115
 
105
116
  ```ruby
106
- Pili.get_stream_hls_live_url(hls_play_host, stream_id)
107
- Pili.get_stream_hls_live_url(hls_play_host, stream_id, preset)
117
+ Pili.get_stream_hls_live_url(HLS_PLAY_HOST, stream_id)
118
+ Pili.get_stream_hls_live_url(HLS_PLAY_HOST, stream_id, profile)
108
119
  ```
109
120
 
110
121
  #### Get Stream HLS Playback URL
111
122
 
112
123
  ```ruby
113
- Pili.get_stream_hls_playback_url(hls_play_host, stream_id, start_second, end_second)
114
- Pili.get_stream_hls_playback_url(hls_play_host, stream_id, start_second, end_second, preset)
124
+ Pili.get_stream_hls_playback_url(HLS_PLAY_HOST, stream_id, start_second, end_second)
125
+ Pili.get_stream_hls_playback_url(HLS_PLAY_HOST, stream_id, start_second, end_second, profile)
115
126
  ```
116
127
 
117
128
 
data/lib/pili/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pili
2
- VERSION = "0.1.3"
2
+ VERSION = "1.0.0"
3
3
  end
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: 0.1.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miclle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2015-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler