Skip to content

Commit 2c84ba4

Browse files
committed
Update README.md
1 parent 1e4e4f8 commit 2c84ba4

File tree

1 file changed

+65
-76
lines changed

1 file changed

+65
-76
lines changed

README.md

Lines changed: 65 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,86 @@
11
# Cloudflare Stream for WordPress
22

3-
<a href="https://github.com/B-Interactive/cloudflare-stream-wordpress/releases/latest"><img src="https://badgen.net//github/release/B-Interactive/cloudflare-stream-wordpress" /></a>
4-
<a href="https://github.com/B-Interactive/cloudflare-stream-wordpress/blob/main/LICENSE"><img src="https://badgen.net//github/license/B-Interactive/cloudflare-stream-wordpress" /></a>
3+
![latest-release](https://badgen.net//github/release/B-Interactive/cloudflare-stream-wordpress)
4+
![license](https://badgen.net//github/license/B-Interactive/cloudflare-stream-wordpress)
55

6-
![WordPress Coding Standards](https://github.com/B-Interactive/cloudflare-stream-wordpress/actions/workflows/wpcs.yml/badge.svg)
7-
![Blocks Build](https://github.com/B-Interactive/cloudflare-stream-wordpress/actions/workflows/node.js.yml/badge.svg)
6+
![wordpress-coding-standards](https://github.com/B-Interactive/cloudflare-stream-wordpress/actions/workflows/wpcs.yml/badge.svg)
7+
![blocks-build](https://github.com/B-Interactive/cloudflare-stream-wordpress/actions/workflows/node.js.yml/badge.svg)
88

99
A fork from the official Cloudflare Stream plugin 1.0.5 for WordPress. This fork looks to achieve these key features:
1010

11-
* Take full advantage of Cloudflare Stream's security features.
12-
* Uses signed URL's / tokens, so video access can be strictly controlled and limited.
13-
* Uses a limited access API token for API access, eliminating the use of the global API key which presents a huge security risk.
14-
* Incorporate additional features and new features as they're made available.
15-
16-
The Gutenberg Block method of adding videos appears to be broken (in the original plugin also). I've only left code related to the Gutenberg Block in this fork, so as to not break existing content should you switch from the official plugin. Adding new block content will fail as the global API key it's expecting to use is no longer stored in this plugin. Note the Gutenberg Block as it currently exists, does not support signed URL's / tokens.
17-
18-
USE THE SHORTCODE METHOD INSTEAD. [See Shortcode section below](#shortcode).
11+
- Rebuild and upgrade the Block that is currently broken in official plugin.
12+
- Take full advantage of Cloudflare Stream's security features.
13+
- Uses signed URL's / tokens, so video access can be strictly controlled and limited.
14+
- Uses a limited access API token for API access, eliminating the use of the global API key which presents security risk.
15+
- Incorporate additional features and new features as they're made available.
1916

17+
The Block method of adding videos is currently limited to upload only. Browsing and selecting content from your Cloudflare Stream Library is not yet fixed. Legacy Block content is supported in a deprecated form, but will not take advantage of new features such as signed URLs.
18+
For now, using the shortcode method is still the most appropriate way to insert content already in your Stream Library. [See Shortcode section below](#shortcode).
2019

2120
The original official plugin:
2221
https://wordpress.org/plugins/cloudflare-stream/
23-
2422
Official plugin GitHub page:
2523
https://github.com/cloudflare/stream-wordpress
2624

25+
## Changes from Official
2726

28-
Changes from Official
29-
------------
30-
* Shortcode method (optionally) uses signed URL's / tokens.
31-
* Removed analytics.
32-
* Added additional shortcode options: controls, autoplay, loop, preload and muted.
33-
* Uses API Token based API access, for MUCH more secure Cloudflare account access.
34-
* Any existing API Key and API account email stored in the database are deleted when the settings page is accessed.
35-
* If updating from version older than 1.0.6, you'll need to enter your Cloudflare API Token and Cloudflare Account ID in the configuration page.
36-
* Added admin setting for signed URL/token duration (default is otherwise 1 hour).
37-
* Added admin toggle for whether or not to use signed URLs/tokens.
38-
* Can select Cloudflare media domain, including new account specific sub-domain.
27+
- Shortcode method (optionally) uses signed URL's / tokens.
28+
- Removed analytics.
29+
- Added additional shortcode options: controls, autoplay, loop, preload and muted.
30+
- Uses API Token based API access, for MUCH more secure Cloudflare account access.
31+
- Any existing API Key and API account email stored in the database are deleted when the settings page is accessed.
32+
- If updating from version older than 1.0.6, you'll need to enter your Cloudflare API Token and Cloudflare Account ID in the configuration page.
33+
- Added admin setting for signed URL/token duration (default is otherwise 1 hour).
34+
- Added admin toggle for whether or not to use signed URLs/tokens.
35+
- Can select Cloudflare media domain, including new account specific sub-domain.
3936

37+
## To-Do
4038

41-
To-Do
42-
------------
43-
* Rebuild Gutenberg block with dynamic support for signed URL's.
39+
- Block: Fix browsing and adding videos from the Cloudflare Stream Library possible.
4440

41+
## Issues
4542

46-
Issues
47-
------------
48-
* The Gutenberg Block method of adding videos is failing. This is failing in the original plugin too. Shortcode method is working though. Details on how to use it are below.
43+
- When using the Block, browsing and selecting content from your Cloudflare Stream Library is not yet resolved.
4944

45+
## Installation
5046

47+
- Download the full plugin ZIP file from the [latest release of this plugin](https://github.com/B-Interactive/cloudflare-stream-wordpress/releases/latest)
48+
- In the WordPress admin panel, go to Plugins > Add New > Upload Plugin and upload the ZIP file
49+
- Click the "Activate" button
50+
- In the WordPress admin panel, visit the Plugins section Activate the Cloudflare Stream plugin.
5151

52-
Installation
53-
------------
54-
* Download the full plugin ZIP file from the [latest release of this plugin](https://github.com/B-Interactive/cloudflare-stream-wordpress/releases/latest)
55-
* In the WordPress admin panel, go to Plugins > Add New > Upload Plugin and upload the ZIP file
56-
* Click the "Activate" button
57-
* In the WordPress admin panel, visit the Plugins section Activate the Cloudflare Stream plugin.
52+
## Admin Settings
5853

59-
60-
Admin Settings
61-
------------
62-
The admin area has been completely revised from the official plugin. Instead of using the all-controlling global API key, this now makes use of a much more secure API token, which only permits the plugin limited access to a Cloudflare account. When the admin settings are accessed, any existing API key and email stored in the database, are deleted from the database as these are no longer needed and their presence is a security risks.
54+
The admin area has been completely revised from the official plugin. Instead of using the all-controlling global API key, this now makes use of a much more secure API token, which only permits the plugin limited access to a Cloudflare account. When the admin settings are accessed, any existing API key and email stored in the database, are deleted from the database as these are no longer needed and their presence is a security risks.
6355

6456
![admin-settings](https://user-images.githubusercontent.com/16984998/188538819-ac0b9905-7d62-4118-81ff-d92a78ba7ea7.png)
6557

58+
### API Account ID
59+
60+
- **Cloudflare** > [domain] > **Overview** > [scroll down to API section on the right and copy the Account ID].
61+
62+
### API Token
6663

67-
### API Account ID ###
68-
* **Cloudflare** > [domain] > **Overview** > [scroll down to API section on the right and copy the Account ID].
64+
An API token must be created in your Cloudflare dashboard, for this plugin. For security sake, the token should only be used for this plugin and provide only the permissions necesarry for the plugin to work. I'd https://www.gnu.org/licenses/old-licenses/gpl-2.0.htmlrecommend setting up Client IP Address Filtering when creating the token too. Where feasible, restrict access to only the IP addresses that need it (eg: your webserver's IP where WordPress is installed).
6965

70-
### API Token ###
71-
An API token must be created in your Cloudflare dashboard, for this plugin. For security sake, the token should only be used for this plugin and provide only the permissions necesarry for the plugin to work. I'd recommend setting up Client IP Address Filtering when creating the token too. Where feasible, restrict access to only the IP addresses that need it (eg: your webserver's IP where WordPress is installed).
72-
* **Cloudflare** > **My Profile** > **API Tokens** > **API Tokens** > [Create Token]
73-
Must have permission for: **Account - Stream:Edit**
66+
- **Cloudflare** > **My Profile** > **API Tokens** > **API Tokens** > [Create Token]
67+
Must have permission for: **Account - Stream:Edit**
7468

75-
### Use Signed URLs ###
76-
When this is checked [x], videos are accessed using a temporary time-limited token, aka signed URL. This alone does not secure your content however. Please see **[Securing Video Access](#securing-video-access)** below for further details on how to do that.
69+
### Use Signed URLs
70+
71+
When this is checked [x], videos are accessed using a temporary time-limited token, aka signed URL. This alone does not secure your content however. Please see **[Securing Video Access](#securing-video-access)** below for further details on how to do that.
72+
73+
### Signed URL Expiration
7774

78-
### Signed URL Expiration ###
7975
When **Use Signed URLs** is checked [x], this setting controls how long any particular token / signed ULR is valid for **in minutes**. The Cloudflare default, is 60 minutes. Generally, you'd want to make sure this is larger than your longest video.
8076

81-
### Preferred Media Domain ###
82-
This option allows you to select from a small list of different Cloudflare media domains. This domain is used when delivering content to your users. The 3rd option is a unique subdomain specific to your Cloudflare account. This option will only be presented if you have at least one video already uploaded to your Cloudflare Stream account.
77+
### Preferred Media Domain
8378

79+
This option allows you to select from a small list of different Cloudflare media domains. This domain is used when delivering content to your users. The 3rd option is a unique subdomain specific to your Cloudflare account. This option will only be presented if you have at least one video already uploaded to your Cloudflare Stream account.
8480

85-
Securing Video Access
86-
------------
81+
## Securing Video Access
8782

88-
1. Make sure **Use Signed URLs** is checked [x], in the admin settings. **This feature alone does not secure your videos.** The original ID of your videos is still accessible and could be used to access them.
83+
1. Make sure **Use Signed URLs** is checked [x], in the admin settings. **This feature alone does not secure your videos.** The original ID of your videos is still accessible and could be used to access them.
8984

9085
![use-signed-urls](https://user-images.githubusercontent.com/16984998/166195570-6e2ecfd4-72af-4f11-a52c-f615df470a36.png)
9186

@@ -97,55 +92,49 @@ Securing Video Access
9792

9893
![allowed-origins](https://user-images.githubusercontent.com/16984998/166195828-80c23260-fc02-47bb-89b1-ceb8a4217638.png)
9994

100-
101-
Shortcode
102-
------------
95+
## Shortcode
10396

10497
`[cloudflare_stream uid="`_some video id_`"]`
10598

10699
Replace _some video id_ with an actual Cloudflare Stream video ID.
107100

108101
These are optional shortcode flags (with defaults shown here). These are all "true" or "false" options:
109102

110-
* controls="true"
111-
* autoplay="false"
112-
* loop="false"
113-
* preload="false"
114-
* muted="false"
115-
103+
- controls="true"
104+
- autoplay="false"
105+
- loop="false"
106+
- preload="false"
107+
- muted="false"
116108

117109
They can be used in this way:
118110

119111
`[cloudflare_stream uid="`_some video id_`" controls="true" autoplay="false" loop="false" preload="false" muted="false"]`
120112

113+
## Developers
121114

122-
Developers
123-
------------
124115
Clone this repo, cd into the `cloudflare-stream-wordpress` directory and run
125116

126117
```bash
127-
$ npm install
118+
npm install
128119
```
129120

130121
Build for development (uses development mode for Webpack, making browser debugging easier):
131122

132123
```bash
133-
$ npm run build:dev
124+
npm run build:dev
134125
```
135126

136127
Build for production:
137128

138129
```bash
139-
$ npm run build
130+
npm run build
140131
```
141132

142-
Acknowledgements
143-
----------------
144-
* Cloudflare and WP Engine for developing the original plugin this was forked from.
133+
## Acknowledgements
145134

135+
- Cloudflare and WP Engine for developing the original plugin this was forked from.
146136

147-
License
148-
-------
137+
## License
149138

150139
Copyright (C) 2020 Cloudflare
151140

@@ -156,11 +145,11 @@ of the License, or (at your option) any later version.
156145

157146
This program is distributed in the hope that it will be useful,
158147
but WITHOUT ANY WARRANTY; without even the implied warranty of
159-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
148+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
160149
GNU General Public License for more details.
161150

162151
You should have received a copy of the GNU General Public License
163152
along with this program; if not, write to the Free Software
164-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
153+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
165154

166-
https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
155+
[https://www.gnu.org/licenses/old-licenses/gpl-2.0.html](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)

0 commit comments

Comments
 (0)