Skip to content

Commit 643c5c6

Browse files
authored
Merge pull request #6 from fisuda/patch
(ja) Update README.ja.md
2 parents 21a8c2f + fd20e56 commit 643c5c6

1 file changed

Lines changed: 30 additions & 51 deletions

File tree

README.ja.md

Lines changed: 30 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
[![License: MIT](https://img.shields.io/github/license/fiware/tutorials.Media-Streams.svg)](https://opensource.org/licenses/MIT)
55
[![Kurento 6.7.1](https://img.shields.io/badge/Kurento-6.7.1-4f3495.svg)](http://doc-kurento.readthedocs.io/)
66
[![Support badge](https://nexus.lab.fiware.org/repository/raw/public/badges/stackoverflow/fiware.svg)](https://stackoverflow.com/questions/tagged/fiware)
7-
<br/>
8-
[![Documentation](https://img.shields.io/readthedocs/fiware-tutorials.svg)](https://fiware-tutorials.rtfd.io)
7+
<br/> [![Documentation](https://img.shields.io/readthedocs/fiware-tutorials.svg)](https://fiware-tutorials.rtfd.io)
98

109
<!-- prettier-ignore -->
1110

@@ -576,15 +575,12 @@ function createMediaElements(pipeline, ws, callback) {
576575

577576
```javascript
578577
function connectMediaElements(webRtcEndpoint, callback) {
579-
webRtcEndpoint.connect(
580-
webRtcEndpoint,
581-
error => {
582-
if (error) {
583-
return callback(error);
584-
}
585-
return callback(null);
578+
webRtcEndpoint.connect(webRtcEndpoint, error => {
579+
if (error) {
580+
return callback(error);
586581
}
587-
);
582+
return callback(null);
583+
});
588584
}
589585
```
590586

@@ -638,9 +634,7 @@ function start() {
638634
onicecandidate: onIceCandidate
639635
};
640636
641-
webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(
642-
error
643-
) {
637+
webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(error) {
644638
if (error) return onError(error);
645639
this.generateOffer(onOffer);
646640
});
@@ -791,24 +785,18 @@ function createMediaElements(pipeline, ws, callback) {
791785

792786
```javascript
793787
function connectMediaElements(webRtcEndpoint, faceOverlayFilter, callback) {
794-
webRtcEndpoint.connect(
795-
faceOverlayFilter,
796-
error => {
788+
webRtcEndpoint.connect(faceOverlayFilter, error => {
789+
if (error) {
790+
return callback(error);
791+
}
792+
faceOverlayFilter.connect(webRtcEndpoint, error => {
797793
if (error) {
798794
return callback(error);
799795
}
800-
faceOverlayFilter.connect(
801-
webRtcEndpoint,
802-
error => {
803-
if (error) {
804-
return callback(error);
805-
}
806796
807-
return callback(null);
808-
}
809-
);
810-
}
811-
);
797+
return callback(null);
798+
});
799+
});
812800
}
813801
```
814802

@@ -952,41 +940,32 @@ function createMediaElements(pipeline, ws, callback) {
952940
return callback(error);
953941
}
954942

955-
pipeline.create(
956-
"platedetector.PlateDetectorFilter",
957-
(error, filter) => {
958-
if (error) {
959-
return callback(error);
960-
}
961-
962-
return callback(null, webRtcEndpoint, filter);
943+
pipeline.create("platedetector.PlateDetectorFilter", (error, filter) => {
944+
if (error) {
945+
return callback(error);
963946
}
964-
);
947+
948+
return callback(null, webRtcEndpoint, filter);
949+
});
965950
});
966951
}
967952
```
968953

969954
```javascript
970955
function connectMediaElements(webRtcEndpoint, filter, callback) {
971-
webRtcEndpoint.connect(
972-
filter,
973-
error => {
956+
webRtcEndpoint.connect(filter, error => {
957+
if (error) {
958+
return callback(error);
959+
}
960+
961+
filter.connect(webRtcEndpoint, error => {
974962
if (error) {
975963
return callback(error);
976964
}
977965

978-
filter.connect(
979-
webRtcEndpoint,
980-
error => {
981-
if (error) {
982-
return callback(error);
983-
}
984-
985-
return callback(null);
986-
}
987-
);
988-
}
989-
);
966+
return callback(null);
967+
});
968+
});
990969
}
991970
```
992971

0 commit comments

Comments
 (0)