First of all you need to create a new AppDefinition
.
Go the to the management view for your apps.
Click on Create an app and you will be redirected to a page where you can provide details about your app.
-
Provide a name for your app. This can be whatever you want, we chose Brightcove.
-
Enter the app url. This should be set to https://gucciogucci.github.io/contentful-app-brightcove/
⚠️ If you prefer to freeze the version number to avoid breaking changes, you can add the version number at the end of the above url: https://gucciogucci.github.io/contentful-app-brightcove/v0.2.0/ -
Specify the app locations. Select App configuration screen and Entry field - Short text.
Click on Create app when you are done filling in the details.
After you created the AppDefinition
, the app should appear on the app listing page in the list of available apps.
Click on the app and authorize the access.
At this point you need to configure the application:
-
Proxy URL: this is the url for your Brightcove Proxy. Read more on the next chapter.
-
Brightcove Account Id: account id is used to display the video player in Contentful instead of the input text.
-
Brightcove Player Id: you can choose a custom Brightcove Player instead of the default one.
Click the Install button to install your app.
The app is finally ready to be used!
Create a new content model (or use an already existing one) and add a new short text
field.
Click on Create and configure
.
Selecting the Appearance
tab you should be able to choose the new Brightcove app.
Click on Confirm
.
When you'll create a new Entry, you'll see the Choose Video
button.
🎉 You have done!
The Brightcove Platform APIs are generally not CORS-enabled, meaning that you cannot access them directly from a web app.
To get around this, all you need to do is route the API requests through a server-side app often called a proxy.
The proxy takes the request from a web page via JavaScript, gets an access token, makes the API request, and then returns the response to the calling page.
source: https://github.com/BrightcoveLearning/sample-proxy-apps
Checkout the brightcove-proxy folder to understand how to build your own proxy.
This project was bootstrapped with Create Contentful App.
In the project directory, you can run:
Creates or updates your app definition in Contentful, and runs the app in development mode. Open your app to view it in the browser.
The page will reload if you make edits. You will also see any lint errors in the console.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
To make your app look and feel like Contentful use the following libraries:
- Forma 36 – Contentful's design system
- Contentful Field Editors – Contentful's field editor React components
Read more and check out the video on how to use the CLI.
Create Contentful App uses Create React App. You can learn more in the Create React App documentation and how to further customize your app.
Copyright 2021 Gucci.
Licensed under the GNU Lesser General Public License, Version 3.0