vdocipher 0.0.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vdocipher.rb +16 -7
- 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: 56b07398619529a0cb3133b99b95f71764d4a36a
|
4
|
+
data.tar.gz: bf87bc5995964ee956d8f840fed6ed589f7b54fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce8988a70b9ccc2d459b1e8eaa25f121c7217b9aad40e34f9318ca892d044cea57298cbae8b37b2da2a4409fd2cf4dd79b4d200b04c23405f20ad12110383c23
|
7
|
+
data.tar.gz: 98b2591a78eeca0161b9bba49578ac002021c0c3fcf06b04e9cc0eea139fa06c519a4067df3033e6ef1902b56051a594560db2eb60364f864e544554b90f2257
|
data/lib/vdocipher.rb
CHANGED
@@ -4,7 +4,7 @@ class VdoCipher
|
|
4
4
|
def initialize(conf)
|
5
5
|
@key = conf[:clientSecretKey]
|
6
6
|
end
|
7
|
-
def play_code(id, attr="")
|
7
|
+
def play_code(id, attr="", theme="9ae8bbe8dd964ddc9bdb932cca1cb59a")
|
8
8
|
if (@key == nil)
|
9
9
|
return "key not set"
|
10
10
|
end
|
@@ -21,17 +21,26 @@ class VdoCipher
|
|
21
21
|
if( otp['error'] == "No video found" )
|
22
22
|
return "video not found"
|
23
23
|
end
|
24
|
+
# make the theme configurable
|
24
25
|
embedcode = <<EOS
|
25
26
|
<div id="vdo%s" %s></div>
|
26
27
|
<script>
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
(function(v,i,d,e,o){v[o]=v[o]||{}; v[o].add = v[o].add || function V(a){ (v[o].d=v[o].d||[]).push(a);};
|
29
|
+
if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0];
|
30
|
+
a.async=1; a.src=e; m.parentNode.insertBefore(a,m);}
|
31
|
+
})(window,document,"script","https://d1z78r8i505acl.cloudfront.net/playerAssets/vdo.js","vdo");
|
32
|
+
vdo.add({
|
33
|
+
otp: "%s",
|
34
|
+
playbackInfo: btoa(JSON.stringify({
|
35
|
+
videoId: "%s"
|
36
|
+
})),
|
37
|
+
theme: "%s",
|
38
|
+
container: document.querySelector( "#vdo%s" ),
|
39
|
+
});
|
32
40
|
</script>
|
41
|
+
|
33
42
|
EOS
|
34
|
-
embedcode = embedcode % [otp["otp"], attr, otp["otp"]]
|
43
|
+
embedcode = embedcode % [otp["otp"], attr, otp["otp"], id, theme, otp["otp"]]
|
35
44
|
end
|
36
45
|
end
|
37
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vdocipher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vibhav Sinha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stream and manage videos hosted through vdocipher streaming service.
|
14
14
|
email: info@vdocipher.com
|
@@ -17,9 +17,9 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- lib/vdocipher.rb
|
20
|
-
homepage:
|
20
|
+
homepage: https://www.vdocipher.com/blog/2015/09/videos-in-rails-with-vdocipher-gem/
|
21
21
|
licenses:
|
22
|
-
- GPL
|
22
|
+
- GPL-3.0+
|
23
23
|
metadata: {}
|
24
24
|
post_install_message:
|
25
25
|
rdoc_options: []
|
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
37
37
|
version: '0'
|
38
38
|
requirements: []
|
39
39
|
rubyforge_project:
|
40
|
-
rubygems_version: 2.
|
40
|
+
rubygems_version: 2.5.1
|
41
41
|
signing_key:
|
42
42
|
specification_version: 4
|
43
43
|
summary: VdoCipher API interface
|