Commit 66d47f16a6e4204b72843a6775a580b1a574fb64
1 parent
8bc1d507
Exists in
master
Release 0.2.0
Showing
39 changed files
with
420 additions
and
193 deletions
Show diff stats
.gitignore
Gulpfile.js
... | ... | @@ -10,6 +10,7 @@ var webglFiles = [ |
10 | 10 | 'connect.js', |
11 | 11 | 'load.js', |
12 | 12 | 'verify-compatibility.js', |
13 | + 'error.js', | |
13 | 14 | 'window.html', |
14 | 15 | 'TemplateData/*', |
15 | 16 | 'Release/*' |
... | ... | @@ -17,15 +18,17 @@ var webglFiles = [ |
17 | 18 | |
18 | 19 | var webplayerFiles = [ |
19 | 20 | 'window.html', |
20 | - 'player.js', | |
21 | - 'WEBPLAYER.unity3d' | |
21 | + 'verify-compatibility.js', | |
22 | + 'webplayer.js', | |
23 | + 'webplayer.unity3d', | |
24 | + 'UnityObject2.js', | |
25 | + '../vendors/jquery.js' | |
22 | 26 | ]; |
23 | 27 | |
24 | 28 | var playerFiles = [ |
25 | 29 | 'TemplateData/*', |
26 | 30 | 'js/*', |
27 | - 'vendors/qdclient/qdclient.js', | |
28 | - 'vendors/offline/offline.js' | |
31 | + 'vendors/qdclient/qdclient.js' | |
29 | 32 | ]; |
30 | 33 | |
31 | 34 | var webglTask = function(dest) { |
... | ... | @@ -40,6 +43,10 @@ var webplayerTask = function(dest) { |
40 | 43 | .pipe(gulp.dest(dest)); |
41 | 44 | |
42 | 45 | playerTask(dest); |
46 | + | |
47 | + // Additional dependencies | |
48 | + gulp.src(['vendors/jquery/dist/jquery.min.js'], {base: 'player', cwd: 'player'}) | |
49 | + .pipe(gulp.dest(dest)); | |
43 | 50 | }; |
44 | 51 | |
45 | 52 | var playerTask = function(dest) { | ... | ... |
chrome/background.js
chrome/manifest.json
firefox/index.js
... | ... | @@ -36,7 +36,7 @@ cm.Item({ |
36 | 36 | app.window = browser.open( |
37 | 37 | self.data.url('player/window.html'), |
38 | 38 | 'VLibras Plugin', |
39 | - 'width=560,height=560,menubar=no' | |
39 | + 'width=400,height=500,menubar=no,resizable=yes' | |
40 | 40 | ); |
41 | 41 | } else { |
42 | 42 | app.worker.port.emit('selectedText', app.selectedText); | ... | ... |
firefox/package.json
1.63 KB
1.16 KB
414 Bytes
359 Bytes
33.8 KB
15.3 KB
14.6 KB
10.2 KB
648 Bytes
661 Bytes
19.1 KB
17.9 KB
4.3 KB
player/TemplateData/style.css
... | ... | @@ -9,7 +9,7 @@ html, body, #canvas { |
9 | 9 | margin: 0; |
10 | 10 | overflow: hidden; |
11 | 11 | font-size: 70%; |
12 | - line-height: 110%; | |
12 | + font-family: Arial, sans-serif; | |
13 | 13 | -moz-osx-font-smoothing: grayscale; |
14 | 14 | -webkit-font-smoothing: antialiased; |
15 | 15 | } |
... | ... | @@ -43,6 +43,10 @@ html, body, #canvas { |
43 | 43 | z-index: 9998; |
44 | 44 | } |
45 | 45 | |
46 | +.message-box a { | |
47 | + color: inherit; | |
48 | +} | |
49 | + | |
46 | 50 | .message-box.info { |
47 | 51 | background-color: #3b8bba; |
48 | 52 | color: #ffffff; |
... | ... | @@ -63,6 +67,136 @@ html, body, #canvas { |
63 | 67 | color: #8c8c8c; |
64 | 68 | } |
65 | 69 | |
70 | +#info-screen { | |
71 | + position: absolute; | |
72 | + left: 0; | |
73 | + top: 0; | |
74 | + | |
75 | + padding: 1em; | |
76 | + | |
77 | + width: 100%; | |
78 | + height: 100%; | |
79 | + | |
80 | + background-color: white; | |
81 | + color: black; | |
82 | + font-family: Arial, sans-serif; | |
83 | + text-align: center; | |
84 | + | |
85 | + align-items: center; | |
86 | + -webkit-align-items: center; | |
87 | + font-size: 2em; | |
88 | + | |
89 | + display: none; | |
90 | + | |
91 | + -webkit-box-sizing: border-box; | |
92 | + -moz-box-sizing: border-box; | |
93 | + box-sizing: border-box; | |
94 | +} | |
95 | + | |
96 | +#info-screen.active { | |
97 | + display: -webkit-flex; | |
98 | +} | |
99 | + | |
100 | +#info-screen .arrow { | |
101 | + flex-grow: 1; | |
102 | + -webkit-flex-grow: 1; | |
103 | + visibility: hidden; | |
104 | +} | |
105 | + | |
106 | +#info-screen .arrow.active { | |
107 | + visibility: visible; | |
108 | +} | |
109 | + | |
110 | +#info-tabset { | |
111 | + flex-grow: 4; | |
112 | + display: -webkit-flex; | |
113 | + flex-direction: column; | |
114 | + -webkit-flex-direction: column; | |
115 | + padding: 0 1em; | |
116 | +} | |
117 | + | |
118 | +#info-main { | |
119 | + flex-direction: column; | |
120 | + -webkit-flex-direction: column; | |
121 | +} | |
122 | + | |
123 | +#info-realizadores { | |
124 | + flex-direction: row; | |
125 | + -webkit-flex-direction: row; | |
126 | + flex-wrap: wrap; | |
127 | + -webkit-flex-wrap: wrap; | |
128 | + justify-content: center; | |
129 | + -webkit-justify-content: center; | |
130 | +} | |
131 | + | |
132 | +#info-realizadores .logo { | |
133 | + margin-left: 2em; | |
134 | + width: 20%; | |
135 | + min-width: 60px; | |
136 | + max-width: 80px; | |
137 | +} | |
138 | + | |
139 | +#gov-logo.logo { | |
140 | + width: 100%; | |
141 | + margin-left: 0; | |
142 | + min-width: 200px; | |
143 | + max-width: 500px; | |
144 | +} | |
145 | + | |
146 | +#ufpb-logo { | |
147 | + width: 10%; | |
148 | +} | |
149 | + | |
150 | +.info-tab { | |
151 | + flex-grow: 3; | |
152 | + -webkit-flex-grow: 3; | |
153 | + display: none; | |
154 | +} | |
155 | + | |
156 | +.info-tab.active { | |
157 | + display: block; | |
158 | +} | |
159 | + | |
160 | +#info-meta p { | |
161 | + margin: .5em 0 0; | |
162 | +} | |
163 | + | |
164 | +#info-meta a { | |
165 | + text-decoration: none; | |
166 | +} | |
167 | + | |
168 | +.info-bullet:before { | |
169 | + content: url(CounterOff.png); | |
170 | +} | |
171 | + | |
172 | +.info-bullet.active:before { | |
173 | + content: url(CounterOn.png); | |
174 | +} | |
175 | + | |
176 | +#info-tab-bullets { | |
177 | + width: 100%; | |
178 | + height: 16px; | |
179 | + text-align: center; | |
180 | + flex-grow: 1; | |
181 | + -webkit-flex-grow: 1; | |
182 | + margin-top: 10%; | |
183 | +} | |
184 | + | |
185 | +#info-button { | |
186 | + position: fixed; | |
187 | + top: 7px; | |
188 | + right: 5px; | |
189 | + z-index: 8888; | |
190 | +} | |
191 | + | |
192 | +#info-button:before { | |
193 | + content: url(About.png); | |
194 | +} | |
195 | + | |
196 | +#info-button.active:before { | |
197 | + content: url(Close.png); | |
198 | +} | |
199 | + | |
66 | 200 | .message-box.active { |
67 | 201 | top: 0; |
68 | 202 | opacity: 1; | ... | ... |
player/bower.json
player/js/loading.js
1 | -(function (window, document, Message) { | |
1 | +(function (window, document, MessageBox) { | |
2 | 2 | |
3 | 3 | function Loading(selector, messageSelector) { |
4 | 4 | this.element = document.querySelector(selector); |
5 | - this.message = new Message(messageSelector); | |
5 | + this.box = new MessageBox(messageSelector); | |
6 | + | |
7 | + this.message = null; | |
6 | 8 | } |
7 | 9 | |
8 | 10 | Loading.prototype.show = function(message) { |
9 | 11 | this.element.style.display = 'block'; |
10 | - this.message.show('info', message); | |
12 | + this.message = this.box.show('info', message); | |
11 | 13 | }; |
12 | 14 | |
13 | 15 | Loading.prototype.hide = function() { |
14 | 16 | this.element.style.display = 'none'; |
15 | - this.message.hide(); | |
17 | + this.box.hide(this.message); | |
16 | 18 | }; |
17 | 19 | |
18 | 20 | window.Loading = Loading; |
19 | -})(window, document, window.Message); | |
20 | 21 | \ No newline at end of file |
22 | +})(window, document, window.MessageBox); | |
21 | 23 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,61 @@ |
1 | +(function(window, document) { | |
2 | + | |
3 | + function MessageBox(selectors) { | |
4 | + this.element = document.querySelector(selectors); | |
5 | + this.message = null; | |
6 | + | |
7 | + this.element.classList.add('message-box'); | |
8 | + | |
9 | + var self = this; | |
10 | + var closeElement = this.element.querySelector('.close'); | |
11 | + | |
12 | + if (closeElement) { | |
13 | + closeElement.addEventListener('click', function (e) { | |
14 | + self.hide(); | |
15 | + }); | |
16 | + } | |
17 | + | |
18 | + this.hide(); | |
19 | + } | |
20 | + | |
21 | + MessageBox.LEVELS = ['info', 'warning', 'success', 'default']; | |
22 | + | |
23 | + MessageBox.prototype.hide = function(message) { | |
24 | + if (message !== this.message) return; | |
25 | + | |
26 | + this.message = null; | |
27 | + this.element.classList.remove('active'); | |
28 | + | |
29 | + MessageBox.LEVELS.forEach(function(level) { | |
30 | + this.element.classList.remove(level); | |
31 | + }, this); | |
32 | + }; | |
33 | + | |
34 | + MessageBox.prototype.show = function(level, message, time) { | |
35 | + var self = this; | |
36 | + | |
37 | + level = MessageBox.LEVELS.indexOf(level) == -1 ? 'info' : level; | |
38 | + | |
39 | + this.hide(); | |
40 | + | |
41 | + self.element.classList.add('active'); | |
42 | + self.element.classList.add(level); | |
43 | + self.element.querySelector('.message').innerHTML = message; | |
44 | + | |
45 | + self.message = { | |
46 | + text: message | |
47 | + }; | |
48 | + | |
49 | + var ref = self.message; | |
50 | + if (time) { | |
51 | + setTimeout(function () { | |
52 | + self.hide(ref); | |
53 | + }, time + 1); | |
54 | + } | |
55 | + | |
56 | + return this.message; | |
57 | + }; | |
58 | + | |
59 | + // Expose | |
60 | + window.MessageBox = MessageBox; | |
61 | +})(window, document); | |
0 | 62 | \ No newline at end of file | ... | ... |
player/js/message.js
... | ... | @@ -1,50 +0,0 @@ |
1 | -(function(window, document) { | |
2 | - | |
3 | - function Message(selectors) { | |
4 | - this.element = document.querySelector(selectors); | |
5 | - | |
6 | - this.element.classList.add('message-box'); | |
7 | - | |
8 | - var self = this; | |
9 | - var closeElement = this.element.querySelector('.close'); | |
10 | - | |
11 | - if (closeElement) { | |
12 | - closeElement.addEventListener('click', function (e) { | |
13 | - self.hide(); | |
14 | - }); | |
15 | - } | |
16 | - | |
17 | - this.hide(); | |
18 | - } | |
19 | - | |
20 | - Message.LEVELS = ['info', 'warning', 'success', 'default']; | |
21 | - | |
22 | - Message.prototype.hide = function() { | |
23 | - this.element.classList.remove('active'); | |
24 | - | |
25 | - Message.LEVELS.forEach(function(level) { | |
26 | - this.element.classList.remove(level); | |
27 | - }, this); | |
28 | - }; | |
29 | - | |
30 | - Message.prototype.show = function(level, message, time) { | |
31 | - var self = this; | |
32 | - | |
33 | - level = Message.LEVELS.indexOf(level) == -1 ? 'info' : level; | |
34 | - | |
35 | - this.hide(); | |
36 | - | |
37 | - self.element.classList.add('active'); | |
38 | - self.element.classList.add(level); | |
39 | - self.element.querySelector('.message').innerHTML = message; | |
40 | - | |
41 | - if (time) { | |
42 | - setTimeout(function () { | |
43 | - self.hide(); | |
44 | - }, time + 1); | |
45 | - } | |
46 | - }; | |
47 | - | |
48 | - // Expose | |
49 | - window.Message = Message; | |
50 | -})(window, document); | |
51 | 0 | \ No newline at end of file |
... | ... | @@ -0,0 +1,36 @@ |
1 | +(function() { | |
2 | + var info = document.getElementById('info-screen'); | |
3 | + var main = document.getElementById('info-main'); | |
4 | + var realizadores = document.getElementById('info-realizadores'); | |
5 | + var left = document.querySelector('.arrow-left'); | |
6 | + var right = document.querySelector('.arrow-right'); | |
7 | + var bullets = document.querySelectorAll('.info-bullet'); | |
8 | + var info_button = document.getElementById('info-button'); | |
9 | + | |
10 | + info_button.addEventListener('click', function() { | |
11 | + info.classList.toggle('active'); | |
12 | + this.classList.toggle('active'); | |
13 | + }); | |
14 | + | |
15 | + left.addEventListener('click', function() { | |
16 | + realizadores.classList.remove('active'); | |
17 | + main.classList.add('active'); | |
18 | + | |
19 | + this.classList.remove('active'); | |
20 | + right.classList.add('active'); | |
21 | + | |
22 | + bullets[1].classList.remove('active'); | |
23 | + bullets[0].classList.add('active'); | |
24 | + }); | |
25 | + | |
26 | + right.addEventListener('click', function() { | |
27 | + main.classList.remove('active'); | |
28 | + realizadores.classList.add('active'); | |
29 | + | |
30 | + this.classList.remove('active'); | |
31 | + left.classList.add('active'); | |
32 | + | |
33 | + bullets[0].classList.remove('active'); | |
34 | + bullets[1].classList.add('active'); | |
35 | + }); | |
36 | +})(); | |
0 | 37 | \ No newline at end of file | ... | ... |
player/js/vlibras-plugin.js
1 | -(function(window, document, Loading, Message) { | |
1 | +(function(window, document, Loading, MessageBox) { | |
2 | 2 | function VLibrasPlugin() { |
3 | 3 | this.loaded = false; |
4 | 4 | this.chooser = new qdClient.Chooser(); |
5 | 5 | this.glosa = undefined; |
6 | 6 | this.loading = new Loading('#loading-screen', '#message-box'); |
7 | - this.message = new Message('#message-box'); | |
7 | + this.message = new MessageBox('#message-box'); | |
8 | 8 | this.lastReq = { |
9 | 9 | url: null, |
10 | 10 | millis: null, |
... | ... | @@ -65,9 +65,18 @@ |
65 | 65 | this.sendGlosa(); |
66 | 66 | }; |
67 | 67 | |
68 | + VLibrasPlugin.prototype.errorHandler = function() { | |
69 | + console.log('ErrorHandler!'); | |
70 | + this.message.show('warning', 'Ops! Ocorreu um problema, por favor entre em contato com a gente.'); | |
71 | + }; | |
72 | + | |
68 | 73 | // Expose |
69 | 74 | window.VLibrasPlugin = new VLibrasPlugin(); |
75 | + window.onerror = function() { | |
76 | + this.VLibrasPlugin.errorHandler(); | |
77 | + }; | |
78 | + | |
70 | 79 | window.onLoadPlayer = function() { |
71 | 80 | this.VLibrasPlugin.load(); |
72 | 81 | }; |
73 | -})(window, document, Loading, Message); | |
82 | +})(window, document, Loading, MessageBox); | ... | ... |
player/webgl/connect.js
1 | 1 | // connect to canvas |
2 | 2 | var Module = { |
3 | - TOTAL_MEMORY: 268435456, | |
3 | + TOTAL_MEMORY: 314572800, | |
4 | 4 | filePackagePrefixURL: "Release/", |
5 | 5 | memoryInitializerPrefixURL: "Release/", |
6 | 6 | preRun: [], |
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | canvas: document.getElementById('canvas'), |
17 | 17 | progress: null, |
18 | 18 | setStatus: function(text) { |
19 | - if (this.progress == null) | |
19 | + if (this.progress == null) | |
20 | 20 | { |
21 | 21 | if (typeof UnityProgress != 'function') |
22 | 22 | return; |
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/); |
29 | 29 | if (m) |
30 | 30 | this.progress.SetProgress (parseInt(m[2])/parseInt(m[4])); |
31 | - if (text === "") | |
31 | + if (text === "") | |
32 | 32 | this.progress.Clear() |
33 | 33 | }, |
34 | 34 | totalDependencies: 0, | ... | ... |
player/webgl/load.js
... | ... | @@ -7,7 +7,7 @@ if (!(!Math.fround)) { |
7 | 7 | codeXHR.open('GET', 'Release/WEBGL.js', true); |
8 | 8 | codeXHR.onload = function() { |
9 | 9 | var code = codeXHR.responseText; |
10 | - if (!Math.fround) { | |
10 | + if (!Math.fround) { | |
11 | 11 | try { |
12 | 12 | console.log('optimizing out Math.fround calls'); |
13 | 13 | var m = /var ([^=]+)=global\.Math\.fround;/.exec(code); | ... | ... |
player/webgl/verify-compatibility.js
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | }; |
12 | 12 | |
13 | 13 | if (!checkWebGLCompability()) { |
14 | - VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o WebGL. Porfavor atualizar os drivers de vídeo.'); | |
14 | + VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o WebGL. Por favor, atualize os drivers de vídeo.'); | |
15 | 15 | window.stop(); |
16 | 16 | }; |
17 | 17 | })(); |
18 | 18 | \ No newline at end of file | ... | ... |
player/webgl/window.html
... | ... | @@ -2,7 +2,6 @@ |
2 | 2 | <html lang="en-us"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
6 | 5 | <title>VLibras Plugin</title> |
7 | 6 | <link rel="stylesheet" href="TemplateData/style.css"> |
8 | 7 | <link rel="shortcut icon" href="TemplateData/favicon.png" /> |
... | ... | @@ -14,13 +13,52 @@ |
14 | 13 | <span class="message"></span> |
15 | 14 | </div> |
16 | 15 | |
16 | + <div id="info-button"></div> | |
17 | + <div id="info-screen"> | |
18 | + <div class="arrow arrow-left"> | |
19 | + <img src="TemplateData/ToLeft.png" /> | |
20 | + </div> | |
21 | + <div id="info-tabset"> | |
22 | + <div id="info-main" class="info-tab active"> | |
23 | + <div id="info-logo"> | |
24 | + <img src="TemplateData/logo.png"/> | |
25 | + </div> | |
26 | + <div id="info-meta"> | |
27 | + <p>Versão 2.0.0</p> | |
28 | + <a href="http://vlibrasplayer.lavid.ufpb.br">http://vlibrasplayer.lavid.ufpb.br</a> | |
29 | + </div> | |
30 | + <div id="info-text"> | |
31 | + <p>O VLibras é uma ferramenta aberta de distribuição livre, desenvolvida para melhorar o acesso à informação das pessoas surdas brasileiras.</p> | |
32 | + <p>Qualquer dúvida ou questionamento, envie uma mensagem para o Núcleo de Pesquisa e Extensão LAViD - Centro de Informática - UFPB através do e-mail. contato@lavid.ufpb.br</p> | |
33 | + </div> | |
34 | + </div> | |
35 | + <div id="info-realizadores" class="info-tab"> | |
36 | + <h2>Realizadores</h2> | |
37 | + <img id="gov-logo" class="logo" src="TemplateData/Gov.png" /><br /><br /> | |
38 | + <img class="logo" src="TemplateData/Lavid.png" /> | |
39 | + <img id="ufpb-logo" class="logo" src="TemplateData/UF.png" /> | |
40 | + <img class="logo" src="TemplateData/RNP.png" /><br /><br /> | |
41 | + <img class="logo" src="TemplateData/UFCG.png" /> | |
42 | + <img class="logo" src="TemplateData/LSD.png" /> | |
43 | + </div> | |
44 | + <div id="info-tab-bullets"> | |
45 | + <span class="info-bullet active"></span> | |
46 | + <span class="info-bullet"></span> | |
47 | + </div> | |
48 | + </div> | |
49 | + <div class="arrow arrow-right active"> | |
50 | + <img src="TemplateData/ToRight.png" /> | |
51 | + </div> | |
52 | + </div> | |
53 | + | |
17 | 54 | <canvas class="emscripten" id="canvas"></canvas> |
18 | 55 | |
19 | 56 | <!-- VLibrasPlugin --> |
20 | 57 | <script src="vendors/qdclient/qdclient.js"></script> |
21 | - <script src="js/message.js"></script> | |
58 | + <script src="js/message-box.js"></script> | |
22 | 59 | <script src="js/loading.js"></script> |
23 | 60 | <script src="js/vlibras-plugin.js"></script> |
61 | + <script src="js/scripts.js"></script> | |
24 | 62 | |
25 | 63 | <!-- Verify Compatibilty --> |
26 | 64 | <script src="verify-compatibility.js"></script> | ... | ... |
... | ... | @@ -0,0 +1 @@ |
1 | +var unityObject={javaInstallDone:function(d,a,b){var c=parseInt(d.substring(d.lastIndexOf("_")+1),10);if(!isNaN(c)){setTimeout(function(){UnityObject2.instances[c].javaInstallDoneCallback(d,a,b)},10)}}};var UnityObject2=function(K){var af=[],i=window,aa=document,Y=navigator,F=null,h=[],ai=(document.location.protocol=="https:"),z=ai?"https://ssl-webplayer.unity3d.com/":"http://webplayer.unity3d.com/",L="_unity_triedjava",H=a(L),r="_unity_triedclickonce",u=a(r),ac=false,C=[],P=false,x=null,f=null,Q=null,l=[],V=null,q=[],X=false,W="installed",M="missing",b="broken",w="unsupported",D="ready",A="start",G="error",ab="first",B="java",s="clickonce",N=false,T=null,y={pluginName:"Unity Player",pluginMimeType:"application/vnd.unity",baseDownloadUrl:z+"download_webplayer-3.x/",fullInstall:false,autoInstall:false,enableJava:true,enableJVMPreloading:false,enableClickOnce:true,enableUnityAnalytics:false,enableGoogleAnalytics:true,enableBrowserDeprecatedWarning:true,params:{},attributes:{},referrer:null,debugLevel:0,pluginVersionChecker:{container:jQuery("body")[0],hide:true,id:"version-checker"}};y=jQuery.extend(true,y,K);if(y.referrer===""){y.referrer=null}if(ai){y.enableUnityAnalytics=false}function a(aj){var ak=new RegExp(escape(aj)+"=([^;]+)");if(ak.test(aa.cookie+";")){ak.exec(aa.cookie+";");return RegExp.$1}return false}function e(aj,ak){document.cookie=escape(aj)+"="+escape(ak)+"; path=/"}function O(ap){var aq=0,al,ao,am,aj,ak;if(ap){var an=ap.toLowerCase().match(/^(\d+)(?:\.(\d+)(?:\.(\d+)([dabfr])?(\d+)?)?)?$/);if(an&&an[1]){al=an[1];ao=an[2]?an[2]:0;am=an[3]?an[3]:0;aj=an[4]?an[4]:"r";ak=an[5]?an[5]:0;aq|=((al/10)%10)<<28;aq|=(al%10)<<24;aq|=(ao%10)<<20;aq|=(am%10)<<16;aq|={d:2<<12,a:4<<12,b:6<<12,f:8<<12,r:8<<12}[aj];aq|=((ak/100)%10)<<8;aq|=((ak/10)%10)<<4;aq|=(ak%10)}}return aq}function ah(an,aj){var al=y.pluginVersionChecker.container;var ak=aa.createElement("object");var am=0;if(al&&ak){ak.setAttribute("type",y.pluginMimeType);ak.setAttribute("id",y.pluginVersionChecker.id);if(y.pluginVersionChecker.hide){ak.style.visibility="hidden"}al.appendChild(ak);(function(){if(typeof ak.GetPluginVersion==="undefined"){setTimeout(arguments.callee,100)}else{var ao={};if(aj){for(am=0;am<aj.length;++am){ao[aj[am]]=ak.GetUnityVersion(aj[am])}}ao.plugin=ak.GetPluginVersion();al.removeChild(ak);an(ao)}})()}else{an(null)}}function c(){var aj="";if(t.x64){aj=y.fullInstall?"UnityWebPlayerFull64.exe":"UnityWebPlayer64.exe"}else{aj=y.fullInstall?"UnityWebPlayerFull.exe":"UnityWebPlayer.exe"}if(y.referrer!==null){aj+="?referrer="+y.referrer}return aj}function ae(){var aj="UnityPlayer.plugin.zip";if(y.referrer!=null){aj+="?referrer="+y.referrer}return aj}function m(){return y.baseDownloadUrl+(t.win?c():ae())}function E(al,ak,am,aj){if(al===M){N=true}if(jQuery.inArray(al,q)===-1){if(N){j.send(al,ak,am,aj)}q.push(al)}V=al}var t=function(){var al=Y.userAgent,an=Y.platform;var ap=/chrome/i.test(al);var ao=false;if(/msie/i.test(al)){ao=parseFloat(al.replace(/^.*msie ([0-9]+(\.[0-9]+)?).*$/i,"$1"))}else{if(/Trident/i.test(al)){ao=parseFloat(al.replace(/^.*rv:([0-9]+(\.[0-9]+)?).*$/i,"$1"))}}var aq={w3:typeof aa.getElementById!="undefined"&&typeof aa.getElementsByTagName!="undefined"&&typeof aa.createElement!="undefined",win:an?/win/i.test(an):/win/i.test(al),mac:an?/mac/i.test(an):/mac/i.test(al),ie:ao,ff:/firefox/i.test(al),op:/opera/i.test(al),ch:ap,ch_v:/chrome/i.test(al)?parseFloat(al.replace(/^.*chrome\/(\d+(\.\d+)?).*$/i,"$1")):false,sf:/safari/i.test(al)&&!ap,wk:/webkit/i.test(al)?parseFloat(al.replace(/^.*webkit\/(\d+(\.\d+)?).*$/i,"$1")):false,x64:/win64/i.test(al)&&/x64/i.test(al),moz:/mozilla/i.test(al)?parseFloat(al.replace(/^.*mozilla\/([0-9]+(\.[0-9]+)?).*$/i,"$1")):0,mobile:/ipad/i.test(an)||/iphone/i.test(an)||/ipod/i.test(an)||/android/i.test(al)||/windows phone/i.test(al)};aq.clientBrand=aq.ch?"ch":aq.ff?"ff":aq.sf?"sf":aq.ie?"ie":aq.op?"op":"??";aq.clientPlatform=aq.win?"win":aq.mac?"mac":"???";var ar=aa.getElementsByTagName("script");for(var aj=0;aj<ar.length;++aj){var am=ar[aj].src.match(/^(.*)3\.0\/uo\/UnityObject2\.js$/i);if(am){y.baseDownloadUrl=am[1];break}}function ak(av,au){for(var aw=0;aw<Math.max(av.length,au.length);++aw){var at=(aw<av.length)&&av[aw]?new Number(av[aw]):0;var ax=(aw<au.length)&&au[aw]?new Number(au[aw]):0;if(at<ax){return -1}if(at>ax){return 1}}return 0}aq.java=function(){if(Y.javaEnabled()){var aw=(aq.win&&aq.ff);var az=false;if(aw||az){if(typeof Y.mimeTypes!="undefined"){var ay=aw?[1,6,0,12]:[1,4,2,0];for(var av=0;av<Y.mimeTypes.length;++av){if(Y.mimeTypes[av].enabledPlugin){var at=Y.mimeTypes[av].type.match(/^application\/x-java-applet;(?:jpi-)?version=(\d+)(?:\.(\d+)(?:\.(\d+)(?:_(\d+))?)?)?$/);if(at!=null){if(ak(ay,at.slice(1))<=0){return true}}}}}}else{if(aq.win&&aq.ie){if(typeof ActiveXObject!="undefined"){function au(aA){try{return new ActiveXObject("JavaWebStart.isInstalled."+aA+".0")!=null}catch(aB){return false}}function ax(aA){try{return new ActiveXObject("JavaPlugin.160_"+aA)!=null}catch(aB){return false}}if(au("1.7.0")){return true}if(aq.ie>=8){if(au("1.6.0")){for(var av=12;av<=50;++av){if(ax(av)){if(aq.ie==9&&aq.moz==5&&av<24){continue}else{return true}}}return false}}else{return au("1.6.0")||au("1.5.0")||au("1.4.2")}}}}}return false}();aq.co=function(){if(aq.win&&aq.ie){var at=al.match(/(\.NET CLR [0-9.]+)|(\.NET[0-9.]+)/g);if(at!=null){var ax=[3,5,0];for(var aw=0;aw<at.length;++aw){var au=at[aw].match(/[0-9.]{2,}/g)[0].split(".");if(ak(ax,au)<=0){return true}}}}return false}();return aq}();var j=function(){var aj=function(){var ar=new Date();var aq=Date.UTC(ar.getUTCFullYear(),ar.getUTCMonth(),ar.getUTCDay(),ar.getUTCHours(),ar.getUTCMinutes(),ar.getUTCSeconds(),ar.getUTCMilliseconds());return aq.toString(16)+ap().toString(16)}();var al=0;var ak=window._gaq=(window._gaq||[]);an();function ap(){return Math.floor(Math.random()*2147483647)}function an(){var aw=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var at=aa.getElementsByTagName("script");var ax=false;for(var av=0;av<at.length;++av){if(at[av].src&&at[av].src.toLowerCase()==aw.toLowerCase()){ax=true;break}}if(!ax){var au=aa.createElement("script");au.type="text/javascript";au.async=true;au.src=aw;var ar=document.getElementsByTagName("script")[0];ar.parentNode.insertBefore(au,ar)}var aq=(y.debugLevel===0)?"UA-16068464-16":"UA-16068464-17";ak.push(["unity._setDomainName","none"]);ak.push(["unity._setAllowLinker",true]);ak.push(["unity._setReferrerOverride"," "+this.location.toString()]);ak.push(["unity._setAccount",aq]);ak.push(["unity._setCustomVar",1,"Revision","e7947df39b5c",2])}function am(av,at,aw,ar){if(!y.enableUnityAnalytics){if(ar){ar()}return}var aq="http://unityanalyticscapture.appspot.com/event?u="+encodeURIComponent(aj)+"&s="+encodeURIComponent(al)+"&e="+encodeURIComponent(av);aq+="&v="+encodeURIComponent("e7947df39b5c");if(y.referrer!==null){aq+="?r="+y.referrer}if(at){aq+="&t="+encodeURIComponent(at)}if(aw){aq+="&d="+encodeURIComponent(aw)}var au=new Image();if(ar){au.onload=au.onerror=ar}au.src=aq}function ao(at,aq,au,aB){if(!y.enableGoogleAnalytics){if(aB){aB()}return}var ay="/webplayer/install/"+at;var az="?";if(aq){ay+=az+"t="+encodeURIComponent(aq);az="&"}if(au){ay+=az+"d="+encodeURIComponent(au);az="&"}if(aB){ak.push(function(){setTimeout(aB,1000)})}var aw=y.src;if(aw.length>40){aw=aw.replace("http://","");var ar=aw.split("/");var aA=ar.shift();var av=ar.pop();aw=aA+"/../"+av;while(aw.length<40&&ar.length>0){var ax=ar.pop();if(aw.length+ax.length+5<40){av=ax+"/"+av}else{av="../"+av}aw=aA+"/../"+av}}ak.push(["unity._setCustomVar",2,"GameURL",aw,3]);ak.push(["unity._setCustomVar",1,"UnityObjectVersion","2",3]);if(aq){ak.push(["unity._setCustomVar",3,"installMethod",aq,3])}ak.push(["unity._trackPageview",ay])}return{send:function(au,at,aw,aq){if(y.enableUnityAnalytics||y.enableGoogleAnalytics){n("Analytics SEND",au,at,aw,aq)}++al;var av=2;var ar=function(){if(0==--av){x=null;window.location=aq}};if(aw===null||aw===undefined){aw=""}am(au,at,aw,aq?ar:null);ao(au,at,aw,aq?ar:null)}}}();function J(al,am,an){var aj,aq,ao,ap,ak;if(t.win&&t.ie){aq="";for(aj in al){aq+=" "+aj+'="'+al[aj]+'"'}ao="";for(aj in am){ao+='<param name="'+aj+'" value="'+am[aj]+'" />'}an.outerHTML="<object"+aq+">"+ao+"</object>"}else{ap=aa.createElement("object");for(aj in al){ap.setAttribute(aj,al[aj])}for(aj in am){ak=aa.createElement("param");ak.name=aj;ak.value=am[aj];ap.appendChild(ak)}an.parentNode.replaceChild(ap,an)}}function o(aj){if(typeof aj=="undefined"){return false}if(!aj.complete){return false}if(typeof aj.naturalWidth!="undefined"&&aj.naturalWidth==0){return false}return true}function I(am){var ak=false;for(var al=0;al<l.length;al++){if(!l[al]){continue}var aj=aa.images[l[al]];if(!o(aj)){ak=true}else{l[al]=null}}if(ak){setTimeout(arguments.callee,100)}else{setTimeout(function(){d(am)},100)}}function d(am){var ao=aa.getElementById(am);if(!ao){ao=aa.createElement("div");var aj=aa.body.lastChild;aa.body.insertBefore(ao,aj.nextSibling)}var an=y.baseDownloadUrl+"3.0/jws/";var ak={id:am,type:"application/x-java-applet",code:"JVMPreloader",width:1,height:1,name:"JVM Preloader"};var al={context:am,codebase:an,classloader_cache:false,scriptable:true,mayscript:true};J(ak,al,ao);jQuery("#"+am).show()}function U(ak){H=true;e(L,H);var am=aa.getElementById(ak);var ao=ak+"_applet_"+F;C[ao]={attributes:y.attributes,params:y.params,callback:y.callback,broken:y.broken};var aq=C[ao];var an={id:ao,type:"application/x-java-applet",archive:y.baseDownloadUrl+"3.0/jws/UnityWebPlayer.jar",code:"UnityWebPlayer",width:1,height:1,name:"Unity Web Player"};if(t.win&&t.ff){an.style="visibility: hidden;"}var ap={context:ao,jnlp_href:y.baseDownloadUrl+"3.0/jws/UnityWebPlayer.jnlp",classloader_cache:false,installer:m(),image:z+"installation/unitylogo.png",centerimage:true,boxborder:false,scriptable:true,mayscript:true};for(var aj in aq.params){if(aj=="src"){continue}if(aq.params[aj]!=Object.prototype[aj]){ap[aj]=aq.params[aj];if(aj.toLowerCase()=="logoimage"){ap.image=aq.params[aj]}else{if(aj.toLowerCase()=="backgroundcolor"){ap.boxbgcolor="#"+aq.params[aj]}else{if(aj.toLowerCase()=="bordercolor"){ap.boxborder=true}else{if(aj.toLowerCase()=="textcolor"){ap.boxfgcolor="#"+aq.params[aj]}}}}}}var al=aa.createElement("div");am.appendChild(al);J(an,ap,al);jQuery("#"+ak).show()}function Z(aj){setTimeout(function(){var ak=aa.getElementById(aj);if(ak){ak.parentNode.removeChild(ak)}},0)}function g(an){var ao=C[an],am=aa.getElementById(an),al;if(!am){return}am.width=ao.attributes.width||600;am.height=ao.attributes.height||450;var ak=am.parentNode;var aj=ak.childNodes;for(var ap=0;ap<aj.length;ap++){al=aj[ap];if(al.nodeType==1&&al!=am){ak.removeChild(al)}}}function k(al,aj,ak){n("_javaInstallDoneCallback",al,aj,ak);if(!aj){E(G,B,ak)}}function ag(){af.push(arguments);if(y.debugLevel>0&&window.console&&window.console.log){console.log(Array.prototype.slice.call(arguments))}}function n(){af.push(arguments);if(y.debugLevel>1&&window.console&&window.console.log){console.log(Array.prototype.slice.call(arguments))}}function p(aj){if(/^[-+]?[0-9]+$/.test(aj)){aj+="px"}return aj}function v(aw,ak){var au=this;var am=M;var an;Y.plugins.refresh();if(t.clientBrand==="??"||t.clientPlatform==="???"||t.mobile){am=w}else{if(t.op&&t.mac){am=w;an="OPERA-MAC"}else{if(typeof Y.plugins!="undefined"&&Y.plugins[y.pluginName]&&typeof Y.mimeTypes!="undefined"&&Y.mimeTypes[y.pluginMimeType]&&Y.mimeTypes[y.pluginMimeType].enabledPlugin){am=W;if(t.sf&&/Mac OS X 10_6/.test(Y.appVersion)){ah(function(ax){if(!ax||!ax.plugin){am=b;an="OSX10.6-SFx64"}aw(am,Q,an,ax)},ak);return}else{if(t.mac&&t.ch){ah(function(ax){if(ax&&(O(ax.plugin)<=O("2.6.1f3"))){am=b;an="OSX-CH-U<=2.6.1f3"}aw(am,Q,an,ax)},ak);return}else{if(ak){ah(function(ax){aw(am,Q,an,ax)},ak);return}}}}else{if(t.ie){var al=false;try{if(ActiveXObject.prototype!=null){al=true}}catch(ap){}if(!al){am=w;an="ActiveXFailed"}else{am=M;try{var av=new ActiveXObject("UnityWebPlayer.UnityWebPlayer.1");var aj=av.GetPluginVersion();if(ak){var aq={};for(var at=0;at<ak.length;++at){aq[ak[at]]=av.GetUnityVersion(ak[at])}aq.plugin=aj}am=W;if(aj=="2.5.0f5"){var ar=/Windows NT \d+\.\d+/.exec(Y.userAgent);if(ar&&ar.length>0){var ao=parseFloat(ar[0].split(" ")[2]);if(ao>=6){am=b;an="WIN-U2.5.0f5"}}}}catch(ap){}}}}}}aw(am,Q,an,aq)}function R(ak,aj){v(function(am,an,ao,al){ak(am,al)},aj)}function ad(ak,aj){v(function(am,an,ao,al){E(am,an,ao);ak(am,al)},aj)}var S={getLogHistory:function(){return af},getConfig:function(){return y},getPlatformInfo:function(){return t},initPlugin:function(aj,al){y.targetEl=aj;y.src=al;n("ua:",t);var ak=this;ad(function(an,am){ak.handlePluginStatus(an,am)})},detectUnity:function(al,aj){var ak=this;R(function(an,am){al.call(ak,an,am)},aj)},handlePluginStatus:function(al,aj){var ak=y.targetEl;var an=jQuery(ak);switch(al){case W:this.notifyProgress(an);this.embedPlugin(an,y.callback);break;case M:this.notifyProgress(an);var am=this;var ao=(y.debugLevel===0)?1000:8000;setTimeout(function(){y.targetEl=ak;am.detectUnity(am.handlePluginStatus)},ao);break;case b:this.notifyProgress(an);break;case w:this.notifyProgress(an);break}},getPluginURL:function(){var aj="http://unity3d.com/webplayer/";if(t.win){aj=y.baseDownloadUrl+c()}else{if(Y.platform=="MacIntel"){aj=y.baseDownloadUrl+(y.fullInstall?"webplayer-i386.dmg":"webplayer-mini.dmg");if(y.referrer!==null){aj+="?referrer="+y.referrer}}else{if(Y.platform=="MacPPC"){aj=y.baseDownloadUrl+(y.fullInstall?"webplayer-ppc.dmg":"webplayer-mini.dmg");if(y.referrer!==null){aj+="?referrer="+y.referrer}}}}return aj},getClickOnceURL:function(){return y.baseDownloadUrl+"3.0/co/UnityWebPlayer.application?installer="+encodeURIComponent(y.baseDownloadUrl+c())},embedPlugin:function(am,aw){am=jQuery(am).empty();var au=y.src;var ak=y.width||"100%";var ap=y.height||"100%";var av=this;if(t.win&&t.ie){var al="";for(var aj in y.attributes){if(y.attributes[aj]!=Object.prototype[aj]){if(aj.toLowerCase()=="styleclass"){al+=' class="'+y.attributes[aj]+'"'}else{if(aj.toLowerCase()!="classid"){al+=" "+aj+'="'+y.attributes[aj]+'"'}}}}var ao="";ao+='<param name="src" value="'+au+'" />';ao+='<param name="firstFrameCallback" value="UnityObject2.instances['+F+'].firstFrameCallback();" />';for(var aj in y.params){if(y.params[aj]!=Object.prototype[aj]){if(aj.toLowerCase()!="classid"){ao+='<param name="'+aj+'" value="'+y.params[aj]+'" />'}}}var ar='<object classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" style="display: block; width: '+p(ak)+"; height: "+p(ap)+';"'+al+">"+ao+"</object>";var aq=jQuery(ar);am.append(aq);h.push(am.attr("id"));T=aq[0]}else{var an=jQuery("<embed/>").attr({src:au,type:y.pluginMimeType,width:ak,height:ap,firstFrameCallback:"UnityObject2.instances["+F+"].firstFrameCallback();"}).attr(y.attributes).attr(y.params).css({display:"block",width:p(ak),height:p(ap)}).appendTo(am);T=an[0]}if(!t.sf||!t.mac){setTimeout(function(){T.focus()},100)}if(aw){aw()}},getBestInstallMethod:function(){var aj="Manual";if(t.x64){return aj}if(y.enableJava&&t.java&&H===false){aj="JavaInstall"}else{if(y.enableClickOnce&&t.co&&u===false){aj="ClickOnceIE"}}return aj},installPlugin:function(ak){if(ak==null||ak==undefined){ak=this.getBestInstallMethod()}var aj=null;switch(ak){case"JavaInstall":this.doJavaInstall(y.targetEl.id);break;case"ClickOnceIE":u=true;e(r,u);var al=jQuery("<iframe src='"+this.getClickOnceURL()+"' style='display:none;' />");jQuery(y.targetEl).append(al);break;default:case"Manual":var al=jQuery("<iframe src='"+this.getPluginURL()+"' style='display:none;' />");jQuery(y.targetEl).append(al);break}Q=ak;j.send(A,ak,null,null)},trigger:function(ak,aj){if(aj){n('trigger("'+ak+'")',aj)}else{n('trigger("'+ak+'")')}jQuery(document).trigger(ak,aj)},notifyProgress:function(am){if(typeof ac!=="undefined"&&typeof ac==="function"){var an={ua:t,pluginStatus:V,bestMethod:null,lastType:Q,targetEl:y.targetEl,unityObj:this};if(V===M){var ao=t.ch&&(t.ch_v>41);if(ao&&y.enableBrowserDeprecatedWarning){an.pluginStatus=w;var al=aa.getElementById("ChromeMissingUnityPlayer");if(!al){var aj=$("<div id='ChromeMissingUnityPlayer'>");aj.css("width","100%").css("height","200px").css("background","#f9f8e6").css("background","rgba(231,228,157,.25)").css("border-color","#fcfbf1").css("border-color","rgba(231,228,157,.15)").css("border-style","solid").css("border-width","5x").css("color","#595959").css("color","rgba(0,0,0,.65)").css("text-align","left").css("padding","10px").appendTo(am);var ak="";if(t.win){ak="<a href='http://windows.microsoft.com/en-us/internet-explorer/'>Internet Explorer</a>, <a href='http://www.mozilla.org/firefox'>Firefox</a> or <a href='http://www.opera.com/'>Opera</a>"}else{ak="<a href='http://www.mozilla.org/firefox'>Firefox</a>, <a href='https://www.apple.com/safari/'>Safari</a>"}var ap="<img src='https://files.unity3d.com/UnityObject2/resources/other_browser.jpg' style='float: left; margin-right: 15px;' /><div style='overflow:hidden;'><div style='height:202px; display:inline-block; vertical-align:middle;'></div><div style='display:inline-block;'><div style='display:inline-block; vertical-align:middle;'><span style='font-weight:bold; font-size: 1.1em;'>Sorry, Chrome can't run this app</span><p>You are using a version of Chrome that does not currently support the Unity Web Player plugin needed to run this app.<br/>We recommend using another browser, such as "+ak+'.<br/>Alternatively, you can enable NPAPI plugins at chrome://flags/#enable-npapi (requires browser relaunch).</p><p>If you enabled the NPAPI flag and the plugin still does not work for you, try <a href="'+this.getPluginURL()+'">manual install</a>.</p></div></div></div>';aj.html(ap)}}else{an.bestMethod=this.getBestInstallMethod()}}if(f!==V){f=V;ac(an)}}},observeProgress:function(aj){ac=aj},firstFrameCallback:function(){n("*** firstFrameCallback ("+F+") ***");V=ab;this.notifyProgress();if(N===true){j.send(V,Q)}},setPluginStatus:function(al,ak,am,aj){E(al,ak,am,aj)},doJavaInstall:function(aj){U(aj)},jvmPreloaded:function(aj){Z(aj)},appletStarted:function(aj){g(aj)},javaInstallDoneCallback:function(al,aj,ak){k(al,aj,ak)},getUnity:function(){return T}};F=UnityObject2.instances.length;UnityObject2.instances.push(S);return S};UnityObject2.instances=[]; | |
0 | 2 | \ No newline at end of file | ... | ... |
player/webplayer/WEBPLAYER.unity3d
No preview for this file type
player/webplayer/player.js
... | ... | @@ -1,15 +0,0 @@ |
1 | -(function(window, UnityObject2) { | |
2 | - var params = { | |
3 | - logoimage: 'TemplateData/progresslogo.png', | |
4 | - progressbarimage: 'TemplateData/fullbar.png', | |
5 | - progressframeimage: 'TemplateData/loadingbar.png' | |
6 | - }; | |
7 | - | |
8 | - var Player = new UnityObject2({ params: params }); | |
9 | - Player.initPlugin(document.getElementById('player'), 'WEBPLAYER.unity3d'); | |
10 | - | |
11 | - window.SendMessage = function(object, method, params) { | |
12 | - Player.getUnity().SendMessage(object, method, params); | |
13 | - }; | |
14 | - | |
15 | -})(window, UnityObject2); | |
16 | 0 | \ No newline at end of file |
... | ... | @@ -0,0 +1,17 @@ |
1 | +Player.observeProgress(function (progress) { | |
2 | + switch(progress.pluginStatus) { | |
3 | + case "unsupported": | |
4 | + VLibrasPlugin.showMessage('warning', 'O seu computador não suporta o Unity WebPlayer. Porfavor verificar drivers de vídeo.'); | |
5 | + return; | |
6 | + case "broken": | |
7 | + VLibrasPlugin.showMessage('warning', 'Você precisa reiniciar após a instalação do Unity WebPlayer.'); | |
8 | + return; | |
9 | + case "missing": | |
10 | + var url = 'http://unity3d.com/webplayer/'; | |
11 | + VLibrasPlugin.showMessage('warning', 'Instale o Unity WebPlayer. <a href="'+ url +'"" target="_blank">Clique aqui</a> para instalar.'); | |
12 | + return; | |
13 | + } | |
14 | + | |
15 | + var event = new CustomEvent('player:verified', { detail: 'installed' }); | |
16 | + document.dispatchEvent(event); | |
17 | +}); | |
0 | 18 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,14 @@ |
1 | +(function(window, UnityObject2) { | |
2 | + var params = { | |
3 | + logoimage: 'TemplateData/progresslogo.png', | |
4 | + progressbarimage: 'TemplateData/fullbar.png', | |
5 | + progressframeimage: 'TemplateData/loadingbar.png' | |
6 | + }; | |
7 | + | |
8 | + window.Player = new UnityObject2({ params: params }); | |
9 | + window.Player.initPlugin(document.getElementById('canvas'), 'webplayer.unity3d'); | |
10 | + | |
11 | + window.SendMessage = function(object, method, params) { | |
12 | + this.Player.getUnity().SendMessage(object, method, params); | |
13 | + }; | |
14 | +})(window, UnityObject2); | |
0 | 15 | \ No newline at end of file | ... | ... |
player/webplayer/window.html
... | ... | @@ -3,56 +3,71 @@ |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8"> |
5 | 5 | <title>VLibras Plugin</title> |
6 | - | |
6 | + <link rel="stylesheet" href="TemplateData/style.css"> | |
7 | 7 | <link rel="shortcut icon" href="TemplateData/favicon.png" /> |
8 | - <style type="text/css"> | |
9 | - html, body, #player { | |
10 | - width: 100%; | |
11 | - height: 100%; | |
12 | - margin: 0; | |
13 | - overflow: hidden; | |
14 | - } | |
15 | - | |
16 | - #loading-screen span { | |
17 | - position: absolute; | |
18 | - top: 5px; | |
19 | - right: 40px; | |
20 | - padding: 15px 10px; | |
21 | - background: #000; | |
22 | - color: #FFF; | |
23 | - | |
24 | - font-size: 1.2em; | |
25 | - -webkit-border-radius: 20px; | |
26 | - -moz-border-radius: 20px; | |
27 | - border-radius: 20px; | |
28 | - } | |
29 | - | |
30 | - #loading-screen { | |
31 | - position: absolute; | |
32 | - top: 0; | |
33 | - left: 0; | |
34 | - display: none; | |
35 | - width: 100%; | |
36 | - height: 100%; | |
37 | - z-index: 9999; | |
38 | - } | |
39 | - </style> | |
40 | 8 | </head> |
41 | - <body> | |
42 | - <div id="loading-screen"><span>Carregando...</span></div> | |
43 | - <div id="player"> | |
44 | - <div class="missing"> | |
45 | - <a href="http://unity3d.com/webplayer/" title="Unity Web Player. Install now!"> | |
46 | - <img alt="Unity Web Player. Install now!" src="http://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" /> | |
47 | - </a> | |
9 | + <body class="template"> | |
10 | + <div id="loading-screen"></div> | |
11 | + <div id="message-box"> | |
12 | + <span class="message"></span> | |
13 | + </div> | |
14 | + | |
15 | + <div id="info-button"></div> | |
16 | + <div id="info-screen"> | |
17 | + <div class="arrow arrow-left"> | |
18 | + <img src="TemplateData/ToLeft.png" /> | |
19 | + </div> | |
20 | + <div id="info-tabset"> | |
21 | + <div id="info-main" class="info-tab active"> | |
22 | + <div id="info-logo"> | |
23 | + <img src="TemplateData/logo.png"/> | |
24 | + </div> | |
25 | + <div id="info-meta"> | |
26 | + <p>Versão 2.0.0</p> | |
27 | + <a href="http://vlibrasplayer.lavid.ufpb.br">http://vlibrasplayer.lavid.ufpb.br</a> | |
28 | + </div> | |
29 | + <div id="info-text"> | |
30 | + <p>O VLibras é uma ferramenta aberta de distribuição livre, desenvolvida para melhorar o acesso à informação das pessoas surdas brasileiras.</p> | |
31 | + <p>Qualquer dúvida ou questionamento, envie uma mensagem para o Núcleo de Pesquisa e Extensão LAViD - Centro de Informática - UFPB através do e-mail. contato@lavid.ufpb.br</p> | |
32 | + </div> | |
33 | + </div> | |
34 | + <div id="info-realizadores" class="info-tab"> | |
35 | + <h2>Realizadores</h2> | |
36 | + <img id="gov-logo" class="logo" src="TemplateData/Gov.png" /><br /><br /> | |
37 | + <img class="logo" src="TemplateData/Lavid.png" /> | |
38 | + <img id="ufpb-logo" class="logo" src="TemplateData/UF.png" /> | |
39 | + <img class="logo" src="TemplateData/RNP.png" /><br /><br /> | |
40 | + <img class="logo" src="TemplateData/UFCG.png" /> | |
41 | + <img class="logo" src="TemplateData/LSD.png" /> | |
42 | + </div> | |
43 | + <div id="info-tab-bullets"> | |
44 | + <span class="info-bullet active"></span> | |
45 | + <span class="info-bullet"></span> | |
46 | + </div> | |
47 | + </div> | |
48 | + <div class="arrow arrow-right active"> | |
49 | + <img src="TemplateData/ToRight.png" /> | |
48 | 50 | </div> |
49 | 51 | </div> |
50 | 52 | |
53 | + <div id="canvas"></div> | |
54 | + | |
55 | + <!-- Unity --> | |
56 | + <script src="UnityObject2.js"></script> | |
51 | 57 | <script src="vendors/jquery/dist/jquery.min.js"></script> |
52 | - <script src="http://webplayer.unity3d.com/download_webplayer-3.x/3.0/uo/UnityObject2.js"></script> | |
58 | + <script src="webplayer.js"></script> | |
59 | + | |
60 | + <!-- Verify Compatibilty --> | |
61 | + <script src="verify-compatibility.js"></script> | |
62 | + | |
63 | + <!-- VLibrasPlugin --> | |
53 | 64 | <script src="vendors/qdclient/qdclient.js"></script> |
54 | - <script src="player.js"></script> | |
55 | - | |
56 | - <script src="../main.js"></script> | |
65 | + <script src="js/message-box.js"></script> | |
66 | + <script src="js/loading.js"></script> | |
67 | + <script src="js/vlibras-plugin.js"></script> | |
68 | + <script src="js/scripts.js"></script> | |
69 | + | |
70 | + <!-- Browser Middleware --> | |
71 | + <script src="../middleware.js"></script> | |
57 | 72 | </body> |
58 | 73 | </html> |
59 | 74 | \ No newline at end of file | ... | ... |
safari.safariextension/Info.plist
... | ... | @@ -13,9 +13,9 @@ |
13 | 13 | <key>CFBundleInfoDictionaryVersion</key> |
14 | 14 | <string>6.0</string> |
15 | 15 | <key>CFBundleShortVersionString</key> |
16 | - <string>0.1</string> | |
16 | + <string>0.2.0</string> | |
17 | 17 | <key>CFBundleVersion</key> |
18 | - <string>1</string> | |
18 | + <string>2</string> | |
19 | 19 | <key>Chrome</key> |
20 | 20 | <dict> |
21 | 21 | <key>Database Quota</key> | ... | ... |
safari.safariextension/app/main.js
... | ... | @@ -1,56 +0,0 @@ |
1 | -window.resizeTo(535, 500); | |
2 | - | |
3 | -var app = { | |
4 | - chooser: null, | |
5 | - glosa: undefined, | |
6 | - loaded: false, | |
7 | - lastReq: { | |
8 | - url: null, | |
9 | - millis: null, | |
10 | - response: null | |
11 | - } | |
12 | -}; | |
13 | - | |
14 | -function onLoadPlayer() { | |
15 | - if ( app.glosa !== undefined ) | |
16 | - SendMessage('PlayerManager', 'catchGlosa', app.glosa); | |
17 | - | |
18 | - app.loaded = true; | |
19 | -} | |
20 | - | |
21 | -safari.self.addEventListener('message', function (request) { | |
22 | - if (request.name !== 'plugin:selectedText' && request.message === undefined) return; | |
23 | - var selectedText = encodeURI(request.message); | |
24 | - | |
25 | - app.chooser = app.chooser || new qdClient.Chooser(); | |
26 | - | |
27 | - document.getElementById('loading-screen').style.display = 'block'; | |
28 | - app.chooser.choose( | |
29 | - app.lastReq.url, | |
30 | - app.lastReq.millis, | |
31 | - app.lastReq.response, | |
32 | - function (url) { | |
33 | - var start = new Date().getTime(); | |
34 | - | |
35 | - if (!url) { | |
36 | - document.getElementById('loading-screen').style.display = 'none'; | |
37 | - return; | |
38 | - } | |
39 | - | |
40 | - qdClient.request(url + '?texto=' + selectedText, "GET", {}, | |
41 | - function(status, response) { | |
42 | - app.lastReq.response = status === 200 ? status : -1; | |
43 | - app.lastReq.millis = (new Date().getTime() - start); | |
44 | - app.lastReq.url = url; | |
45 | - | |
46 | - document.getElementById('loading-screen').style.display = 'none'; | |
47 | - if (status !== 200) return; | |
48 | - | |
49 | - app.glosa = response; | |
50 | - if (app.loaded == true) | |
51 | - SendMessage('PlayerManager', 'catchGlosa', app.glosa); | |
52 | - }); | |
53 | - }); | |
54 | -}); | |
55 | - | |
56 | -safari.self.tab.dispatchMessage('page:ready', true); |
... | ... | @@ -0,0 +1,11 @@ |
1 | +window.resizeTo(400, 500); | |
2 | + | |
3 | +document.addEventListener('player:verified', function() { | |
4 | + safari.self.addEventListener('message', function (request) { | |
5 | + if (request.name !== 'plugin:selectedText' && request.message === undefined) return; | |
6 | + | |
7 | + VLibrasPlugin.translate(encodeURI(request.message)); | |
8 | + }); | |
9 | + | |
10 | + safari.self.tab.dispatchMessage('page:ready', true); | |
11 | +}); | |
0 | 12 | \ No newline at end of file | ... | ... |