onebox 2.2.4 → 2.2.5

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
  SHA256:
3
- metadata.gz: 759d82290c29b9e1e3c97045ca14689dfc0f2f87221c1ce829b12a866abfd8a2
4
- data.tar.gz: 5209c14887939549d9737409bd5dff67c2434c5a5f99596d2af93ef56aeaae6b
3
+ metadata.gz: f5124afb82cbf3d3103700c9b6e8ff935ab054f27ec9e115fa67e318554b402a
4
+ data.tar.gz: 66d69a4e0fea63708a7740b021e1ef4f149b5dd0537d0fc1fd060b8fa7d6ce96
5
5
  SHA512:
6
- metadata.gz: 719a0e4e72b2719f8ab0fd71474bfd07ef485c4dcba2c13809d5fbafa86f9b831ebe1aa7a73237c9cde28d7babc472234fa9ae701d9b18aae25621a641c883a0
7
- data.tar.gz: f8c0c6c5883c48ea2811940f00c2419438e199c1e9a70761453c9aafdf176404633dc79133fc87d4014ee0e0c74a037ee8ee19b2f9b46cd85ef07a491f64cfe6
6
+ metadata.gz: 75dfc88ec22ce1c633a6614068171f6f2d5f16841f6d0d800af6b4bf348eff7a46c64c85d64a701a6a791f551c635e24cb84ddc3de452c572579916029c672e5
7
+ data.tar.gz: d9d5ac8c391e3f638e1e0ac9aa198ecb4259bcc1c38e626cea0b68ca527659d21f8d74f47ad6b99a94e02fda10fa4a0812b175ebef52b08d1f07dba037994210
data/lib/onebox.rb CHANGED
@@ -21,7 +21,8 @@ module Onebox
21
21
  allowed_ports: [80, 443],
22
22
  allowed_schemes: ["http", "https"],
23
23
  sanitize_config: Sanitize::Config::ONEBOX,
24
- redirect_limit: 5
24
+ redirect_limit: 5,
25
+ disable_media_download_controls: false
25
26
  }
26
27
 
27
28
  @@options = DEFAULTS
@@ -15,7 +15,7 @@ module Onebox
15
15
  escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
16
16
 
17
17
  <<-HTML
18
- <audio controls>
18
+ <audio controls #{@options[:disable_media_download_controls] ? 'controlslist="nodownload"' : ""}>
19
19
  <source src="#{escaped_url}">
20
20
  <a href="#{escaped_url}">#{@url}</a>
21
21
  </audio>
@@ -20,7 +20,7 @@ module Onebox
20
20
  escaped_url = ::Onebox::Helpers.normalize_url_for_output(@url)
21
21
  <<-HTML
22
22
  <div class="onebox video-onebox">
23
- <video width='100%' height='100%' controls>
23
+ <video width='100%' height='100%' controls #{@options[:disable_media_download_controls] ? 'controlslist="nodownload"' : ""}>
24
24
  <source src='#{escaped_url}'>
25
25
  <a href='#{escaped_url}'>#{@url}</a>
26
26
  </video>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Onebox
4
- VERSION = "2.2.4"
4
+ VERSION = "2.2.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joanna Zeta
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-24 00:00:00.000000000 Z
13
+ date: 2021-02-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable