« first day (349 days earlier)      last day (1075 days later) » 

8:00 PM
So I could do a const { items: allTheItems, myVeryLowQuotaOfToday: quota_remaining} = res.json()?
@double-beep Heh.. there's one for us that don't bother to ask for a key? :D Thanks :)
 
@Scratte btw, await has nothing to do with objects, it only helps hide the complexity of chaining promises in a nice straightforward way :)
@Scratte the second property should be reversed with its alias (property name is always on the left, alias - on the right)
 
@OlegValter That's just me and my typo-way. I mean for it to be:
 
const { one: { two: [ { three: [{ four }] } ] } } = { one: { two: [{ three: [{ four: 42 }] }] } };
^ the beauty of destructuring :)
 
const { items: allTheItems, quota_remaining: myVeryLowQuotaOfToday} = res.json()
Hmm.. did I do that wrong again?
 
@Scratte is the absence of await included in your way? :)
@Scratte Fetch API is entirely promise-based
 
8:09 PM
That works quota 9977 :)
Or rather myVeryLowQuotaOfToday 9977
which needs a new name now
@OlegValter My head it hurting now :)
 
^ this means that methods return promises which one has to wait for in to get the actual value - unusual at first, but it is easy to catch up
@Scratte perfect
 
Why is it called destructuring?
I'm cherry-picking your code to include the statistics of the editor into the script :)
 
@Scratte well, I think because it describes the operation pretty well: "the process of unpacking a small part of something from the main part."
 
I am working on webcam recorder in JavaScript and WebRTC. But I get this error :
 
I noticed the response does not contain a backoff
 
8:14 PM
Cannot access media devices:  DOMException: Could not start video source
(anonymous) @ scripts.js:43
 
@KevinM.Mansour No MCVE
2
 
@Scratte hehe .. Code is here
@Scratte You are so funny :) I am missed to post it.
 
@KevinM.Mansour Maybe someone will answer it :) Stack is full of skillful developers :)
 
@Scratte I surprised beacause that I readed all Stack Overflow Answers but no answer worked.
Everytime I code. I get surprised from something :)
 
FYI, "I have searched on Stack Overflow and found great answers but It didn't work for me." does not usually go well.
I removed it - please, do not add noise to posts :) By noise I refer to the technical sense of the word
 
8:19 PM
@OlegValter But the "de" is puzzling. It looks like destruction. Why not "Constructuring"?
 
@Scratte ?? it serves the same purpose as "un" in "unpacking", no secret here [it is unrelated to construction/destruction] :) And at least it is a word in natural language
 
Oh! I see.. that makes sense now :)
 
@OlegValter I just added beacause people recommend me other answers but I already readed :)
 
@Scratte well, it is an obscure word without many real-world applications :) I am not sure I can name a non-IT use case for it
 
@KevinM.Mansour Then you can add them saying "I found [title of post](link), but it didn't resolve my issue. Because of... / Instead it..."
2
 
8:23 PM
@Scratte OK, if I didn't get answers; I will update question; Thanks for Explanation):
 
I have butchered your "getSuggestionsUserStats" with all kinds of destructuring now :)
And added key: options.key || 'U4DMV*8nvpm3EOpvf69Rxw((', as a fallback key :)
 
@KevinM.Mansour there should be a bit more info in the error object, what is logged if you log the error and both the message? I.e. stack trace
@Scratte exactly :)
@Scratte go wild
 
scripts.js:43 Cannot access media devices: DOMException: Could not start video source
(anonymous) @ scripts.js:43
Promise.catch (async)
(anonymous) @ scripts.js:42
 
@OlegValter I will bring it back to presentable state before sharing it. I just like to play :)
 
@OlegValter What do you mean by Log erorr ?
 
9:08 PM
@OlegValter You code is very challenging for a newbie :)
 
@KevinM.Mansour can you check what does the name property of the error object hold?
and the code property
 
9:50 PM
A newbie here. I do not know How to do that but I tried
`.catch(function(error) {
console.log(error);
});
});` And I also get "DOMException: Could not start video source"
Tried in Chrome but not working :(
 
10:18 PM
But I tried in Firefox but it say "DOMException: Failed to allocate videosource"
 
Oleg is sleeping.. :)
Is this about your Question on main?
 
@Scratte Wish him Good Night
@Scratte main of What?
 
10:36 PM
Main of Stack Overflow. As opposed to meta.
The main site :)
 
@Scratte My question is about webcam recorder in Javascript and WebRTC.
 
Yes, that's your Question on main. Maybe someone will be able to answer it..
 
@Scratte Yes, Maybe :)
I wish him Luck :)
Also my question on Meta is very good (Question about Chat Site).
 

« first day (349 days earlier)      last day (1075 days later) »