{"id":345795,"date":"2023-02-23T09:01:03","date_gmt":"2023-02-23T09:01:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=345795"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2023-02-23T09:01:03","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=345795","title":{"rendered":"<span>7 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 API \u043d\u0430 JavaScript \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u043e\u0432, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e) \u043d\u0435 \u0437\u043d\u0430\u043b\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \u041d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 API \u043d\u0435 \u0442\u0430\u043a \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u043d\u0438\u0445.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0432\u0435\u0431-API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0432\u0430\u0448 \u0441\u0430\u0439\u0442 \u0434\u043e \u043d\u0435\u0431\u0435\u0441!<\/p>\n<h4>1. Screen Capture API<\/h4>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/460825\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0412 \u043d\u0435\u0439 \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0435\u043a\u0443 \u043f\u043e \u043d\u0435\u043c\u0443 \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 MDN.<\/p>\n<\/blockquote>\n<p><em>API Screen Capture<\/em>, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043a\u0440\u0430\u043d\u0430, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f screen recorder.  \u0412\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0438\u0434\u0435\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 (<code>&lt;video><\/code>). \u041a\u043d\u043e\u043f\u043a\u0430 &#171;Start&#187; \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0437\u0430\u0445\u0432\u0430\u0442 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"xml\">&lt;video id=\"preview\" autoplay>   Your browser doesn't support HTML5. &lt;\/video> &lt;button id=\"start\" class=\"btn\">Start&lt;\/button><\/code><\/pre>\n<pre><code class=\"javascript\">const previewElem = document.getElementById(\"preview\"); const startBtn = document.getElementById(\"start\");  async function startRecording() {   previewElem.srcObject =     await navigator.mediaDevices.getDisplayMedia({       video: true,       audio: true,     }); }  startBtn.addEventListener(\"click\", startRecording);<\/code><\/pre>\n<h3>2. Web Share API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Share_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>, \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432<a href=\"https:\/\/medium.com\/nuances-of-programming\/%D0%B2%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5-%D0%B2-webshare-api-bd1aa458115d\" rel=\"noopener noreferrer nofollow\"> Web Share API<\/a>.<\/p>\n<\/blockquote>\n<p><em>Web Share API<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.<\/p>\n<pre><code class=\"javascript\">async function shareHandler() {   navigator.share({     title: \"Tapajyoti Bose | Portfolio\",     text: \"Check out my website\",     url: \"https:\/\/tapajyoti-bose.vercel.app\/\",   }); }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Web Share API, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043a\u0430\u0441\u0430\u043d\u0438\u044f.<\/p>\n<h3>3. Intersection Observer API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/494670\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435, <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Intersection_Observer_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Intersection Observer API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438\u043b\u0438 \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u0442 \u0435\u0435. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/63f714ef7a8d27e02615814d\" data-style=\"\" id=\"63f714ef7a8d27e02615814d\" width=\"\"><\/div>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0412 \u0434\u0435\u043c\u043e-\u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f React \u0438\u0437-\u0437\u0430 \u043c\u043e\u0438\u0445 \u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443) \u0438\u043b\u0438 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439 JavaScript.<\/p>\n<h3>4. Clipboard API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/358494\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Clipboard_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Clipboard API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430.<\/p>\n<pre><code class=\"javascript\">async function copyHandler() {   const text = \"https:\/\/tapajyoti-bose.vercel.app\/\";   navigator.clipboard.writeText(text); }<\/code><\/pre>\n<h3>5. Screen Wake Lock API <\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Screen_Wake_Lock_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a YouTube \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e? \u041d\u0443, \u044d\u0442\u043e \u0438\u0437-\u0437\u0430 API \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"javascript\">let wakeLock = null;  async function lockHandler() {   wakeLock = await navigator.wakeLock.request(\"screen\"); }  async function releaseHandler() {   await wakeLock.release();   wakeLock = null; }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u044b\u0434\u0430\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<h3>6. Screen Orientation API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Screen\/orientation\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>API \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"javascript\">async function lockHandler() {   await screen.orientation.lock(\"portrait\"); }  function releaseHandler() {   screen.orientation.unlock(); }  function getOrientation() {   return screen.orientation.type; }<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/c15\/d24\/233\/c15d24233deb27a1fc95f2dd9c15f1a1.jpg\" width=\"880\" height=\"336\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c15\/d24\/233\/c15d24233deb27a1fc95f2dd9c15f1a1.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<h3>7. Fullscreen API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/184926\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (<strong>2013 \u0433\u043e\u0434<\/strong>), <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Fullscreen_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Fullscreen API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043b\u0438 \u0432\u0441\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<pre><code class=\"javascript\">async function enterFullscreen() {   await document.documentElement.requestFullscreen(); }  async function exitFullscreen() {   await document.exitFullscreen(); }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Fullscreen API, \u0432\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<blockquote>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0438 \u0432\u044b \u043d\u0430\u0448\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0438 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. <\/p>\n<p>\u0412\u0441\u044f &#8216;\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f&#8217; \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043b\u0438\u0447\u043d\u043e \u043e\u0442 \u043c\u0435\u043d\u044f, \u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442 \u0432\u0430\u0441, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043a\u0438\u043d\u0435\u0442\u0435 \u0438\u0445 \u043c\u043d\u0435 \u0432 \u043b\u0441 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<p>\u0421\u043c\u0435\u043b\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 API \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043c\u0435\u043b\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435 \u043a\u043e \u043c\u043d\u0435 \u0432 \u043b\u0441, \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/694636\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/718712\/\"> https:\/\/habr.com\/ru\/post\/718712\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0412 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u043c\u0438\u0441\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u044b\u0435 \u043d\u043e\u0432\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \u041d\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 API \u043d\u0435 \u0442\u0430\u043a \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043e \u043d\u0438\u0445.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0432\u0435\u0431-API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0432\u0430\u0448 \u0441\u0430\u0439\u0442 \u0434\u043e \u043d\u0435\u0431\u0435\u0441!<\/p>\n<h4>1. Screen Capture API<\/h4>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/460825\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0412 \u043d\u0435\u0439 \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u0441\u043f\u0435\u043a\u0443 \u043f\u043e \u043d\u0435\u043c\u0443 \u0438 \u0441\u0441\u044b\u043b\u043a\u0443 MDN.<\/p>\n<\/blockquote>\n<p><em>API Screen Capture<\/em>, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u044d\u043a\u0440\u0430\u043d\u0430, \u0447\u0442\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f screen recorder.  \u0412\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0432\u0438\u0434\u0435\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u0445\u0432\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u044d\u043a\u0440\u0430\u043d\u0430 (<code>&lt;video><\/code>). \u041a\u043d\u043e\u043f\u043a\u0430 &#171;Start&#187; \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0437\u0430\u0445\u0432\u0430\u0442 \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"xml\">&lt;video id=\"preview\" autoplay>   Your browser doesn't support HTML5. &lt;\/video> &lt;button id=\"start\" class=\"btn\">Start&lt;\/button><\/code><\/pre>\n<pre><code class=\"javascript\">const previewElem = document.getElementById(\"preview\"); const startBtn = document.getElementById(\"start\");  async function startRecording() {   previewElem.srcObject =     await navigator.mediaDevices.getDisplayMedia({       video: true,       audio: true,     }); }  startBtn.addEventListener(\"click\", startRecording);<\/code><\/pre>\n<h3>2. Web Share API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Share_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>, \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432<a href=\"https:\/\/medium.com\/nuances-of-programming\/%D0%B2%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5-%D0%B2-webshare-api-bd1aa458115d\" rel=\"noopener noreferrer nofollow\"> Web Share API<\/a>.<\/p>\n<\/blockquote>\n<p><em>Web Share API<\/em> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.<\/p>\n<pre><code class=\"javascript\">async function shareHandler() {   navigator.share({     title: \"Tapajyoti Bose | Portfolio\",     text: \"Check out my website\",     url: \"https:\/\/tapajyoti-bose.vercel.app\/\",   }); }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Web Share API, \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043a\u0430\u0441\u0430\u043d\u0438\u044f.<\/p>\n<h3>3. Intersection Observer API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/494670\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435, <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Intersection_Observer_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Intersection Observer API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438\u043b\u0438 \u043f\u043e\u043a\u0438\u0434\u0430\u0435\u0442 \u0435\u0435. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438.<\/p>\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/63f714ef7a8d27e02615814d\" data-style=\"\" id=\"63f714ef7a8d27e02615814d\" width=\"\"><\/div>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0412 \u0434\u0435\u043c\u043e-\u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f React \u0438\u0437-\u0437\u0430 \u043c\u043e\u0438\u0445 \u043b\u0438\u0447\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0439, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a (\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443) \u0438\u043b\u0438 \u0432\u0430\u043d\u0438\u043b\u044c\u043d\u044b\u0439 JavaScript.<\/p>\n<h3>4. Clipboard API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/358494\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Clipboard_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Clipboard API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430. \u042d\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0431\u0443\u0444\u0435\u0440 \u043e\u0431\u043c\u0435\u043d\u0430.<\/p>\n<pre><code class=\"javascript\">async function copyHandler() {   const text = \"https:\/\/tapajyoti-bose.vercel.app\/\";   navigator.clipboard.writeText(text); }<\/code><\/pre>\n<h3>5. Screen Wake Lock API <\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Screen_Wake_Lock_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>\u0412\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a YouTube \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e? \u041d\u0443, \u044d\u0442\u043e \u0438\u0437-\u0437\u0430 API \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430.<\/p>\n<pre><code class=\"javascript\">let wakeLock = null;  async function lockHandler() {   wakeLock = await navigator.wakeLock.request(\"screen\"); }  async function releaseHandler() {   await wakeLock.release();   wakeLock = null; }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c API \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0431\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u044d\u043a\u0440\u0430\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0443\u0436\u0435 \u0432\u0438\u0434\u043d\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0432\u044b\u0434\u0430\u043b\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0443.<\/p>\n<h3>6. Screen Orientation API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Screen\/orientation\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>API \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u044d\u043a\u0440\u0430\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043e\u0440\u0438\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<\/p>\n<pre><code class=\"javascript\">async function lockHandler() {   await screen.orientation.lock(\"portrait\"); }  function releaseHandler() {   screen.orientation.unlock(); }  function getOrientation() {   return screen.orientation.type; }<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>7. Fullscreen API<\/h3>\n<blockquote>\n<p>\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: <a href=\"https:\/\/habr.com\/ru\/post\/184926\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f <\/a>\u043d\u0430 \u0425\u0430\u0431\u0440\u0435 (<strong>2013 \u0433\u043e\u0434<\/strong>), <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Fullscreen_API\" rel=\"noopener noreferrer nofollow\">MDN<\/a>.<\/p>\n<\/blockquote>\n<p>Fullscreen API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043b\u0438 \u0432\u0441\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.<\/p>\n<pre><code class=\"javascript\">async function enterFullscreen() {   await document.documentElement.requestFullscreen(); }  async function exitFullscreen() {   await document.exitFullscreen(); }<\/code><\/pre>\n<p>\u041f\u0420\u0418\u041c\u0415\u0427\u0410\u041d\u0418\u0415: \u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Fullscreen API, \u0432\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<blockquote>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0438 \u0432\u044b \u043d\u0430\u0448\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0438 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432. <\/p>\n<p>\u0412\u0441\u044f &#8216;\u041f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f&#8217; \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u043b\u0438\u0447\u043d\u043e \u043e\u0442 \u043c\u0435\u043d\u044f, \u043d\u043e \u044f \u043c\u043e\u0433\u0443 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0435\u0451 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u0442 \u0432\u0430\u0441, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u043a\u0438\u043d\u0435\u0442\u0435 \u0438\u0445 \u043c\u043d\u0435 \u0432 \u043b\u0441 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438.<\/p>\n<p>\u0421\u043c\u0435\u043b\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u0441\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 API \u0438 \u0441\u0432\u043e\u0438\u043c\u0438 \u043c\u044b\u0441\u043b\u044f\u043c\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0441\u043c\u0435\u043b\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435 \u043a\u043e \u043c\u043d\u0435 \u0432 \u043b\u0441, \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e!<\/p>\n<p>\u041f\u043e\u0445\u043e\u0436\u0430\u044f <a href=\"https:\/\/habr.com\/ru\/company\/timeweb\/blog\/694636\/\" rel=\"noopener noreferrer nofollow\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<\/p>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/718712\/\"> https:\/\/habr.com\/ru\/post\/718712\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-345795","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345795","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345795"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/345795\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}