Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tutor-shot-extension
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ramdayal Munda
tutor-shot-extension
Commits
38ac25ca
Commit
38ac25ca
authored
Mar 02, 2024
by
ramdayalmunda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
background overlay when saving video
parent
e4f159e3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
background.js
background.js
+4
-6
content.js
content.js
+3
-4
No files found.
background.js
View file @
38ac25ca
...
...
@@ -259,19 +259,17 @@ var getUserDetails = null
return
}
if
(
loggedIn
&&
request
.
action
===
'stopRecording'
)
{
console
.
log
(
'to stop recording'
)
recording
=
false
;
let
generatingOid
=
tutorShotId
tutorShotId
=
null
sendResponse
({
userDetails
,
loggedIn
,
recording
,
status
:
getStatus
()
status
:
"generatingVideo"
});
console
.
log
(
'sending generatingVideo message, '
)
sendMessageToActiveTab
(
"generatingVideo"
)
console
.
log
(
'sent generatingVideo message, '
)
await
api
.
post
(
'/tutor-shot/finalize'
,
{
_id
:
tutorShotId
},
{
headers
:
{
userid
:
userDetails
.
uid
}
})
tutorShotId
=
null
await
api
.
post
(
'/tutor-shot/finalize'
,
{
_id
:
generatingOid
},
{
headers
:
{
userid
:
userDetails
.
uid
}
})
setData
(
"recording"
,
false
)
setData
(
"imageNumber"
,
0
)
setData
(
"tutorShotId"
,
null
)
...
...
content.js
View file @
38ac25ca
...
...
@@ -30,6 +30,7 @@ var webpageObserver = { disconnect() { } }
}
containerDiv
=
document
.
createElement
(
'div'
)
containerDiv
.
setAttribute
(
'test'
,
'tutor-shot'
)
containerDiv
.
style
.
position
=
"fixed"
containerDiv
.
style
.
display
=
"block"
containerDiv
.
style
.
background
=
"transparent"
...
...
@@ -237,7 +238,6 @@ async function getCaptureData() {
}
function
reRenderFloatingBar
(
data
)
{
console
.
log
(
'reRenderFloatingBar'
,
data
)
if
(
data
)
{
if
(
data
.
status
==
'stopped'
)
{
containerDiv
.
remove
()
...
...
@@ -344,7 +344,6 @@ window.addEventListener('mousedown', async function (e) {
})
// content.js
chrome
.
runtime
.
onMessage
.
addListener
(
async
function
(
message
,
sender
,
sendResponse
)
{
console
.
log
(
'getting message'
)
if
(
message
.
action
==
'tabChanged'
)
{
// console.log('tabChanged', message)
}
...
...
@@ -384,10 +383,10 @@ chrome.runtime.onMessage.addListener(async function (message, sender, sendRespon
}
else
if
(
message
.
message
==
'generatingVideo'
)
{
console
.
log
(
'generating Video'
)
finalizingOverlay
=
document
.
createElement
(
'div'
)
finalizingOverlay
.
setAttribute
(
'class'
,
'tutor-shot-overlay'
)
sr
.
append
(
finalizingOverlay
)
finalizingOverlay
.
setAttribute
(
'style'
,
`all: unset; position: fixed; top: 0px; bottom: 0px; left: 0px; right: 0px; background-color: #000000a0; pointer-events: inherit; z-index: 101; display: flex; color: white; justify-content: center; align-items: center; font-size: 28px;`
)
document
.
body
.
append
(
finalizingOverlay
)
finalizingOverlay
.
innerHTML
=
`
<div>
Your video is being saved.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment