{"id":7201,"date":"2025-06-08T13:28:17","date_gmt":"2025-06-08T10:28:17","guid":{"rendered":"https:\/\/1.cbm.ua\/?p=7201"},"modified":"2026-01-13T20:39:24","modified_gmt":"2026-01-13T17:39:24","slug":"javascript-audio-play","status":"publish","type":"post","link":"https:\/\/1.cbm.ua\/?p=7201","title":{"rendered":"javascript audio play"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.w3schools.com\/jsref\/dom_obj_audio.asp\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.w3schools.com\/jsref\/dom_obj_audio.asp<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">HTML DOM&nbsp;Audio&nbsp;Object<\/h1>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Audio Object<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>The Audio object represents an HTML &lt;audio&gt; element.<br>Access an Audio Object<br>You can access an &lt;audio&gt; element by using getElementById():<\/td><td>Audio Object \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 HTML <br>\u0414\u043e\u0441\u0442\u0443\u043f \u043a Audio Object<br>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 <br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var x = document.getElementById(\"myAudio\");<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Create an Audio Object<br>You can create an &lt;audio&gt; element by using the document.createElement() method:<\/td><td>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0443\u0434\u0438\u043e \u043e\u0431\u044a\u0435\u043a\u0442<br>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 <br><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Audio Object Properties &#8212; \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0430\u0443\u0434\u0438\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var x = document.getElementById(\"myAudio\");<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Audio Object Properties<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Property<\/th><th>Description<\/th><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_audiotracks.asp\">audioTracks<\/a> &#8212; \u041d\u0415 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.<\/td><td>Returns an AudioTrackList object representing available audio tracks<br><\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 AudioTrackList, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0430\u0443\u0434\u0438\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0438.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_autoplay.asp\">autoplay<\/a><\/td><td>Sets or returns whether the audio should start playing as soon as it is ready<br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442, \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0438 \u0430\u0443\u0434\u0438\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_buffered.asp\">buffered<\/a><\/td><td>Returns a TimeRanges object representing the buffered parts of an audio<\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 TimeRanges, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0431\u0443\u0444\u0435\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 \u0430\u0443\u0434\u0438\u043e<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_controller.asp\">controller<\/a><\/td><td>Returns the MediaController object representing the current media controller of an audio<\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 MediaController, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u0435\u0434\u0438\u0430-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0430\u0443\u0434\u0438\u043e.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_controls.asp\">controls<\/a><\/td><td>Sets or returns whether an audio should have controls displayed (play\/pause etc)<br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442, \u0434\u043e\u043b\u0436\u043d\u044b \u043b\u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0443\u0434\u0438\u043e (\u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435\/\u043f\u0430\u0443\u0437\u0430 \u0438 \u0442. \u0434.)<\/td><\/tr><tr><td>crossOrigin<\/td><td>Sets or returns the CORS settings of an audio<\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 CORS \u0430\u0443\u0434\u0438\u043e<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_currentsrc.asp\">currentSrc<\/a><\/td><td>Returns the URL of the current audio<\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 URL \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0430\u0443\u0434\u0438\u043e<br><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_currenttime.asp\">currentTime<\/a><\/td><td>Sets or returns the current playback position in an audio (in seconds)<br><br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0430\u0443\u0434\u0438\u043e (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445)<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_defaultmuted.asp\">defaultMuted<\/a><\/td><td>Sets or returns whether the audio should be muted by default<br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0437\u0432\u0443\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_defaultplaybackrate.asp\">defaultPlaybackRate<\/a><\/td><td>Sets or returns whether the default playback speed of the audio<br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_duration.asp\">duration<\/a><\/td><td>Returns the length of an audio(in seconds)<\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0430\u0443\u0434\u0438\u043e (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445)<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_ended.asp\">ended<\/a><\/td><td>Returns whether the playback of the audio has ended<\/td><td>Returns whether the playback of the audio has ended<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_error.asp\">error<\/a><\/td><td>Returns a MediaError object representing the error state of the audio<\/td><td>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 MediaError, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0430\u0443\u0434\u0438\u043e.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_loop.asp\">loop<\/a><\/td><td>Sets or returns whether the audio should start playing over again, every time it is finished<br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442, \u0434\u043e\u043b\u0436\u043d\u043e \u043b\u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0437\u0432\u0443\u043a\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u043d\u043e\u0432\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_mediagroup.asp\">mediaGroup<\/a><\/td><td>Sets or returns the name of the media group the audio(s) is a part of<br><br><br><br><br><br><\/td><td>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043c\u044f \u043c\u0435\u0434\u0438\u0430\u0433\u0440\u0443\u043f\u043f\u044b, \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0443\u0434\u0438\u043e (\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u0442\u0430\u043a \u0438 <strong>\u043d\u0435 \u0432\u043d\u0435\u0434\u0440\u0438\u043b\u0438 \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>.) \u0412\u043d\u0438\u0437\u0443 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u043f\u043b\u0435\u0435\u0440\u0430\u043c\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c JS.<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_muted.asp\">muted<\/a><\/td><td>Sets or returns whether the sound should be turned off<\/td><td>\u0417\u0432\u0443\u043a \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u0438\u043b\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d.<br><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_networkstate.asp\">networkState<\/a><\/td><td>Returns the current network state of an audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_paused.asp\">paused<\/a><\/td><td>Returns whether an audio is paused<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_playbackrate.asp\">playbackRate<\/a><\/td><td>Sets or returns the speed of the audio playback<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_played.asp\">played<\/a><\/td><td>Returns a TimeRanges object representing the played parts of the audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_preload.asp\">preload<\/a><\/td><td>Sets or returns the value of the preload attribute of an audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_readystate.asp\">readyState<\/a><\/td><td>Returns the current ready state of an audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_seekable.asp\">seekable<\/a><\/td><td>Returns a TimeRanges object representing the seekable parts of an audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_seeking.asp\">seeking<\/a><\/td><td>Returns whether the user is currently seeking in the audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_src.asp\">src<\/a><\/td><td>Sets or returns the value of the src attribute of an audio<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_texttracks.asp\">textTracks<\/a><\/td><td>Returns a TextTrackList object representing the available text tracks<\/td><td><\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/prop_audio_volume.asp\">volume<\/a><\/td><td>Sets or returns the audio volume of an audio<\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Audio Object Methods<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Method<\/th><th>Description<\/th><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/met_audio_addtexttrack.asp\">addTextTrack()<\/a><\/td><td>Adds a new text track to the audio<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/met_audio_canplaytype.asp\">canPlayType()<\/a><\/td><td>Checks whether the browser can play the specified audio type<\/td><\/tr><tr><td>fastSeek()<\/td><td>Seeks to a specified time in the audio player<\/td><\/tr><tr><td>getStartDate()<\/td><td>Returns a new Date object, representing the current timeline offset<\/td><\/tr><tr><td>load()<\/td><td>Re-loads the audio element<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/met_audio_play.asp\">play()<\/a><\/td><td>Starts playing the audio<\/td><\/tr><tr><td><a href=\"https:\/\/www.w3schools.com\/jsref\/met_audio_pause.asp\">pause()<\/a><\/td><td>Pauses the currently playing audio<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p>\u0412 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0430\u0443\u0434\u0438\u043e \u043f\u0440\u043e\u0449\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>JavaScript<\/strong>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">&lt;!DOCTYPE html>\n&lt;html lang=\"ru\">\n&lt;head>\n&lt;meta charset=\"UTF-8\">\n&lt;title>media-group&lt;\/title>\n&lt;\/head>\n&lt;body>\n\n&lt;h1>\u0421\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u0443\u0434\u0438\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e media-group&lt;\/h1>\n\n&lt;audio id=\"audio1\" src=\".\/audio\/original_de_audio_Hoeren-Sprechen_A2_Track_002.mp3\" controls>&lt;\/audio>\n&lt;audio id=\"audio2\" src=\".\/audio\/ru_audio_tra_Hoeren-Sprechen_A2_Track_002.mp3\" controls>&lt;\/audio>\n\n&lt;script>\n  const audio1 = document.getElementById('audio1');\n  const audio2 = document.getElementById('audio2');\n\n  audio1.addEventListener('play', () => {\n    audio2.play().catch((err) => console.error(err)); \/\/ \u0412 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043c\u043e\u0436\u0435\u0442 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c autoplay policy\n  });\n\n  audio1.addEventListener('pause', () => {\n    audio2.pause();\n  });\n&lt;\/script>\n\n&lt;\/body>\n&lt;\/html>\n<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www.w3schools.com\/jsref\/dom_obj_audio.asp HTML DOM&nbsp;Audio&nbsp;Object Audio Object The Audio object represents an HTML &lt;audio&gt; element.Access an Audio ObjectYou can access an &lt;audio&gt; element by using getElementById(): Audio Object \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 HTML \u0414\u043e\u0441\u0442\u0443\u043f \u043a Audio Object\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 Create an Audio ObjectYou can create an &lt;audio&gt; element by using the document.createElement() method: \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u0443\u0434\u0438\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0412\u044b&hellip;&nbsp;<a href=\"https:\/\/1.cbm.ua\/?p=7201\" rel=\"bookmark\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 &raquo;<span class=\"screen-reader-text\">javascript audio play<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[195,6],"tags":[],"class_list":["post-7201","post","type-post","status-publish","format-standard","hentry","category-it","category-js"],"_links":{"self":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/posts\/7201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7201"}],"version-history":[{"count":19,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/posts\/7201\/revisions"}],"predecessor-version":[{"id":7229,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=\/wp\/v2\/posts\/7201\/revisions\/7229"}],"wp:attachment":[{"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1.cbm.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}