vdocipher 0.0.2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vdocipher.rb +16 -7
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2d874366ad848c6fd52919ec124bc048b54414c1
4
- data.tar.gz: 8baff531d256bd125833efbfb69626104647a231
3
+ metadata.gz: 56b07398619529a0cb3133b99b95f71764d4a36a
4
+ data.tar.gz: bf87bc5995964ee956d8f840fed6ed589f7b54fd
5
5
  SHA512:
6
- metadata.gz: 9146d51955e2bd15b48c601d3d51dff8c10de0f1a80a38e8091547b1b0fdf645b3082299f669da777154c9759b2a016d5c9ce1502b2b3fa20bbb0c6655669b37
7
- data.tar.gz: 77c44dfa02a1e1fbf4e9279fb32c8a34387e2190c6cb8a13f02bf1a06a4b6fd75432c6ce42675e6dfdac695e33eac610a7fb8b0946e1e297413a8a3bd94e6460
6
+ metadata.gz: ce8988a70b9ccc2d459b1e8eaa25f121c7217b9aad40e34f9318ca892d044cea57298cbae8b37b2da2a4409fd2cf4dd79b4d200b04c23405f20ad12110383c23
7
+ data.tar.gz: 98b2591a78eeca0161b9bba49578ac002021c0c3fcf06b04e9cc0eea139fa06c519a4067df3033e6ef1902b56051a594560db2eb60364f864e544554b90f2257
@@ -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
- (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);};
28
- if(!v[o].l) { v[o].l=1*new Date(); a=i.createElement(d), m=i.getElementsByTagName(d)[0];
29
- a.async=1; a.src=e; m.parentNode.insertBefore(a,m);}
30
- })(window,document,"script","//de122v0opjemw.cloudfront.net/vdo.js","vdo");
31
- vdo.add({o: "%s"});
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: 0.0.2
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: 2015-09-19 00:00:00.000000000 Z
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: http://www.vdocipher.com/api.ror
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.2.2
40
+ rubygems_version: 2.5.1
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: VdoCipher API interface