cessna 0.0.4 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/cessna.gemspec +1 -0
- data/lib/cessna.rb +27 -11
- data/lib/cessna/bonjour.rb +43 -0
- data/lib/cessna/bonjour/server.rb +13 -0
- data/lib/cessna/version.rb +1 -1
- data/public/assets/css/docs.css +11 -3
- data/public/assets/js/bootstrap.js +2268 -0
- data/public/assets/js/jquery.js +9597 -0
- data/views/browse.haml +3 -3
- data/views/error.haml +2 -2
- data/views/index.haml +3 -1
- data/views/layout.haml +30 -9
- data/views/play.haml +5 -5
- data/views/servers.haml +72 -0
- metadata +23 -2
data/views/browse.haml
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
=folder.name
|
17
17
|
- @videos.each do |video|
|
18
18
|
%li
|
19
|
-
%i{class: 'icon-
|
19
|
+
%i{class: 'icon-film'}
|
20
20
|
%a{href: "/play/#{Base64.encode64(video.location)}"}
|
21
|
-
="#{video.name}"
|
21
|
+
= "#{video.name}"
|
22
22
|
- else
|
23
23
|
%div{class: 'alert alert-info'}
|
24
|
-
=
|
24
|
+
= 'There were no folders or supported video formats found in this folder...'
|
data/views/error.haml
CHANGED
data/views/index.haml
CHANGED
data/views/layout.haml
CHANGED
@@ -1,17 +1,38 @@
|
|
1
1
|
!!!
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%title Cessna
|
4
|
+
%title= 'Cessna'
|
5
5
|
%link{:rel => 'stylesheet', :href => '/assets/css/bootstrap.css', :type => "text/css"}
|
6
6
|
%link{:rel => 'stylesheet', :href => '/assets/css/bootstrap-responsive.css', :type => "text/css"}
|
7
7
|
%link{:rel => 'stylesheet', :href => '/assets/css/docs.css', :type => "text/css"}
|
8
|
+
%script{type: 'text/javascript', src: '/assets/js/jquery.js'}
|
9
|
+
%script{type: 'text/javascript', src: '/assets/js/bootstrap.js'}
|
8
10
|
%body
|
9
|
-
.container
|
10
|
-
.
|
11
|
-
%
|
12
|
-
|
11
|
+
.container-narrow
|
12
|
+
.header
|
13
|
+
%ul{class: 'nav nav-pills pull-right'}
|
14
|
+
%li
|
15
|
+
%a{href: '/servers'}
|
16
|
+
= 'Servers'
|
13
17
|
- if @hostname
|
14
|
-
%
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
%li{class: 'dropdown'}
|
19
|
+
%a{href: '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'}}
|
20
|
+
= "@#{@hostname}"
|
21
|
+
%b{class: 'caret'}
|
22
|
+
|
23
|
+
%ul{class: 'dropdown-menu'}
|
24
|
+
%li
|
25
|
+
%a{href: '/browse'}
|
26
|
+
= 'Browse shared folders'
|
27
|
+
%li{class: 'divider'}
|
28
|
+
%li
|
29
|
+
%a{href: '/disconnect'}
|
30
|
+
= 'Disconnect'
|
31
|
+
%h3{class: 'muted'}
|
32
|
+
= 'Cessna'
|
33
|
+
|
34
|
+
%hr
|
35
|
+
|
36
|
+
.row-fluid
|
37
|
+
.span12
|
38
|
+
=yield
|
data/views/play.haml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
%ul{class: 'breadcrumb'}
|
2
2
|
%li
|
3
3
|
%a{href: "/browse/#{Base64.encode64(@parent_location)}"}
|
4
|
-
=
|
4
|
+
= '..'
|
5
5
|
%span{class: 'divider'}='/'
|
6
6
|
%li{class: 'active'}
|
7
7
|
=@video_name
|
@@ -11,11 +11,11 @@
|
|
11
11
|
|
12
12
|
- unless format_is_supported?(@video_name)
|
13
13
|
%div{class: 'alert alert-info'}
|
14
|
-
=
|
14
|
+
= 'The playback of this video format ist not really supported by HTML5 video and therefore the playback is disabled.'
|
15
15
|
- else
|
16
|
-
%div
|
17
|
-
%video{ width:
|
16
|
+
%div{class: 'center'}
|
17
|
+
%video{ width: '98%', controls: true, autoplay: true, class: 'img-polaroid'}
|
18
18
|
%source{src: @video_stream_url}
|
19
19
|
|
20
20
|
%a{href: @video_stream_url, class: 'btn btn-small'}
|
21
|
-
=
|
21
|
+
= 'Download'
|
data/views/servers.haml
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
- if @servers.empty?
|
2
|
+
%div{class: 'alert alert-info'}
|
3
|
+
="There were no AirVideo Servers found in your local network."
|
4
|
+
|
5
|
+
- else
|
6
|
+
%table{class: 'table table-condensed'}
|
7
|
+
%thead
|
8
|
+
%tr
|
9
|
+
%th= 'Hostname'
|
10
|
+
%th= 'IP address'
|
11
|
+
%th= 'Port'
|
12
|
+
%tbody
|
13
|
+
- @servers.each do |server|
|
14
|
+
%tr
|
15
|
+
%td= server.hostname
|
16
|
+
%td= server.ip
|
17
|
+
%td= server.port
|
18
|
+
%td{class: 'right'}
|
19
|
+
%a{href: '#connect', class: 'open-dialog', role: 'button', data: { hostname: "#{server.hostname}", ip: "#{server.ip}", port: "#{server.port}", toggle: 'modal', target: '#connect' }}
|
20
|
+
= 'Connect'
|
21
|
+
|
22
|
+
%div{id: 'connect', class: 'modal hide fade', tabindex: '-1', role: 'dialog', aria: { labelledby: 'connectLabel', hidden: 'true' } }
|
23
|
+
%div{class: 'modal-header'}
|
24
|
+
%button{type: 'button', class: 'close', data: { dismiss: 'modal' }, aria: { hidden: 'true'}}
|
25
|
+
= 'x'
|
26
|
+
%h3{id: 'connectLabel'}
|
27
|
+
%span{id: 'hostname-label'}
|
28
|
+
%div{class: 'modal-body'}
|
29
|
+
%form{ action: '/session', method: 'post', id: 'connect-form', class: 'form-horizontal'}
|
30
|
+
%input{type: 'text', class: 'hide', name: 'hostname', id: 'hostname'}
|
31
|
+
%div.control-group
|
32
|
+
%label.control-label{for: 'ipaddr'}
|
33
|
+
= 'IP address:'
|
34
|
+
%div.controls
|
35
|
+
%input{type: 'text', name: 'ipaddr', id: 'ipaddr'}
|
36
|
+
%div.control-group
|
37
|
+
%label.control-label{for: 'port'}
|
38
|
+
= 'Port:'
|
39
|
+
%div.controls
|
40
|
+
%input{type: 'text', name: 'port', id: 'port'}
|
41
|
+
%div.control-group
|
42
|
+
%label.control-label{for: 'password'}
|
43
|
+
= 'Password:'
|
44
|
+
%div.controls
|
45
|
+
%input{type: 'password', name: 'password', placeholder: 'Password'}
|
46
|
+
%div{class: 'modal-footer'}
|
47
|
+
%div.control-group
|
48
|
+
%div.controls
|
49
|
+
%button{type: 'submit', class: 'btn btn-primary', id: 'submit'}
|
50
|
+
= 'Connect'
|
51
|
+
|
52
|
+
:javascript
|
53
|
+
$(document).on('click', '.open-dialog', function() {
|
54
|
+
var hostname = $(this).data('hostname');
|
55
|
+
var ip = $(this).data('ip');
|
56
|
+
var port = $(this).data('port');
|
57
|
+
|
58
|
+
$('#hostname-label').html(hostname);
|
59
|
+
$('#hostname').val(hostname);
|
60
|
+
$('#ipaddr').val(ip);
|
61
|
+
$('#port').val(port);
|
62
|
+
});
|
63
|
+
|
64
|
+
$('#submit').on('click', function() {
|
65
|
+
$('#connect-form').submit();
|
66
|
+
});
|
67
|
+
|
68
|
+
$('#connect').on('keypress', function(e) {
|
69
|
+
if (e.which === 13) {
|
70
|
+
$('#connect-form').submit();
|
71
|
+
}
|
72
|
+
});
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cessna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: dnssd
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
description: A web client for the AirVideo Server
|
63
79
|
email:
|
64
80
|
- mettler.fabian@gmail.com
|
@@ -75,17 +91,22 @@ files:
|
|
75
91
|
- bin/cessna
|
76
92
|
- cessna.gemspec
|
77
93
|
- lib/cessna.rb
|
94
|
+
- lib/cessna/bonjour.rb
|
95
|
+
- lib/cessna/bonjour/server.rb
|
78
96
|
- lib/cessna/version.rb
|
79
97
|
- public/assets/css/bootstrap-responsive.css
|
80
98
|
- public/assets/css/bootstrap.css
|
81
99
|
- public/assets/css/docs.css
|
82
100
|
- public/assets/img/glyphicons-halflings-white.png
|
83
101
|
- public/assets/img/glyphicons-halflings.png
|
102
|
+
- public/assets/js/bootstrap.js
|
103
|
+
- public/assets/js/jquery.js
|
84
104
|
- views/browse.haml
|
85
105
|
- views/error.haml
|
86
106
|
- views/index.haml
|
87
107
|
- views/layout.haml
|
88
108
|
- views/play.haml
|
109
|
+
- views/servers.haml
|
89
110
|
homepage: https://github.com/maveonair/cessna
|
90
111
|
licenses: []
|
91
112
|
post_install_message:
|