Skip to content

Commit

Permalink
files copied in build
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Jun 16, 2020
1 parent e6b5893 commit c579569
Show file tree
Hide file tree
Showing 5 changed files with 34,027 additions and 4 deletions.
47 changes: 43 additions & 4 deletions ofmeet/classes/jitsi-meet/custom_ofmeet.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var ofmeet = (function(of)
IMAGES.desktop = '<svg id="ofmeet-desktop" width="24" height="24" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000"><g><path d="M 30,2L 2,2 C 0.896,2,0,2.896,0,4l0,18 c0,1.104, 0.896,2, 2,2l 9.998,0 c-0.004,1.446-0.062,3.324-0.61,4L 10.984,28 C 10.44,28, 10,28.448, 10,29C 10,29.552, 10.44,30, 10.984,30l 10.030,0 C 21.56,30, 22,29.552, 22,29c0-0.552-0.44-1-0.984-1l-0.404,0 c-0.55-0.676-0.606-2.554-0.61-4L 30,24 c 1.104,0, 2-0.896, 2-2L 32,4 C 32,2.896, 31.104,2, 30,2z M 14,24l-0.002,0.004 C 13.998,24.002, 13.998,24.002, 14,24L 14,24z M 18.002,24.004L 18,24l 0.002,0 C 18.002,24.002, 18.002,24.002, 18.002,24.004z M 30,20L 2,20 L 2,4 l 28,0 L 30,20 z"></path></g></svg>';

const SMILIES = [":)", ":(", ":D", ":+1:", ":P", ":wave:", ":blush:", ":slightly_smiling_face:", ":scream:", ":*", ":-1:", ":mag:", ":heart:", ":innocent:", ":angry:", ":angel:", ";(", ":clap:", ";)", ":beer:"];
const nickColors = {}, padsList = [], captions = {msgs: []}, breakout = {rooms: [], duration: 60, roomCount: 10, wait: 10};
const nickColors = {}, padsList = [], captions = {msgs: []}, breakout = {rooms: [], duration: 60, roomCount: 10, wait: 10}, pdf_body = [];
;

let tagsModal = null, padsModal = null, breakoutModal = null, contactsModal = null;
let padsModalOpened = false, contactsModalOpened = false, swRegistration = null, participants = {}, recordingAudioTrack = {}, recordingVideoTrack = {}, videoRecorder = {}, recorderStreams = {}, customStore = {}, filenames = {}, dbnames = [];
Expand Down Expand Up @@ -273,10 +274,21 @@ var ofmeet = (function(of)
}
});

APP.conference.addConferenceListener(JitsiMeetJS.events.conference.MESSAGE_RECEIVED , function(id, text, ts)
APP.conference.addConferenceListener(JitsiMeetJS.events.conference.PRIVATE_MESSAGE_RECEIVED, function(id, text, ts)
{
var participant = APP.conference.getParticipantById(id);
var displayName = participant ? (participant._displayName || 'Anonymous-' + id) : "Me";
var displayName = participant ? (participant._displayName || 'Anonymous-' + id) : (APP.conference.getLocalDisplayName() || "Me");

console.debug("ofmeet.js private message", id, text, ts, displayName);

const pretty_time = dayjs().format('MMM DD HH:mm:ss');
pdf_body.push([pretty_time, displayName, text]);
});

APP.conference.addConferenceListener(JitsiMeetJS.events.conference.MESSAGE_RECEIVED, function(id, text, ts)
{
var participant = APP.conference.getParticipantById(id);
var displayName = participant ? (participant._displayName || 'Anonymous-' + id) : (APP.conference.getLocalDisplayName() || "Me");

console.debug("ofmeet.js message", id, text, ts, displayName, participant, padsModalOpened);

Expand All @@ -301,6 +313,9 @@ var ofmeet = (function(of)
if (captions.ele) captions.ele.innerHTML = displayName + " : " + text;
captions.msgs.push({text: text, stamp: (new Date()).getTime()});
}

const pretty_time = dayjs().format('MMM DD HH:mm:ss');
pdf_body.push([pretty_time, displayName, text]);
}

if (breakout.started)
Expand Down Expand Up @@ -615,6 +630,30 @@ var ofmeet = (function(of)
if (leaveButton) leaveButton.addEventListener("click", function(evt)
{
if (of.recording) stopRecorder();

if (pdf_body.length > 0)
{
const margins = {
top: 70,
bottom: 40,
left: 30,
width: 550
};
const pdf = new jsPDF('p','pt','a4');
//pdf.setFontSize(18);

pdf.autoTable({
head: [['Date', 'Person', 'Message']],
body: pdf_body,
columnStyles: {
0: {cellWidth: 100},
1: {cellWidth: 100},
2: {cellWidth: 300}
}
})
const roomLabel = APP.conference.roomName + '-' + Math.random().toString(36).substr(2,9);
pdf.save(roomLabel + '.pdf');
}
});
}

Expand Down Expand Up @@ -2161,7 +2200,7 @@ var ofmeet = (function(of)
{
console.debug('Push notification is supported');

registration.pushManager.getSubscription().then(function(subscription)
if (registration) registration.pushManager.getSubscription().then(function(subscription)
{
if (subscription && !localStorage["pade.vapid.keys"])
{
Expand Down
1 change: 1 addition & 0 deletions ofmeet/classes/jitsi-meet/dayjs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions ofmeet/classes/jitsi-meet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@
<script src="jkanban.js"></script>
<script src="fix-webm-duration.js"></script>
<script src="webpush-browserify-bundle.js"></script>
<script src="jspdf.debug.js"></script>
<script src="jspdf.plugin.autotable.js"></script>
<script src="dayjs.min.js"></script>
</head>
<body>
<div id="react"></div>
Expand Down
Loading

0 comments on commit c579569

Please sign in to comment.