Comments (2)
This is our current approach:
Given the following plugin structure,
src/plugins/spinner_three_bounce
├── index.js
└── public
├── spinner.css
└── spinner.html
The index.js is the plugin's code. In the public/
directory is the plugins assets. We currently only support .css and .html files. The .html file supports underscore templating. These files are loaded during build, it's contents are extracted and parsed to a src/base/jst.js
file, which exports a hash with all templating and styles, where the plugin's name is the key. So, for loading a plugins template, you must call it through JST['plugin_name']
. To load a style, call JST.CSS['plugin_name']
. This file must be used in development when referring to templates or styles. For example:
var JST = require('../../base/jst');
var FooPlugin = BaseObject.extend({
template: JST['foo'],
render: function() {
this.style = JST.CSS['foo']; // here the style variable has all the css file content.
return this;
}
});
from clappr.
We also have to reset the style of all data attributes used by the player to avoid style collisions
from clappr.
Related Issues (20)
- dist folder missing on last release HOT 2
- Liberação
- website server issue HOT 1
- CMCD
- Error 'no EXTM3U delimiter' when my HLS origin is HTTPS
- [Bug] Preload None Fails With m3u8 Streams HOT 1
- Attempting to deploy to Netlify results in `The engine node is incompatible` error (Expected ^v14.0.0. , Got 16.20.1) HOT 4
- free online m3u player with some bugs
- Create Monorepo Structure
- Move @clappr/core to Monorepo HOT 1
- clappr.io has incorrect link
- "Clappr" on my TV with NO media playing HOT 2
- Create Declaration Types File
- Create new home page design for Clappr docs HOT 3
- Configure internationalization in docs HOT 1
- How to listen error events on Clappr Hls when is IOS
- Move @clappr/plugins to Monorepo HOT 2
- Move docs to monorepo
- update strings using configure() HOT 1
- Clappr Mobile FullScreen Mode HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clappr.