소스 검색

Adds more utility methods to RTCUIHelper.

dev1
paweldomas 9 년 전
부모
커밋
79bafdd7c5
1개의 변경된 파일22개의 추가작업 그리고 0개의 파일을 삭제
  1. 22
    0
      modules/RTC/RTCUIHelper.js

+ 22
- 0
modules/RTC/RTCUIHelper.js 파일 보기

@@ -44,6 +44,28 @@ var RTCUIHelper = {
44 44
             }
45 45
         }
46 46
         return undefined;
47
+    },
48
+    /**
49
+     * Sets 'volume' property of given HTML element displaying RTC audio or
50
+     * video stream.
51
+     * @param streamElement HTML element to which the RTC stream is attached to.
52
+     * @param volume the volume value to be set.
53
+     */
54
+    setVolume: function (streamElement, volume) {
55
+        if (!RTCBrowserType.isIExplorer()) {
56
+            streamElement.volume = volume;
57
+        }
58
+    },
59
+    /**
60
+     * Sets 'autoplay' property of given HTML element displaying RTC audio or
61
+     * video stream.
62
+     * @param streamElement HTML element to which the RTC stream is attached to.
63
+     * @param autoPlay 'true' or 'false'
64
+     */
65
+    setAutoPlay: function (streamElement, autoPlay) {
66
+        if (!RTCBrowserType.isIExplorer()) {
67
+            streamElement.autoplay = true;
68
+        }
47 69
     }
48 70
 };
49 71
 

Loading…
취소
저장