Skip to content

Commit a761c18

Browse files
author
crypt
committed
external id to support jQuery dialogs
1 parent 7ef7352 commit a761c18

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

jquery.webcam.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
var webcam = {
1616

17+
id: null,
18+
1719
width: 320,
1820
height: 240,
1921

@@ -41,7 +43,13 @@
4143
}
4244
}
4345

44-
this.append('<object id="webcam-object" type="application/x-shockwave-flash" data="'+webcam.swffile+'" width="'+webcam.width+'" height="'+webcam.height+'"><param name="movie" value="'+webcam.swffile+'" /><param name="FlashVars" value="mode='+webcam.mode+'&amp;quality='+webcam.quality+'" /></object>');
46+
var source = '<object id="webcam-object" type="application/x-shockwave-flash" data="'+webcam.swffile+'" width="'+webcam.width+'" height="'+webcam.height+'"><param name="movie" value="'+webcam.swffile+'" /><param name="FlashVars" value="mode='+webcam.mode+'&amp;quality='+webcam.quality+'" /></object>';
47+
48+
if (null !== webcam.id) {
49+
$(webcam.id).html(source);
50+
} else {
51+
this.append(source);
52+
}
4553

4654
(_register = function(run) {
4755

0 commit comments

Comments
 (0)