Answer the question
In order to leave comments, you need to log in
Do an action after the end of the video (youtube)?
Good afternoon.
Essence of the question: There is a video from youtube on the page, you need to somehow track the end of watching this video and display a modal window.
So how do you track the end of a video? Maybe someone came across?
p.s. Thank you all for your replies.
Answer the question
In order to leave comments, you need to log in
I asked myself and answered.
varplayer;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '100%',
width: '100%',
videoId: 'V4o01AIt5sM',
events: {
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerStateChange(event) {
if(event.data ==0){
alert('Video Ended;')
}
}
Depends on which player is being used. For the standard one, there are events on this topic. https://developers.google.com/youtube/iframe_api_r...
Would you like to try Knee Chairs ?
I really liked to sit on this, but it was a necessity at a certain period of time.
I have something like this
How to sit, written in honey. sites.
I sit as comfortably and often this leads to pain in the back and even completely stuck.
But I'm already old)
DXRacer with silicone armrests, a great thing. For the New Year, I prepared a gift in the form of this chair.
1. Armchair, body (including legs) - must change position every 5-7 minutes at least!
2. Chair - should rotate from time to time: put a monitor / telly with notifications behind the back of the chair so that from time to time - change body position to look.
3. Elbows at work - should lie on the table.
4. Table and chair - must have a variable height so that the elbow bend makes an angle of exactly 110 (to be exact: 112.5) degrees.
5. The back of the chair - should be bent inward, slightly springy and rest against your back and spine with the whole plane in order to keep the correct posture.
6. Knee bends and bends of the ankle joints - should be exactly 90 degrees if the feet are completely touching the floor, because. the load should be evenly distributed between the chair and the legs, which prevents the overlap/clamping of the blood vessels at the edge of the chair seat.
IMHO, working while sitting on a fitball / stool / chair / in an armchair or standing (“varicose veins, hello!” - as already said) is only from grief. It is normal to work, taking any conceivable and unimaginable postures without consequences (especially if it is interesting and the working day is imperceptibly stretched for 12 hours), IMHO, you can only lie down (and personally I only lie down when possible). Currently, I prefer flat, hard surfaces covered with a mat/woolen blanket or a hammock for lying down. But in ancient times, when I was not very "spread out", I used a massage chair-table (like a dental one, but it allows you to work while lying on your stomach). It is clear that it is desirable to get up regularly, walk, etc.
a couch-chair for beginners lying on the floor may look like this (it is not visible in the picture, but IMHO there is most likely a hole for the face under the pillow at the head, it slightly expands the possibilities for working while lying on the stomach): a table (if needed) can be made like this
I wrote about the method here:
with a small keyboard that fits comfortably in your hands, you can wallow in a hammock and work in VIM no slower than at a table. The monitor(s) is hung on a bracket with 3 degrees of freedom, the programmer lies down in a hammock or on a mat and codes at his pleasure, without worrying about hemorrhoids, posture and tunnel syndrome. https://geektimes.ru/company/octodon/blog/286084/#...with small keyboards it's still an ambush, and a large clave is not very suitable for working lying down.
OMG when people go crazy...
A work environment should be a work environment. All this lying, standing, hanging by one leg - I won’t say anything, maybe it’s convenient for someone to work like that ... But as they say, as a person who spends 12 hours at a monitor in a row, I’ll put in my five cents :)
All of the following is purely IMHO
The table is large, wide, able to support monitors and everything else that is needed for work, so as not to be crowded. The height of the table should be such that the hands are at a comfortable height for work - for me this is just below the 3rd shirt button from the top. There should be enough space under the table to stretch your legs.
A chair - soft, rotating, with a wide strong crosspiece. I really like to sit with my legs crossed over the rays of the cross and rotate slightly at the same time. (A habit since 1990, when he worked as a computer operator and could ride a chair around the machine room). The back is semi-rigid, high, anatomically shaped. To work, you must support your back, so take "leader's chairs" in which the back is semi-reclining - it's not worth it - you can't work reclining, this position is more in order to watch a movie. The back of the chair should be so rigid that it leans back on it with all its weight, and it only springs slightly. Armrests should provide support for the elbows, and not be a decorative element. I prefer CHAIRMAN chairs.
The keyboard is full-sized, with a numeric keypad, with arrows, without all these newfangled tendencies to narrowing, always with a wide wrist rest - without it, when placed on the table, the wrist bends upward and even a masochist cannot sit for so long. Full-width function keys - otherwise it's problematic to hit. The best keyboards, oddly enough, from Microsoft.
Mouse - universal (not for the right hand), weighted (weighing at least two AA batteries). Logitech had the best mice, maybe Microsoft.
In fact, you need to work while standing, as they do in Facebook and Google
When buying a chair from $1000, certified specialists will bring it, adjust it for you and give recommendations on the ergonomics of the workplace. And if you buy another posture corrector , then he will not let you forget and hunch over.
1. Bidet or hygienic shower for the prevention of hemorrhoids. This is the only thing that can save a representative of a sedentary profession from prolapse of the intestines in the long term.
2. Strength training for the back once a week. Enough courses for 1-2 months every half a year, but better all the time.
3. Protective floor mat - www.ikea.com/ru/ru/catalog/products/44881100
4. Stool or chair with a hard seat (kitchen chairs covered with thick leather work great). Not staggering, strong table (so that you can fearlessly lean on it). The height of the seat should correspond to the length of the lower leg, the height of the table - the height of the elbow in a sitting position. Monitor with a diagonal of 27-32 inches - https://market.yandex.ru/product/13873246(preferably three - in addition to additional convenience, this makes you turn your head). The center of the monitor is below eye level.
A proper seated workplace should force movement, so the seat should be stable, and not have one pronounced comfortable body position. Knee chairs fix the legs, and "ergonomic" chairs are too mobile, and do not allow you to radically change your posture. An ordinary chair allows you to warm up without looking up from work - lean sideways / forward / backward (hooking your ankles on your front legs) without fear of falling, and makes you get up and walk at least once an hour.
ps. The experience of sedentary work is more than 20 years, until now sometimes there are washed down for 15-20 hours (at the entrance to the stream). I tried many different chairs, only the kitchen chair made me feel really comfortable.
pps Stop being a driver. Driving a car is even worse for the body than sitting. If possible, you need to replace it with walking, if not, use a bicycle, taxi, or public transport.
ppps. Stop working as a loader. Carrying heavy bags and boxes of food is not a workout, but another way to mock your body. There are special people for this (online stores with home delivery of groceries).
I support a friend from above, it’s worth buying a specific table for standing work. At a minimum, you yourself will force yourself to move more than if you were just sitting in a comfortable chair.
I still can’t get it right, so I run out to the gym in the afternoon;)
As a typical representative of the East, I prefer a sitting (without any armchairs) position. The height of the table is 30 cm. I sit on a hard mattress. Of the amenities, you can sit in any position, even with legs on your neck (I prefer the lotus position).
A good physiotherapist will build a program for you to straighten your posture
Pomodoro timer - gymnastics in breaks
Or gymnastics + weightlifting under the supervision of that good physiotherapist
Whistle blowers - cool, but they will not correct the situation fundamentally
A sedentary lifestyle is unnatural
See the article correct chair for working at a computer , as well as about the table: the arms at the elbows should be bent at an angle of 90 degrees, the shoulders should not be tense, and the hand should be straight. To do this, you need to choose the height of the table that suits you.
There is an official guide/recommendations:
https://www.gotoadm.ru/workplace-ergonomics/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question