@capturebridge/sdk 0.30.0 → 0.31.1
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.
- package/Device.js +9 -1
- package/README.md +2 -2
- package/Version.js +1 -1
- package/package.json +1 -1
package/Device.js
CHANGED
|
@@ -84,7 +84,15 @@ class Device {
|
|
|
84
84
|
streamUrl (streamOpt = {}) {
|
|
85
85
|
this.can('start_feed')
|
|
86
86
|
this.can('stop_feed')
|
|
87
|
-
|
|
87
|
+
|
|
88
|
+
// If the URL returned from this method is set as an `img` element's `src`
|
|
89
|
+
// the URL must change in order for a browser to reload the stream. So here,
|
|
90
|
+
// we've set a URL parameter that is different every invocation. This will
|
|
91
|
+
// cause the browser to always reload a stream. This "x" parameter has no
|
|
92
|
+
// meaning, its essentially a cache-breaker for the DOM.
|
|
93
|
+
const x = performance.now()
|
|
94
|
+
|
|
95
|
+
const mergedOpts = Object.assign({ x }, DEFAULT_STREAM_OPT, streamOpt)
|
|
88
96
|
const params = urlParamsToString(mergedOpts)
|
|
89
97
|
return `${this.baseUrl}/plugin/${this.plugin.id}/device/${this.id}/stream?${params}`
|
|
90
98
|
}
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Capture Bridge JavaScript Client SDK
|
|
2
2
|
|
|
3
|
-
- [SDK Documentation for v0.
|
|
4
|
-
- [SDK CHANGELOG](https://docs.capturebridge.net/client/sdk/javascript/0.
|
|
3
|
+
- [SDK Documentation for v0.31.1](https://docs.capturebridge.net/client/sdk/javascript/0.31.1/index.html)
|
|
4
|
+
- [SDK CHANGELOG](https://docs.capturebridge.net/client/sdk/javascript/0.31.1/CHANGELOG.html)
|
package/Version.js
CHANGED