aboutsummaryrefslogtreecommitdiff
path: root/js/document/html-document.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-05-16 00:54:40 -0700
committerValerio Virgillito2012-05-16 00:54:40 -0700
commita9672abd32c2e03b8607c1af4903c90f7ff9531c (patch)
tree30da60ed624d3d60b09fc04672c502bbed3b11f8 /js/document/html-document.js
parent6dfe2e62b1d7a71daf097aac3a31213d564e6122 (diff)
parent2b21e91a3343229bb87179e08be1e532fcf9b8f9 (diff)
downloadninja-a9672abd32c2e03b8607c1af4903c90f7ff9531c.tar.gz
Merge branch 'dom-architecture' of github.com:Motorola-Mobility/ninja-internal into dom-architecture
Diffstat (limited to 'js/document/html-document.js')
-rwxr-xr-xjs/document/html-document.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 9d083dd8..6a84abdf 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -972,44 +972,5 @@ exports.HTMLDocument = Montage.create(TextDocument, {
972 972
973 973
974 } 974 }
975 },
976 ////////////////////////////////////////////////////////////////////
977 /**
978 *pause videos on switching or closing the document, so that the browser does not keep downloading the media data
979 */
980 pauseVideos:{
981 value:function(){
982 var videosArr = this.documentRoot.getElementsByTagName("video"), i=0;
983 for(i=0;i<videosArr.length;i++){
984 if(!videosArr[i].paused){
985 videosArr[i].pause();
986 }
987 }
988 }
989 },
990
991 /**
992 * remove the video src on closing the document, so that the browser does not keep downloading the media data, if the tag does not get garbage collected
993 *removeSrc : boolean to remove the src if the video... set only in the close document flow
994 */
995 stopVideos:{
996 value:function(){
997 var videosArr = this.documentRoot.getElementsByTagName("video"), i=0;
998 for(i=0;i<videosArr.length;i++){
999 videosArr[i].src = "";
1000 }
1001 }
1002 },
1003 pauseAndStopVideos:{
1004 value:function(){
1005 var videosArr = this.documentRoot.getElementsByTagName("video"), i=0;
1006 for(i=0;i<videosArr.length;i++){
1007 if(!videosArr[i].paused){
1008 videosArr[i].pause();
1009 }
1010 videosArr[i].src = "";
1011 }
1012 }
1013 } 975 }
1014 ////////////////////////////////////////////////////////////////////
1015}); \ No newline at end of file 976}); \ No newline at end of file