@flashphoner/websdk 2.0.256 → 2.0.258
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/docTemplate/README.md +1 -1
- package/examples/demo/streaming/media_devices_manager/manager.js +50 -3
- package/examples/demo/streaming/media_devices_manager/media_device_manager.html +14 -0
- package/examples/demo/streaming/screen-camera-mixer/screen-camera-mixer.html +50 -16
- package/examples/demo/streaming/screen-camera-mixer/screen-camera-mixer.js +47 -4
- package/flashphoner-no-flash.js +121 -14
- package/flashphoner-no-flash.min.js +2 -2
- package/flashphoner-no-webrtc.js +39 -1
- package/flashphoner-no-webrtc.min.js +1 -1
- package/flashphoner-no-wsplayer.js +121 -14
- package/flashphoner-no-wsplayer.min.js +2 -2
- package/flashphoner-room-api-webrtc-only.js +120 -13
- package/flashphoner-room-api-webrtc-only.min.js +1 -1
- package/flashphoner-room-api.js +117 -15
- package/flashphoner-room-api.min.js +2 -2
- package/flashphoner-temasys-flash-websocket-without-adapterjs.js +39 -1
- package/flashphoner-temasys-flash-websocket.js +39 -1
- package/flashphoner-temasys-flash-websocket.min.js +1 -1
- package/flashphoner-webrtc-only.js +120 -13
- package/flashphoner-webrtc-only.min.js +1 -1
- package/flashphoner.js +121 -14
- package/flashphoner.min.js +2 -2
- package/package.json +1 -1
- package/src/constants.d.ts +6 -0
- package/src/constants.js +6 -0
- package/src/flashphoner-core.d.ts +2 -0
- package/src/flashphoner-core.js +32 -0
- package/src/media-source-media-provider.js +1 -1
- package/src/webrtc-media-provider.js +78 -14
package/package.json
CHANGED
package/src/constants.d.ts
CHANGED
|
@@ -639,6 +639,12 @@ export const ERROR_INFO: Readonly<{
|
|
|
639
639
|
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
640
640
|
*/
|
|
641
641
|
CAN_NOT_SWITCH_MIC: string;
|
|
642
|
+
/**
|
|
643
|
+
* Error if cannot set a new resolution to the published track
|
|
644
|
+
* @event CAN_NOT_SET_RESOLUTION
|
|
645
|
+
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
646
|
+
*/
|
|
647
|
+
CAN_NOT_SET_RESOLUTION: string;
|
|
642
648
|
/**
|
|
643
649
|
* Local browser error detected
|
|
644
650
|
* @event LOCAL_ERROR
|
package/src/constants.js
CHANGED
|
@@ -648,6 +648,12 @@ const ERROR_INFO = Object.freeze({
|
|
|
648
648
|
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
649
649
|
*/
|
|
650
650
|
CAN_NOT_SWITCH_MIC: 'Number of mics is less than 2 or microphone is already used by other application',
|
|
651
|
+
/**
|
|
652
|
+
* Error if cannot set a new resolution to the published track
|
|
653
|
+
* @event CAN_NOT_SET_RESOLUTION
|
|
654
|
+
* @memberOf Flashphoner.constants.ERROR_INFO
|
|
655
|
+
*/
|
|
656
|
+
CAN_NOT_SET_RESOLUTION: 'Cannot switch a published stream resolution',
|
|
651
657
|
/**
|
|
652
658
|
* Local browser error detected
|
|
653
659
|
* @event LOCAL_ERROR
|
|
@@ -78,6 +78,8 @@ export declare class Stream {
|
|
|
78
78
|
switchToCam: () => void;
|
|
79
79
|
sendData: (payload: any) => void;
|
|
80
80
|
getLogger: () => any;
|
|
81
|
+
updateVideoSettings: (settings: any) => any;
|
|
82
|
+
updateVideoResolution: (resolution: any) => any
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
export declare class CreateStreamOptions {
|
package/src/flashphoner-core.js
CHANGED
|
@@ -2655,6 +2655,36 @@ var createSession = function (options) {
|
|
|
2655
2655
|
}
|
|
2656
2656
|
};
|
|
2657
2657
|
|
|
2658
|
+
/**
|
|
2659
|
+
* Update video publishing settings on the fly
|
|
2660
|
+
*
|
|
2661
|
+
* @param {Object} stream video settings: {maxBitrate, frameRate, scaleResolutionDownBy)}
|
|
2662
|
+
* @return {Promice} encodings object applied
|
|
2663
|
+
* @memberof Stream
|
|
2664
|
+
*/
|
|
2665
|
+
var updateVideoSettings = function(settings) {
|
|
2666
|
+
if (published() && mediaConnection) {
|
|
2667
|
+
return mediaConnection.updateVideoSettings(settings);
|
|
2668
|
+
} else {
|
|
2669
|
+
throw new Error("This function available for publishing stream only");
|
|
2670
|
+
}
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
/**
|
|
2674
|
+
* Update video publishing resolution on the fly
|
|
2675
|
+
*
|
|
2676
|
+
* @param {Object} stream video resolution: {width, height)}
|
|
2677
|
+
* @return {Promice} video constaints object applied
|
|
2678
|
+
* @memberof Stream
|
|
2679
|
+
*/
|
|
2680
|
+
var updateVideoResolution = function(resolution) {
|
|
2681
|
+
if (published() && mediaConnection) {
|
|
2682
|
+
return mediaConnection.updateVideoResolution(resolution);
|
|
2683
|
+
} else {
|
|
2684
|
+
throw new Error("This function available for publishing stream only");
|
|
2685
|
+
}
|
|
2686
|
+
};
|
|
2687
|
+
|
|
2658
2688
|
stream.play = play;
|
|
2659
2689
|
stream.publish = publish;
|
|
2660
2690
|
stream.stop = stop;
|
|
@@ -2694,6 +2724,8 @@ var createSession = function (options) {
|
|
|
2694
2724
|
stream.switchToCam = switchToCam;
|
|
2695
2725
|
stream.sendData = sendData;
|
|
2696
2726
|
stream.getLogger = getLogger;
|
|
2727
|
+
stream.updateVideoSettings = updateVideoSettings;
|
|
2728
|
+
stream.updateVideoResolution = updateVideoResolution;
|
|
2697
2729
|
|
|
2698
2730
|
streams[id_] = stream;
|
|
2699
2731
|
return stream;
|