-
Notifications
You must be signed in to change notification settings - Fork 5
/
flashPlayer.js
38 lines (29 loc) · 945 Bytes
/
flashPlayer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* This script runs when node-webkit starts up. It creates an express server
* that allow for a flash player to be embedded in an iframe with soundmanager2.
*
* This is necessary due to the way Flash/RTMP interact with desktop applications.
*
*/
var express = require('express');
var app = express();
var exphbs = require('express3-handlebars');
app.engine('handlebars', exphbs({defaultLayout: 'main'}));
app.set('view engine', 'handlebars');
app.use(express.urlencoded());
app.use(express.json());
app.use(app.router);
app.use(express.static('./components'));
app.use(express.static('./views/layouts'));
app.use(express.static('./assets'));
var player = {};
app.get('/player', function(req,res){
player = {
serverURL: req.query.server_url,
url: req.query.url,
artist: req.query.artist,
title: req.query.title
}
res.render('flashPlayer', player);
});
var server = app.listen(3112);