Template.audio.created = function(){
	this.filename = new ReactiveVar('');
};

Template.audio.onCreated(function(){
	var self= this;
	this.autorun( function() {
		self.subscribe('audios');
	});
});

Meteor.startup(function() {
	Template.audio.events({
	'change input.audioFile' : FS.EventHandlers.insertFiles(Collections.Audios,{
		metadata : function(fileobj){
			return {
	          	owner:{
	            	id: Meteor.userId(),
	            	name: Meteor.user().profile.name
	          	},
	          	dropped: false,
          		privacy:"private"
	        };
		},

		after : function (error,fileobj){
			if(!error){
				alert('done');
			}
		}
	}),


	'keyup .filename': function(){
		var ins = Template.instance();
		if(ins){
			ins.filename.set($('.filename').val());
			}
		}
	});
});


Template.audio.helpers({
  uploadedAudios: function() {
  	
    return Collections.Audios.find({});
  }
});

Template.audio_group.created = function(){
	this.filename = new ReactiveVar('');
};


Template.audio_group.onCreated(function(){
	var self= this;
	this.autorun( function() {
		self.subscribe('audios');
	});
});


Meteor.startup(function() {
	Template.audio_group.events({
	'change input.audioFile' : FS.EventHandlers.insertFiles(Collections.Audios,{
		metadata : function(fileobj){
			var groupId = Session.get('groupId');
	    	return {
	          	owner:{
	            	id: Meteor.userId(),
	            	name: Meteor.user().profile.name
	          	},
	          	groupID: groupId,
	          	dropped: false,
          		privacy:"public"
	        };
		},

		after : function (error,fileobj){
			if(!error){
				alert('done');
			}
		}
	}),


	'keyup .filename': function(){
		var ins = Template.instance();
		if(ins){
			ins.filename.set($('.filename').val());
			}
		}
	});
});


Template.audio_group.helpers({
  uploadedAudios: function() {
  	
    return Collections.Audios.find({});
  }
});
@@ -638,35 +638,51 @@
 rror)%7B%0D%0A%09%09%09%09
-alert('done
+Router.go('/user/showMedia/
 ');%0D%0A%09%09%09%7D%0D%0A%09
@@ -1401,16 +1401,469 @@
 pId');%0D%0A
+%09%09%09var group= Groups.findOne(%7B _id: groupId%7D);%0D%0A%09        var group_name = group.gname;%0D%0A%09        Rss.insert(%7B%0D%0A%09          rss_title: %22has added a new audio%22,%0D%0A%09          title: $('.filename').val(),%0D%0A%09          user_action: %22/user_dashboard/%22+ Meteor.userId(),%0D%0A%09          user_name: Meteor.user().profile.name,%0D%0A%09          group_name: group_name,%0D%0A%09          createdAt: new Date().toLocaleString(),%0D%0A%09          action: %22/group/%22+groupId%0D%0A%09        %7D);%0D%0A
 %09    %09re
@@ -2171,24 +2171,58 @@
 t('done');%0D%0A
+%09%09%09%09Router.go('/shared_media/');%0D%0A
 %09%09%09%7D%0D%0A%09%09%7D%0D%0A%09
@@ -2433,36 +2433,32 @@
 os: function() %7B
-%0D%0A  
 %09%0D%0A    return Co
@@ -2470,31 +2470,47 @@
 ions.Audios.find(%7B%7D);%0D%0A  %7D%0D%0A
-
 %7D);
+%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A

Add new things for example video player n audio player