diff options
Diffstat (limited to 'js/document/views/design.js')
-rwxr-xr-x | js/document/views/design.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/js/document/views/design.js b/js/document/views/design.js index 765099e6..1a8f4986 100755 --- a/js/document/views/design.js +++ b/js/document/views/design.js | |||
@@ -289,6 +289,37 @@ exports.DesignDocumentView = Montage.create(BaseDocumentView, { | |||
289 | value: function(x, y) { | 289 | value: function(x, y) { |
290 | return this.iframe.contentWindow.getElement(x,y); | 290 | return this.iframe.contentWindow.getElement(x,y); |
291 | } | 291 | } |
292 | }, | ||
293 | //////////////////////////////////////////////////////////////////// | ||
294 | // | ||
295 | pauseVideos:{ | ||
296 | value:function(){ | ||
297 | var i, videos = this.document.getElementsByTagName("video"); | ||
298 | for(i = 0; i < videos.length; i++){ | ||
299 | if(!videos[i].paused) videos[i].pause(); | ||
300 | } | ||
301 | } | ||
302 | }, | ||
303 | //////////////////////////////////////////////////////////////////// | ||
304 | // | ||
305 | stopVideos:{ | ||
306 | value:function(){ | ||
307 | var i, videos = this.document.getElementsByTagName("video"); | ||
308 | for(i = 0; i < videos.length; i++){ | ||
309 | videos[i].src = ""; | ||
310 | } | ||
311 | } | ||
312 | }, | ||
313 | //////////////////////////////////////////////////////////////////// | ||
314 | // | ||
315 | pauseAndStopVideos:{ | ||
316 | value:function(){ | ||
317 | var i, videos = this.document.getElementsByTagName("video"); | ||
318 | for(i = 0; i < videos.length; i++){ | ||
319 | if(!videos[i].paused) videos[i].pause(); | ||
320 | videos[i].src = ""; | ||
321 | } | ||
322 | } | ||
292 | } | 323 | } |
293 | //////////////////////////////////////////////////////////////////// | 324 | //////////////////////////////////////////////////////////////////// |
294 | //////////////////////////////////////////////////////////////////// | 325 | //////////////////////////////////////////////////////////////////// |