@flashphoner/websdk 2.0.205 → 2.0.209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- Web SDK - 2.0.205
1
+ Web SDK - 2.0.209
2
2
 
3
3
  [Download builds](https://docs.flashphoner.com/display/WEBSDK2EN/Web+SDK+release+notes)
4
4
 
@@ -79,18 +79,15 @@ function createSession(authToken) {
79
79
  registerRequired: registerRequired
80
80
  };
81
81
 
82
+ var connectionOptions = {
83
+ urlServer: url,
84
+ keepAlive: true
85
+ };
86
+
82
87
  if (authToken) {
83
- connectionOptions = {
84
- urlServer: url,
85
- authToken: authToken,
86
- keepAlive: true
87
- };
88
+ connectionOptions.authToken = authToken;
88
89
  } else {
89
- connectionOptions = {
90
- urlServer: url,
91
- sipOptions: sipOptions,
92
- keepAlive: false
93
- };
90
+ connectionOptions.sipOptions = sipOptions;
94
91
  }
95
92
 
96
93
  //create session
@@ -62,12 +62,9 @@ function init_page() {
62
62
  localVideo = document.getElementById("localVideo");
63
63
  remoteVideo = document.getElementById("remoteVideo");
64
64
 
65
- if(!Browser.isChrome() && !Browser.isFirefox()) {
65
+ if(Browser.isAndroid() || Browser.isiOS()) {
66
66
  $('#screenShareForm').hide();
67
67
  }
68
- if (!Browser.isFirefox()) {
69
- $('#mediaSourceForm').hide();
70
- }
71
68
 
72
69
  Flashphoner.getMediaDevices(null, true, MEDIA_DEVICE_KIND.OUTPUT).then(function (list) {
73
70
  list.audio.forEach(function (device) {
@@ -644,7 +641,7 @@ function switchToScreen() {
644
641
  if (publishStream) {
645
642
  $('#switchBtn').prop('disabled', true);
646
643
  $('#videoInput').prop('disabled', true);
647
- publishStream.switchToScreen($('#mediaSource').val()).catch(function () {
644
+ publishStream.switchToScreen($('#mediaSource').val(), true).catch(function () {
648
645
  $("#screenShareToggle").removeAttr("checked");
649
646
  $('#switchBtn').prop('disabled', false);
650
647
  $('#videoInput').prop('disabled', false);
@@ -29,7 +29,7 @@
29
29
  <h2 class="modal-title text-center text-danger">Warning!</h2>
30
30
  </div>
31
31
  <div class="modal-body text-center">
32
- <h2 class="text-primary">Screen sharing works only in Chrome and Firefox browsers on PC</h2>
32
+ <h2 class="text-primary">Screen sharing works only in desktop browsers</h2>
33
33
  </div>
34
34
  <div class="modal-footer">
35
35
  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
@@ -16,7 +16,7 @@ function init_page() {
16
16
  }
17
17
 
18
18
  var interval;
19
- if (Browser.isFirefox()) {
19
+ if (Browser.isFirefox() && !Browser.isAndroid() && !Browser.isiOS()) {
20
20
  $("#installExtensionButton").show();
21
21
  interval = setInterval(function() {
22
22
  if (Flashphoner.firefoxScreenSharingExtensionInstalled) {
@@ -0,0 +1,23 @@
1
+ .fp-Video {
2
+ border: 1px double black;
3
+ width: 322px;
4
+ height: 242px;
5
+ text-align: center;
6
+ background: #c0c0c0;
7
+ margin: 0 auto 0 auto;
8
+ }
9
+
10
+ .display {
11
+ width: 100%;
12
+ height: 100%;
13
+ display: inline-block;
14
+ }
15
+
16
+ .display > video, object {
17
+ width: 100%;
18
+ height: 100%;
19
+ }
20
+
21
+ video:-webkit-full-screen {
22
+ border-radius: 1px;
23
+ }
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link rel="stylesheet" href="../../dependencies/bootstrap/css/bootstrap.css">
7
+ <link rel="stylesheet" href="../../dependencies/bootstrap/font-awesome/css/font-awesome.min.css">
8
+ <link rel="stylesheet" href="stream-auto-restore.css">
9
+ <title>Streaming Auto Restore</title>
10
+ <script type="text/javascript" src="../../../../flashphoner.js"></script>
11
+ <script type="text/javascript" src="../../dependencies/jquery/jquery-1.12.0.js"></script>
12
+ <script type="text/javascript" src="../../dependencies/js/utils.js"></script>
13
+
14
+ <script type="text/javascript" src="stream-auto-restore.js"></script>
15
+ </head>
16
+ <body onload="init_page()">
17
+ <div class="container">
18
+ <div class="row">
19
+
20
+ <h2 id="notifyFlash" class="text-danger"></h2>
21
+
22
+ <div class="col-sm-9 text-center">
23
+
24
+ <h2 class="text-center">Streaming Auto Restore</h2>
25
+
26
+ <div class="col-sm-6">
27
+ <div class="text-center text-muted">Local</div>
28
+ <div class="fp-Video">
29
+ <div id="localVideo" class="display"></div>
30
+ </div>
31
+ <div id="streamerForm" class="input-group col-sm-10" style="margin: 10px auto 0 auto;">
32
+ <input class="form-control" type="text" id="publishStream" placeholder="Stream Name">
33
+ <div class="input-group-btn">
34
+ <button id="publishBtn" type="button" class="btn btn-default">Publish</button>
35
+ </div>
36
+ </div>
37
+ <div class="text-center" style="margin-top: 20px">
38
+ <div id="publishStatus"></div>
39
+ <div id="publishInfo"></div>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="col-sm-6">
44
+ <div class="text-center text-muted">Player</div>
45
+ <div class="fp-Video">
46
+ <div id="remoteVideo" class="display"></div>
47
+ </div>
48
+ <div id="playerForm" class="input-group col-sm-10" style="margin: 10px auto 0 auto;">
49
+ <input class="form-control" type="text" id="playStream" placeholder="Stream Name">
50
+ <div class="input-group-btn">
51
+ <button id="playBtn" type="button" class="btn btn-default">Play</button>
52
+ </div>
53
+ </div>
54
+ <div class="text-center" style="margin-top: 20px">
55
+ <div id="playStatus"></div>
56
+ <div id="playInfo"></div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div class="row row-space">
62
+ <div class="col-sm-5 col-sm-offset-2">
63
+ <div id="connectionForm" class="input-group">
64
+ <input class="form-control" id="urlServer" type="text">
65
+ <div class="input-group-btn">
66
+ <button id="connectBtn" type="button" class="btn btn-default">Connect</button>
67
+ </div>
68
+ </div>
69
+ <div class="text-center">
70
+ <div id="connectStatus"></div>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ <div id="bitrateForm">
75
+ <div class="row row-space">
76
+ <div class="form-group col-sm-6 col-sm-offset-2">
77
+ <label class="col-sm-3 control-label">Check bitrate</label>
78
+ <div class="col-sm-1">
79
+ <input type="checkbox" class="checkbox" checked id="checkBitrate" value="true">
80
+ </div>
81
+ </div>
82
+ </div>
83
+ <div class="row row-space">
84
+ <div class="form-group col-sm-6 col-sm-offset-2">
85
+ <label class="col-sm-3 control-label">Change codec</label>
86
+ <div class="col-sm-1">
87
+ <input type="checkbox" class="checkbox" checked id="changeCodec" value="true">
88
+ </div>
89
+ </div>
90
+ </div>
91
+ <div class="row row-space">
92
+ <div class="form-group col-sm-6 col-sm-offset-2">
93
+ <label class="col-sm-3 control-label">Bitrate check interval</label>
94
+ <div class="col-sm-3">
95
+ <input class="form-control" id="bitrateInteval" type="text">
96
+ </div>
97
+ </div>
98
+ </div>
99
+ <div class="row row-space">
100
+ <div class="form-group col-sm-6 col-sm-offset-2">
101
+ <label class="col-sm-3 control-label">Max tries</label>
102
+ <div class="col-sm-3">
103
+ <input class="form-control" id="bitrateMaxTries" type="text">
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ <div id="reconnectForm">
109
+ <div class="row row-space">
110
+ <div class="form-group col-sm-6 col-sm-offset-2">
111
+ <label class="col-sm-3 control-label">Restore connection</label>
112
+ <div class="col-sm-1">
113
+ <input type="checkbox" class="checkbox" checked id="restoreConnection" value="true">
114
+ </div>
115
+ </div>
116
+ </div>
117
+ <div class="row row-space">
118
+ <div class="form-group col-sm-6 col-sm-offset-2">
119
+ <label class="col-sm-3 control-label">Timeout</label>
120
+ <div class="col-sm-3">
121
+ <input class="form-control" id="restoreTimeout" type="text">
122
+ </div>
123
+ </div>
124
+ </div>
125
+ <div class="row row-space">
126
+ <div class="form-group col-sm-6 col-sm-offset-2">
127
+ <label class="col-sm-3 control-label">Max tries</label>
128
+ <div class="col-sm-3">
129
+ <input class="form-control" id="restoreMaxTries" type="text">
130
+ </div>
131
+ </div>
132
+ </div>
133
+ <div class="row row-space">
134
+ <div class="form-group col-sm-6 col-sm-offset-2">
135
+ <label class="col-sm-3 control-label">Missing pings</label>
136
+ <div class="col-sm-3">
137
+ <input class="form-control" id="maxPingsMissing" type="text">
138
+ </div>
139
+ </div>
140
+ </div>
141
+ <div class="row row-space">
142
+ <div class="form-group col-sm-6 col-sm-offset-2">
143
+ <label class="col-sm-3 control-label">Pings check period</label>
144
+ <div class="col-sm-3">
145
+ <input class="form-control" id="pingsPeriod" type="text">
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ </body>
152
+ </html>