Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ru): MacroLiveSampleError errors part-1 #16968

Merged
merged 46 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4f9934d
[ru]: fix MacroLiveSampleError on docs/Glossary/Grid (#12578)
leon-win Nov 13, 2023
57c03da
[ru]: fix MacroLiveSampleError on docs/Web/CSS/mix-blend-mode (#12578)
leon-win Nov 13, 2023
90dddf2
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/fill-rule (#…
leon-win Nov 13, 2023
15bd953
Merge branch 'main' into fix/12578/macro-live-sample-error
leon-win Nov 13, 2023
e39879c
[ru]: fix broken links on docs/Web/SVG/Element/a
leon-win Nov 13, 2023
c7c887a
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/a (#12578)
leon-win Nov 13, 2023
25f28c3
[ru]: fix broken links on docs/Web/SVG/Element/ellipse
leon-win Nov 13, 2023
c621d06
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/ellipse (#12578)
leon-win Nov 13, 2023
306c234
[ru]: fix broken links on docs/Web/SVG/Element/foreignObject
leon-win Nov 13, 2023
701d304
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/foreignObject …
leon-win Nov 13, 2023
e405e7e
[ru]: fix broken links on docs/Web/SVG/Element/line
leon-win Nov 13, 2023
87cd6c7
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/line (#12578)
leon-win Nov 13, 2023
6dbb048
[ru]: fix broken links on docs/Web/SVG/Element/path
leon-win Nov 13, 2023
59ed92d
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/path (#12578)
leon-win Nov 13, 2023
19337e1
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/linearGradient…
leon-win Nov 13, 2023
9cdb68a
[ru]: fix broken links on docs/Web/SVG/Element/pattern
leon-win Nov 13, 2023
280ad52
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/pattern (#12578)
leon-win Nov 13, 2023
3c528af
[ru]: fix broken links on docs/Web/SVG/Element/polygon
leon-win Nov 13, 2023
4f23ab5
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/polygon (#12578)
leon-win Nov 13, 2023
2685c3b
[ru]: fix broken links on docs/Web/SVG/Element/use
leon-win Nov 13, 2023
de9d340
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Element/use (#12578)
leon-win Nov 13, 2023
b75a21a
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/attributeNam…
leon-win Nov 13, 2023
615be1d
[ru]: fix broken links on docs/Web/SVG/Attribute/d
leon-win Nov 13, 2023
c1701b1
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/d (#12578)
leon-win Nov 13, 2023
7594a3a
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/dur (#12578)
leon-win Nov 13, 2023
b861cd3
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/id (#12578)
leon-win Nov 13, 2023
a1ced00
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/r (#12578)
leon-win Nov 13, 2023
091775f
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/ry (#12578)
leon-win Nov 13, 2023
37eed06
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/rx (#12578)
leon-win Nov 13, 2023
be6376b
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/stroke-linec…
leon-win Nov 13, 2023
2491e18
[ru]: fix broken links on docs/Web/SVG/Attribute/stroke-dashoffset
leon-win Nov 13, 2023
4822ce0
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/stroke-dasho…
leon-win Nov 13, 2023
486f0b0
[ru]: fix broken links on docs/Web/SVG/Attribute/viewBox
leon-win Nov 13, 2023
bc8f82e
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/viewBox (#12…
leon-win Nov 13, 2023
272334d
[ru]: fix MacroLiveSampleError on docs/Web/SVG/Attribute/width (#12578)
leon-win Nov 13, 2023
94e2b95
[ru]: fix MacroLiveSampleError on docs/Web/API/Intersection_Observer_…
leon-win Nov 13, 2023
1ff3316
[ru]: fix broken links on docs/Web/API/MediaStream_Recording_API/Reco…
leon-win Nov 13, 2023
0293285
[ru]: fix MacroLiveSampleError on docs/Web/API/MediaStream_Recording_…
leon-win Nov 13, 2023
12c68dc
[ru]: fix MacroLiveSampleError on docs/Web/API/Canvas_API/Tutorial/Co…
leon-win Nov 14, 2023
a5b4b75
[ru] fix link in files/ru/web/svg/attribute/viewbox/index.md
leon-win Nov 14, 2023
df49f92
[ru] fix link and formatting in files/ru/web/svg/attribute/stroke-das…
leon-win Nov 14, 2023
41596be
Merge branch 'main' into fix/12578/macro-live-sample-error
leon-win Nov 14, 2023
14224d8
Merge branch 'main' into fix/12578/macro-live-sample-error
leon-win Nov 15, 2023
636ac4a
Merge branch 'main' into fix/12578/macro-live-sample-error
leon-win Nov 15, 2023
d4a859c
Merge branch 'main' into fix/12578/macro-live-sample-error
sashasushko Nov 16, 2023
db98f4a
Merge branch 'main' into fix/12578/macro-live-sample-error
sashasushko Nov 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions files/ru/glossary/grid/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ If you place content outside of this explicit grid, or if you are relying on aut

В примере ниже отображена _точная сетка_ из трёх колонок и двух рядов. The _third_ row on the grid is an _implicit grid_ row track, formed due to their being more than the six items which fill the explicit tracks.

## Пример

```css hidden
* {
box-sizing: border-box;
Expand Down Expand Up @@ -54,7 +56,7 @@ If you place content outside of this explicit grid, or if you are relying on aut
</div>
```

{{ EmbedLiveSample('example', '500', '330') }}
{{ EmbedLiveSample('Пример', '500', '330') }}

## Дополнительные материалы

Expand All @@ -67,4 +69,4 @@ If you place content outside of this explicit grid, or if you are relying on aut

### Что почитать ещё

- Руководство по CSS Grid: _[Базовые принципы CSS сеток](/ru/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout)_
- Руководство по CSS Grid: _[Базовые принципы CSS сеток](/ru/docs/Web/CSS/CSS_grid_layout/Basic_concepts_of_grid_layout)_
4 changes: 1 addition & 3 deletions files/ru/web/api/canvas_api/tutorial/compositing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ slug: Web/API/Canvas_API/Tutorial/Compositing

См. [примеры компоновки](/ru/docs/Web/API/Canvas_API/Tutorial/Compositing/Example) кода из следующих примеров.

{{ EmbedLiveSample("Compositing_example", "100%", 6750, "" ,"Web/API/Canvas_API/Tutorial/Compositing/Example" )}}

## Обрезка контуров

![](canvas_clipping_path.png)Отсечённый контур похож на обычную форму холста, но он действует как маска, чтобы скрыть нежелательные части фигур. Это визуализируется на изображении справа. Форма красной звезды - наша отправочная дорожка. Все, что выходит за пределы этого пути, не будет нарисовано на холсте.
Expand Down Expand Up @@ -99,6 +97,6 @@ draw();

Все, что нарисовано после создания отсечённого контура, появится только внутри этого пути. Вы можете видеть это чётко в линейном градиенте, который нарисован далее. После этого набирается набор из 50 случайно расположенных и масштабированных звёзд, используя `drawStar()`. Снова звезды появляются только в пределах определённого обтравочного контура.

{{EmbedLiveSample("A_clip_example", "180", "180", "canvas_clip.png")}}
{{EmbedLiveSample("Пример_обрезки", 180, 190, "canvas_clip.png")}}

{{PreviousNext("Web/API/Canvas_API/Tutorial/Transformations", "Web/API/Canvas_API/Tutorial/Basic_animations")}}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ slug: Web/API/MediaStream_Recording_API/Recording_a_media_element

В статье Использование интерфейса MediaStream Recording API демонстрируется использование объекта типа {{domxref("MediaRecorder")}} для захвата потока, представляющего объект типа {{domxref("MediaStream")}} , сгенерированного аппаратными средствами устройства и возвращаемого методом {{domxref("MediaDevices.getUserMedia()","navigator.mediaDevices.getUserMedia()")}}, но можно также использовать HTML медиа элемент (а именно {{HTMLElement("audio")}} или {{HTMLElement("video")}}) в качестве источника потока `MediaStream` для его записи. В этой статье рассматривается пример выполняющий это.

## HTML содержимое
## Пример записи с помощью медиа элемента

### HTML

```html hidden
<p>
Expand Down Expand Up @@ -101,11 +103,11 @@ h2 {
}
```

## JavaScript
### JavaScript

Теперь давайте посмотрим на код JavaScript

### Установка глобальных переменных
#### Установка глобальных переменных

Мы начнём с установления некоторых глобальных переменных, которые нам понадобятся.

Expand All @@ -122,7 +124,7 @@ let recordingTimeMS = 5000;

Большинство из них являются ссылками на элементы, с которыми нам нужно работать. Последняя, `recordingTimeMS`, установлена на 5000 миллисекунд (5 секунд);.

### Используемые функции
#### Используемые функции

Далее мы создадим несколько служебных функций, которые будут использованы позже.

Expand All @@ -142,7 +144,7 @@ function wait(delayInMS) {

The `wait()` function returns a new {{jsxref("Promise")}} which resolves once the specified number of milliseconds have elapsed. It works by using an [arrow function](/ru/docs/Web/JavaScript/Reference/Functions/Arrow_functions) which calls {{domxref("window.setTimeout()")}}, specifying the promise's resolution handler as the timeout handler function. That lets us use promise syntax when using timeouts, which can be very handy when chaining promises, as we'll see later.

### Starting media recording
#### Starting media recording

The `startRecording()` function handles starting the recording process:

Expand Down Expand Up @@ -173,9 +175,9 @@ function startRecording(stream, lengthInMS) {
- Line 2
- : Creates the `MediaRecorder` that will handle recording the input `stream`.
- Line 3
- : Creates an empty array, `data`, which will be used to hold the {{domxref("Blob")}}s of media data provided to our {{domxref("MediaRecorder.ondataavailable", "ondataavailable")}} event handler.
- : Creates an empty array, `data`, which will be used to hold the {{domxref("Blob")}}s of media data provided to our {{domxref("MediaRecorder/dataavailable_event", "ondataavailable")}} event handler.
- Line 5
- : Sets up the handler for the {{event("dataavailable")}} event. The received event's `data` property is a {{domxref("Blob")}} that contains the media data. The event handler simply pushes the `Blob` onto the `data` array.
- : Sets up the handler for the {{domxref("MediaRecorder.dataavailable_event", "dataavailable")}} event. The received event's `data` property is a {{domxref("Blob")}} that contains the media data. The event handler simply pushes the `Blob` onto the `data` array.
- Lines 6-7
- : Starts the recording process by calling {{domxref("MediaRecorder.start", "recorder.start()")}}, and outputs a message to the log with the updated state of the recorder and the number of seconds it will be recording.
- Lines 9-12
Expand All @@ -185,7 +187,7 @@ function startRecording(stream, lengthInMS) {
- Lines 18-22
- : These lines create a new `Promise` which is fulfilled when both of the two `Promise`s (`stopped` and `recorded`) have resolved. Once that resolves, the array data is returned by `startRecording()` to its caller.

### Stopping the input stream
#### Stopping the input stream

The `stop()` function simply stops the input media:

Expand All @@ -197,7 +199,7 @@ function stop(stream) {

This works by calling {{domxref("MediaStream.getTracks()")}}, using {{jsxref("Array.forEach", "forEach()")}} to call {{domxref("MediaStreamTrack.stop()")}} on each track in the stream.

### Getting an input stream and setting up the recorder
#### Getting an input stream and setting up the recorder

Now let's look at the most intricate piece of code in this example: our event handler for clicks on the start button:

Expand Down Expand Up @@ -238,7 +240,7 @@ startButton.addEventListener(
);
```

When a {{event("click")}} event occurs, here's what happens:
When a {{domxref("Element/click_event", "click")}} event occurs, here's what happens:

- Lines 2-4
- : {{domxref("navigator.mediaDevices.getUserMedia()")}} is called to request a new {{domxref("MediaStream")}} that has both video and audio tracks. This is the stream we'll record.
Expand All @@ -248,7 +250,7 @@ When a {{event("click")}} event occurs, here's what happens:
- : When the preview video begins to play, we know there's media to record, so we respond by calling the [`startRecording()`](#starting_media_recording) function we created earlier, passing in the preview video stream (as the source media to be recorded) and `recordingTimeMS` as the number of milliseconds of media to record. As mentioned before, `startRecording()` returns a {{jsxref("Promise")}} whose resolution handler is called (receiving as input an array of {{domxref("Blob")}} objects containing the chunks of recorded media data) once recording has completed.
- Lines 11-15

- : The recording process's resolution handler receives as input an array of media data `Blob`s locally known as `recordedChunks`. The first thing we do is merge the chunks into a single {{domxref("Blob")}} whose MIME type is `"video/webm"` by taking advantage of the fact that the {{domxref("Blob.Blob", "Blob()")}} constructor concatenates arrays of objects into one object. Then {{domxref("URL.createObjectURL()")}} is used to create an URL that references the blob; this is then made the value of the recorded video playback element's [`src`](/ru/docs/Web/HTML/Element/video#src) attribute (so that you can play the video from the blob) as well as the target of the download button's link.
- : The recording process's resolution handler receives as input an array of media data `Blob`s locally known as `recordedChunks`. The first thing we do is merge the chunks into a single {{domxref("Blob")}} whose MIME type is `"video/webm"` by taking advantage of the fact that the {{domxref("Blob.Blob", "Blob()")}} constructor concatenates arrays of objects into one object. Then {{domxref("URL.createObjectURL_static", "URL.createObjectURL()")}} is used to create an URL that references the blob; this is then made the value of the recorded video playback element's [`src`](/ru/docs/Web/HTML/Element/video#src) attribute (so that you can play the video from the blob) as well as the target of the download button's link.

Then the download button's [`download`](/ru/docs/Web/HTML/Element/a#download) attribute is set. While the `download` attribute can be a Boolean, you can also set it to a string to use as the name for the downloaded file. So by setting the download link's `download` attribute to "RecordedVideo.webm", we tell the browser that clicking the button should download a file named `"RecordedVideo.webm"` whose contents are the recorded video.

Expand All @@ -257,9 +259,9 @@ When a {{event("click")}} event occurs, here's what happens:
- Line 20
- : The `catch()` for all the `Promise`s outputs the error to the logging area by calling our `log()` function.

### Handling the stop button
#### Handling the stop button

The last bit of code adds a handler for the {{event("click")}} event on the stop button using {{domxref("EventTarget.addEventListener", "addEventListener()")}}:
The last bit of code adds a handler for the {{domxref("Element/click_event", "click")}} event on the stop button using {{domxref("EventTarget.addEventListener", "addEventListener()")}}:

```js
stopButton.addEventListener(
Expand All @@ -277,7 +279,7 @@ This simply calls the [`stop()`](#stopping_the_input_stream) function we covered

When put all together with the rest of the HTML and the CSS not shown above, it looks and works like this:

{{ EmbedLiveSample('Example', 600, 440, "", "", "", "camera;microphone") }}
{{ EmbedLiveSample("Пример_записи_с_помощью_медиа_элемента", 600, 440) }}

You can {{LiveSampleLink("Example", "take a look at all the code")}}, including the parts hidden above because they aren't critical to the explanation of how the APIs are being used.

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/css/mix-blend-mode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ mix-blend-mode: unset;

## Примеры

### Влияние различных значений режима смешивания

```html hidden
<div class="grid">
<div class="col">
Expand Down Expand Up @@ -624,7 +626,7 @@ body {
}
```

{{EmbedLiveSample("mix-blend-mode", "100%", 1600, "", "", "example-outcome-frame")}}
{{EmbedLiveSample("Влияние_различных_значений_режима_смешивания", "100%", 1600)}}

### Пример HTML

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/attributename/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ slug: Web/SVG/Attribute/attributeName

Четыре элемента используют данный атрибут: {{SVGElement("animate")}}, {{SVGElement("animateColor")}}, {{SVGElement("animateTransform")}} и {{SVGElement("set")}}

## Пример

```css hidden
html,
body,
Expand All @@ -31,7 +33,7 @@ svg {
</svg>
```

{{EmbedLiveSample("topExample", "400", "250")}}
{{EmbedLiveSample("Пример", 400, 250)}}

## Контекст использования

Expand Down
6 changes: 4 additions & 2 deletions files/ru/web/svg/attribute/d/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ slug: Web/SVG/Attribute/d

Атрибут **`d`** предоставляет определение пути для рисования.

Определение пути - это [список команд пути](#Path_commands), в которых каждая команда состоит из буквы и некоторых чисел, представляющих параметр команды. Ниже приведены все возможные команды.
Определение пути - это [список команд пути](#path_commands), в которых каждая команда состоит из буквы и некоторых чисел, представляющих параметр команды. Ниже приведены все возможные команды.

Три элемента используют этот атрибут: {{SVGElement("path")}}, {{SVGElement("glyph")}}, и {{SVGElement("missing-glyph")}}

## Пример

```css hidden
html,
body,
Expand All @@ -32,7 +34,7 @@ svg {
</svg>
```

{{EmbedLiveSample('Example', '100%', 200)}}
{{EmbedLiveSample("Пример", '100%', 200)}}

## path

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/dur/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ slug: Web/SVG/Attribute/dur

Пять элементов используют данный атрибут: {{SVGElement("animate")}}, {{SVGElement("animateColor")}}, {{SVGElement("animateMotion")}}, {{SVGElement("animateTransform")}}, и {{SVGElement("set")}}

## Пример

```css hidden
html,
body,
Expand Down Expand Up @@ -40,7 +42,7 @@ svg {
</svg>
```

{{EmbedLiveSample("topExample", "220", "150")}}
{{EmbedLiveSample("Пример", 220, 150)}}

## Примечания к использованию

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ slug: Web/SVG/Attribute/id

Этот атрибут используется всеми элементами.

## Пример

```html
<svg
width="120"
Expand All @@ -28,7 +30,7 @@ slug: Web/SVG/Attribute/id
</svg>
```

{{EmbedLiveSample("topExample", "120", "120")}}
{{EmbedLiveSample("Пример", 120, 120)}}

## Примечания по использованию

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/r/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ slug: Web/SVG/Attribute/r

Этот атрибут используют два элемента: {{SVGElement("circle")}}, и {{SVGElement("radialGradient")}}

## Пример

```css hidden
html,
body,
Expand Down Expand Up @@ -40,7 +42,7 @@ svg {
</svg>
```

{{EmbedLiveSample('topExample', '100%', 200)}}
{{EmbedLiveSample("Пример", '100%', 200)}}

## circle

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/rx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ slug: Web/SVG/Attribute/rx

Два элемента используют этот атрибут: {{SVGElement("ellipse")}} и {{SVGElement("rect")}}

## Пример

```css hidden
html,
body,
Expand All @@ -29,7 +31,7 @@ svg {
</svg>
```

{{EmbedLiveSample('topExample', '100%', 200)}}
{{EmbedLiveSample("Пример", '100%', 200)}}

## ellipse

Expand Down
4 changes: 3 additions & 1 deletion files/ru/web/svg/attribute/ry/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ slug: Web/SVG/Attribute/ry

Два элемента используют этот атрибут: [`<ellipse>`](/ru/docs/Web/SVG/Element/ellipse) и [`<rect>`](/ru/docs/Web/SVG/Element/rect)

## Пример

```css hidden
html,
body,
Expand All @@ -29,7 +31,7 @@ svg {
</svg>
```

{{EmbedLiveSample('topExample', '100%', 200)}}
{{EmbedLiveSample("Пример", '100%', 200)}}

## ellipse

Expand Down
Loading
Loading