pili 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -12
- data/lib/pili/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e6d72b1afc06e78983bbf88afbd4e44bfa91cf4
|
4
|
+
data.tar.gz: 2e4516932ccff0c5b3d3ef0300a774ee1f9f2f08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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(
|
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(
|
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(
|
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(
|
93
|
-
Pili.get_stream_publish_url(
|
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(
|
100
|
-
Pili.get_stream_rtmp_live_url(
|
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(
|
107
|
-
Pili.get_stream_hls_live_url(
|
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(
|
114
|
-
Pili.get_stream_hls_playback_url(
|
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
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.
|
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-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|