Parcourir la source

doc: add documentation for setEffect method on JitsiTrack

dev1
Jaya Allamsetty il y a 5 ans
Parent
révision
d653773368
1 fichiers modifiés avec 16 ajouts et 0 suppressions
  1. 16
    0
      doc/API.md

+ 16
- 0
doc/API.md Voir le fichier

@@ -444,6 +444,22 @@ We have the following methods for controling the tracks:
444 444
 
445 445
 12. isEnded() - returns true if track is ended
446 446
 
447
+13. setEffect(effect) - Applies the effect by swapping out the existing MediaStream on the JitsiTrack with the new 
448
+
449
+    MediaStream which has the desired effect. "undefined" is passed to this function for removing the effect and for
450
+    
451
+    restoring the original MediaStream on the JitsiTrack.
452
+
453
+    The following methods have to be defined for the effect instance.
454
+
455
+    startEffect() - Starts the effect and returns a new MediaStream that is to be swapped with the existing one.
456
+
457
+    stopEffect() - Stops the effect.
458
+
459
+    isEnabled() - Checks if the local track supports the effect.
460
+
461
+    Note: This method is implemented only for the local tracks.
462
+
447 463
 JitsiTrackError
448 464
 ======
449 465
 The object represents error that happened to a JitsiTrack. Is inherited from JavaScript base ```Error``` object,

Chargement…
Annuler
Enregistrer