neo-blessed/test/widget-video.js

28 lines
428 B
JavaScript
Raw Normal View History

var blessed = require('../');
var fs = require('fs');
var screen = blessed.screen({
tput: true,
smartCSR: true,
2015-07-22 02:23:57 +00:00
dump: __dirname + '/logs/video.log',
warnings: true
});
var video = blessed.video({
parent: screen,
left: 1,
top: 1,
width: '90%',
height: '90%',
border: 'line',
file: process.argv[2]
});
video.focus();
screen.render();
screen.key(['q', 'C-q', 'C-c'], function() {
screen.destroy();
});