Giter Site home page Giter Site logo

guardian / pluto-mediabrowser Goto Github PK

View Code? Open in Web Editor NEW
1.0 5.0 0.0 1.3 MB

Simple UI for Vidispine media browsing

TypeScript 87.85% CSS 2.22% JavaScript 4.44% Shell 0.58% Dockerfile 0.18% HTML 0.26% Python 4.47%
media-asset-management vidispine multimedia-tech

pluto-mediabrowser's Introduction

Pluto Media Browser

pluto-media-browser is a frontend UI to search and find media items in Vidispine.

Dev setup

Prerequisites

pluto-media-browser is written in Javascript and Typescript with the React framework. Yarn is used as a package manager. You need node.js installed to develop and build it; we use current LTS version 12.18.

You should also have a working Vidispine installation. The easiest way to get this is to download https://gitlab.com/codmill/customer-projects/guardian/prexit-local and follow the instructions in both the root README and the vidispine/ subdir README.

Authentication to Vidispine is performed with bearer tokens. The prexit-local minikube setup includes a setup of Keycloak to use as a local ID provider. Follow the instructions there to configure Vidispine to use it.

Vidispine initial setup

pluto-media-browser expects certain metadata fields and groups to be present in Vidispine. These are detailed in the vs-metadata/ subdirectory. Once you have working Vidispine (see the prexit-local instructions about configuring the APIinit and initial user!!), then you can ingest these definitions be using the deploy.py tool in the vs-metadata subdirectory:

$ cd vs-metadata
$ ./validate.py metadata/g_asset.xml
$ ./deploy.py --host vidispine.local --port 80 --passwd admin --file metadata/g_asset.xml
$ [repeat the above two lines for the other files in metadata/]

Setup

To build a dev version (non-stripped for debugging), then run:

$ yarn install
$ yarn update-interfaces
$ yarn test
$ yarn dev

Once you have the javascript bundle, you need to run it in a browser. Unfortunately this is not as simple as just double-clicking an index.html file in the tree because it needs to be able to pull in external resources and do CORS requests to Vidispine.

To start up on port 8000 locally, you can run:

$ cd build
$ ./runlocal.sh

This will build a docker image and dynamically link the current state of bundle.js into it. You can access it at http://localhost:8000. If you do so with the cache off then the bundle will get reloaded on every request and you can take advantage of webpack's dynamic rebuilding.

The config will be supplied by the default_config.json file in build/. This points you to http://vidispine.local for Vidispine access, which is the expected configuration from prexit-local. If you are running a different way, you'll need to update the vidispine configuration.

Troubleshooting

  1. If you get an error doing yarn install when installing https://gitlab.com/codmill/customer-projects/guardian/pluto-headers.git, you should:
    1. Configure a git credential helper for your platform. See https://blog.scottlowe.org/2016/11/21/gnome-keyring-git-credential-helper/ for gnome, Mac should have one set up already I believe.
    2. In a temporary location run git clone https://gitlab.com/codmill/customer-projects/guardian/pluto-headers.git and supply your gitlab username and password. This should store them in the credential helper.
    3. Now yarn install should work.
  2. Turn on the browser console!
  3. If you are getting permission denied from VS on OPTIONS requests, then CORS is not set up properly. The following CORS configuration works for me:
    <CORSConfigurationDocument xmlns="http://xml.vidispine.com/schema/vidispine">
        <entry>
            <request>
                <headerRegex>
                    <key>authorization</key>
                    <value>.*</value>
                </headerRegex>
            </request>
            <response>
                <allowOrigin>*</allowOrigin>
                <allowHeaders>*</allowHeaders>
            </response>
        </entry>
    </CORSConfigurationDocument>
    See https://apidoc.vidispine.com/latest/system/property.html#cors-configuration for more information
  4. If you are getting permission denied from VS for other requests, then the issue is probably not CORS. Check that your bearer token signing certificate is correctly set up, and check that the token is not expired!

Running in prexit-local context

TBD!!

pluto-mediabrowser's People

Contributors

dala0 avatar dependabot[bot] avatar fredex42 avatar richpryce avatar snyk-bot avatar viktormill avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.