Skip to content

Commit a96acdc

Browse files
authored
Merge pull request #231 from nathanGroovy/dev/sendnotimplemented
sendNotImplementedErrorUpdates
2 parents 7f5d81a + b205ffd commit a96acdc

File tree

2 files changed

+70
-65
lines changed

2 files changed

+70
-65
lines changed

Assets/AgoraEngine/Plugins/WebGL/AgoraWebGLSDK.jslib

Lines changed: 65 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -890,13 +890,13 @@ var LibraryAgoraWebGLSDK = {
890890
freeObject: function (obj) {},
891891
createAVideoDeviceManager: function () {},
892892
createMediaRecorder: function () {
893-
SendNotImplementedError()
893+
SendNotImplementedError("createMediaRecorder")
894894
},
895895
enableContentInspect: function (enabled, extraInfo, modulesInfo, modulesCount) {
896-
SendNotImplementedError()
896+
SendNotImplementedError("enableContentInspect")
897897
},
898898
enableLocalVoicePitchCallback: function (interval) {
899-
SendNotImplementedError()
899+
SendNotImplementedError("enableLocalVoicePitchCallback")
900900
},
901901
enableSpatialAudio: function (enabled) {
902902
enableSpatialAudio(enabled);
@@ -905,142 +905,142 @@ var LibraryAgoraWebGLSDK = {
905905
enableSpatialAudio_MC(enabled);
906906
},
907907
enableWirelessAccelerate: function (enabled) {
908-
SendNotImplementedError()
908+
SendNotImplementedError("enableWirelessAccelerate")
909909
},
910910
followSystemPlaybackDevice: function (enabled) {
911-
SendNotImplementedError()
911+
SendNotImplementedError("followSystemPlaybackDevice")
912912
},
913913
followSystemRecordingDevice: function (enabled) {
914-
SendNotImplementedError()
914+
SendNotImplementedError("followSystemRecordingDevice")
915915
},
916916
getAudioFileInfo: function (filePath) {
917-
SendNotImplementedError()
917+
SendNotImplementedError("getAudioFileInfo")
918918
},
919919
getAudioPlaybackDefaultDevice: function (deviceName, deviceId) {
920-
SendNotImplementedError()
920+
SendNotImplementedError("getAudioPlaybackDefaultDevice")
921921
},
922922
getAudioRecordingDefaultDevice: function (deviceName, deviceId) {
923-
SendNotImplementedError()
923+
SendNotImplementedError("getAudioRecordingDefaultDevice")
924924
},
925925
getAudioTrackCount: function () {
926-
SendNotImplementedError()
926+
SendNotImplementedError("getAudioTrackCount")
927927
},
928928
getCameraMaxZoomFactor: function () {
929-
SendNotImplementedError()
929+
SendNotImplementedError("getCameraMaxZoomFactor")
930930
},
931931
getScreenCaptureIconImage: function () {
932-
SendNotImplementedError()
932+
SendNotImplementedError("getScreenCaptureIconImage")
933933
},
934934
getScreenCaptureIsPrimaryMonitor: function (index) {
935-
SendNotImplementedError()
935+
SendNotImplementedError("getScreenCaptureIsPrimaryMonitor")
936936
},
937937
getScreenCaptureSourceId : function (index) {
938-
SendNotImplementedError()
938+
SendNotImplementedError("getScreenCaptureSourceId")
939939
},
940940
getScreenCaptureSourceName : function (index) {
941-
SendNotImplementedError()
941+
SendNotImplementedError("getScreenCaptureSourceName")
942942
},
943943
getScreenCaptureSourceProcessPath : function (index) {
944-
SendNotImplementedError()
944+
SendNotImplementedError("getScreenCaptureSourceProcessPath")
945945
},
946946
getScreenCaptureSourceTitle : function (index) {
947-
SendNotImplementedError()
947+
SendNotImplementedError("getScreenCaptureSourceTitle")
948948
},
949949
getScreenCaptureSourceType : function (index) {
950-
SendNotImplementedError()
950+
SendNotImplementedError("getScreenCaptureSourceType")
951951
},
952952
getScreenCaptureSources : function (thumbHeight, thumbWidth, iconHeight, iconWidth, includeScreen) {
953-
SendNotImplementedError()
953+
SendNotImplementedError("getScreenCaptureSources")
954954
},
955955
getScreenCaptureSourcesCount: function () {
956-
SendNotImplementedError()
956+
SendNotImplementedError("getScreenCaptureSourcesCount")
957957
},
958958
getScreenCaptureThumbImage: function (index, buffer) {
959-
SendNotImplementedError()
959+
SendNotImplementedError("getScreenCaptureThumbImage")
960960
},
961961
isCameraAutoFocusFaceModeSupported: function () {
962-
SendNotImplementedError()
962+
SendNotImplementedError("isCameraAutoFocusFaceModeSupported")
963963
},
964964
isCameraExposurePositionSupported: function () {
965-
SendNotImplementedError()
965+
SendNotImplementedError("isCameraExposurePositionSupported")
966966
},
967967
isCameraFocusSupported: function () {
968-
SendNotImplementedError()
968+
SendNotImplementedError("isCameraFocusSupported")
969969
},
970970
isCameraZoomSupported: function () {
971-
SendNotImplementedError()
971+
SendNotImplementedError("isCameraZoomSupported")
972972
},
973973
pauseAllChannelMediaRelay: function () {
974-
SendNotImplementedError()
974+
SendNotImplementedError("pauseAllChannelMediaRelay")
975975
},
976976
pauseAllChannelMediaRelay: function () {
977-
SendNotImplementedError()
977+
SendNotImplementedError("pauseAllChannelMediaRelay")
978978
},
979979
pushAudioFrame3_: function (sourcePos, audioFrameType, samples, bytesPerSample, channels, samplesPerSec, buffer, renderTimeMs, avsync_type) {
980-
SendNotImplementedError()
980+
SendNotImplementedError("pushAudioFrame3_")
981981
},
982982
pushVideoFrame2: function (type, format, bufferPtr, stride, height, cropLeft, cropTop, cropRight, cropBottom, rotation, timestamp) {
983-
SendNotImplementedError()
983+
SendNotImplementedError("pushVideoFrame2")
984984
},
985985
releaseMediaRecorder: function () {
986-
SendNotImplementedError()
986+
SendNotImplementedError("releaseMediaRecorder")
987987
},
988988
resumeAllChannelMediaRelay: function () {
989-
SendNotImplementedError()
989+
SendNotImplementedError("resumeAllChannelMediaRelay")
990990
},
991991
initEventOnMediaRecorderCallback: function (onRecorderStateChanged, onRecorderInfoUpdated) {
992-
SendNotImplementedError()
992+
SendNotImplementedError("initEventOnMediaRecorderCallback")
993993
},
994994
selectAudioTrack : function (index) {
995-
SendNotImplementedError()
995+
SendNotImplementedError("selectAudioTrack")
996996
},
997997
setAVSyncSource : function (channelId, uid) {
998-
SendNotImplementedError()
998+
SendNotImplementedError("setAVSyncSource")
999999
},
10001000
setAVSyncSource2 : function (channel, channelId, uid) {
1001-
SendNotImplementedError()
1001+
SendNotImplementedError("setAVSyncSource2")
10021002
},
10031003
setAudioMixingDualMonoMode : function (mode) {
1004-
SendNotImplementedError()
1004+
SendNotImplementedError("setAudioMixingDualMonoMode")
10051005
},
10061006
setAudioMixingDualMonoMode : function (speed) {
1007-
SendNotImplementedError()
1007+
SendNotImplementedError("setAudioMixingDualMonoMode")
10081008
},
10091009
setAudioMixingDualMonoMode : function (speed) {
1010-
SendNotImplementedError()
1010+
SendNotImplementedError("setAudioMixingDualMonoMode")
10111011
},
10121012
setCameraAutoFocusFaceModeEnabled : function (enabled) {
1013-
SendNotImplementedError()
1013+
SendNotImplementedError("setCameraAutoFocusFaceModeEnabled")
10141014
},
10151015
setCameraExposurePosition : function (positionXinView, positionYinView) {
1016-
SendNotImplementedError()
1016+
SendNotImplementedError("setCameraExposurePosition")
10171017
},
10181018
setCameraExposurePosition : function (positionXinView, positionYinView) {
1019-
SendNotImplementedError()
1019+
SendNotImplementedError("setCameraExposurePosition")
10201020
},
10211021
setCameraFocusPositionInPreview : function (positionX, positionY) {
1022-
SendNotImplementedError()
1022+
SendNotImplementedError("setCameraFocusPositionInPreview")
10231023
},
10241024
setAudioMixingPlaybackSpeed : function (speed) {
1025-
SendNotImplementedError()
1025+
SendNotImplementedError("setAudioMixingPlaybackSpeed")
10261026
},
10271027
setAudioMixingPlaybackSpeed : function (speed) {
1028-
SendNotImplementedError()
1028+
SendNotImplementedError("setAudioMixingPlaybackSpeed")
10291029
},
10301030
setCameraZoomFactor : function (factor) {
1031-
SendNotImplementedError()
1031+
SendNotImplementedError("setCameraZoomFactor")
10321032
},
10331033
setColorEnhanceOptions : function (enabled, strengthLevel, skinProtectLevel) {
1034-
SendNotImplementedError()
1034+
SendNotImplementedError("setColorEnhanceOptions")
10351035
},
10361036
setExternalAudioSourceVolume : function (sourcePos, volume) {
1037-
SendNotImplementedError()
1037+
SendNotImplementedError("setExternalAudioSourceVolume")
10381038
},
10391039
setLowlightEnhanceOptions : function (enabled, mode, level) {
1040-
SendNotImplementedError()
1040+
SendNotImplementedError("setLowlightEnhanceOptions")
10411041
},
10421042
setLowlightEnhanceOptions : function (enabled, mode, level) {
1043-
SendNotImplementedError()
1043+
SendNotImplementedError("setLowlightEnhanceOptions")
10441044
},
10451045
setRemoteUserSpatialAudioParams : function (uid, speaker_azimuth, speaker_elevation, speaker_distance, speaker_orientation, speaker_attenuation, enable_blur, enable_air_absorb) {
10461046
uid_Str = Pointer_stringify(uid);
@@ -1057,52 +1057,52 @@ var LibraryAgoraWebGLSDK = {
10571057
setRemoteUserSpatialAudioParams2(newUID, speaker_azimuth, speaker_elevation, speaker_distance, speaker_orientation, speaker_attenuation, blur, airAbsorb);
10581058
},
10591059
setScreenCaptureScenario : function () {
1060-
SendNotImplementedError()
1060+
SendNotImplementedError("setScreenCaptureScenario")
10611061
},
10621062
setVideoDenoiserOptions : function (enabled, mode, level) {
1063-
SendNotImplementedError()
1063+
SendNotImplementedError("setVideoDenoiserOptions")
10641064
},
10651065
startAudioDeviceLoopbackTest : function (indicationInterval) {
1066-
SendNotImplementedError()
1066+
SendNotImplementedError("startAudioDeviceLoopbackTest")
10671067
},
10681068
startEchoTest3 : function (view, enableAudio, enableVideo, token, channelId) {
1069-
SendNotImplementedError()
1069+
SendNotImplementedError("startEchoTest3")
10701070
},
10711071
startRecording : function () {
1072-
SendNotImplementedError()
1072+
SendNotImplementedError("startRecording")
10731073
},
10741074
startRtmpStreamWithTranscoding : function (url, width, height, videoBitrate, videoFramerate, lowLatency, videoGroup, video_codec_profile, backgroundColor, userCount, transcodingUserInfo, transcodingExtraInfo, metaData, watermarkRtcImageUrl, watermarkRtcImageX, watermarkRtcImageY, watermarkRtcImageWidth, watermarkRtcImageHeight, watermarkImageZorder, watermarkImageAlpha, watermarkCount, backgroundImageRtcImageUrl, backgroundImageRtcImageX, backgroundImageRtcImageY, backgroundImageRtcImageWidth, backgroundImageRtcImageHeight, backgroundImageRtcImageZorder, backgroundImageRtcImageAlpha, backgroundImageRtcImageCount, audioSampleRate, audioBitrate, audioChannels, audioCodecProfile, advancedFeatures, advancedFeatureCount) {
1075-
SendNotImplementedError()
1075+
SendNotImplementedError("startRtmpStreamWithTranscoding")
10761076
},
10771077
startRtmpStreamWithTranscoding2 : function (channel, url, width, height, videoBitrate, videoFramerate, lowLatency, videoGroup, video_codec_profile, backgroundColor, userCount, transcodingUserInfo, transcodingExtraInfo, metaData, watermarkRtcImageUrl, watermarkRtcImageX, watermarkRtcImageY, watermarkRtcImageWidth, watermarkRtcImageHeight, watermarkImageZorder, watermarkImageAlpha, watermarkCount, backgroundImageRtcImageUrl, backgroundImageRtcImageX, backgroundImageRtcImageY, backgroundImageRtcImageWidth, backgroundImageRtcImageHeight, backgroundImageRtcImageZorder, backgroundImageRtcImageAlpha, backgroundImageRtcImageCount, audioSampleRate, audioBitrate, audioChannels, audioCodecProfile, advancedFeatures, advancedFeatureCount) {
1078-
SendNotImplementedError()
1078+
SendNotImplementedError("startRtmpStreamWithTranscoding2")
10791079
},
10801080
startRtmpStreamWithoutTranscoding : function (url) {
1081-
SendNotImplementedError()
1081+
SendNotImplementedError("startRtmpStreamWithoutTranscoding")
10821082
},
10831083
startRtmpStreamWithoutTranscoding2 : function (channel, url) {
1084-
SendNotImplementedError()
1084+
SendNotImplementedError("startRtmpStreamWithoutTranscoding2")
10851085
},
10861086
stopAudioDeviceLoopbackTest : function () {
1087-
SendNotImplementedError()
1087+
SendNotImplementedError("stopAudioDeviceLoopbackTest")
10881088
},
10891089
stopRecording : function () {
1090-
SendNotImplementedError()
1090+
SendNotImplementedError("stopRecording")
10911091
},
10921092
stopRtmpStream : function (url) {
1093-
SendNotImplementedError()
1093+
SendNotImplementedError("stopRtmpStream")
10941094
},
10951095
stopRtmpStream2 : function (channel, url) {
1096-
SendNotImplementedError()
1096+
SendNotImplementedError("stopRtmpStream2")
10971097
},
10981098
takeSnapshot : function (channel, uid, filePath) {
1099-
SendNotImplementedError()
1099+
SendNotImplementedError("takeSnapshot")
11001100
},
11011101
updateRtmpTranscoding : function (width, height, videoBitrate, videoFramerate, lowLatency, videoGroup, video_codec_profile, backgroundColor, userCount, transcodingUserInfo, transcodingExtraInfo, metaData, watermarkRtcImageUrl, watermarkRtcImageX, watermarkRtcImageY, watermarkRtcImageWidth, watermarkRtcImageHeight, watermarkImageZorder, watermarkImageAlpha, watermarkCount, backgroundImageRtcImageUrl, backgroundImageRtcImageX, backgroundImageRtcImageY, backgroundImageRtcImageWidth, backgroundImageRtcImageHeight, backgroundImageRtcImageZorder, backgroundImageRtcImageAlpha, backgroundImageRtcImageCount, audioSampleRate, audioBitrate, audioChannels, audioCodecProfile, advancedFeatures, advancedFeatureCount) {
1102-
SendNotImplementedError()
1102+
SendNotImplementedError("updateRtmpTranscoding")
11031103
},
11041104
updateRtmpTranscoding2 : function (channel, width, height, videoBitrate, videoFramerate, lowLatency, videoGroup, video_codec_profile, backgroundColor, userCount, transcodingUserInfo, transcodingExtraInfo, metaData, watermarkRtcImageUrl, watermarkRtcImageX, watermarkRtcImageY, watermarkRtcImageWidth, watermarkRtcImageHeight, watermarkImageZorder, watermarkImageAlpha, watermarkCount, backgroundImageRtcImageUrl, backgroundImageRtcImageX, backgroundImageRtcImageY, backgroundImageRtcImageWidth, backgroundImageRtcImageHeight, backgroundImageRtcImageZorder, backgroundImageRtcImageAlpha, backgroundImageRtcImageCount, audioSampleRate, audioBitrate, audioChannels, audioCodecProfile, advancedFeatures, advancedFeatureCount) {
1105-
SendNotImplementedError()
1105+
SendNotImplementedError("updateRtmpTranscoding2")
11061106
},
11071107
adjustAudioMixingPlayoutVolume: function (volume) {
11081108
AdjustAudioMixingPlayoutVolume(volume);

Assets/WebGLTemplates/AgoraTemplate/AgoraWebSDK/agorartcenginev2.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ function getUserInfoByUid_WGL(uid) {
110110
}
111111
}
112112

113+
function SendNotImplementedError(api) {
114+
event_manager.raiseHandleUserError("9001", "The API:" + api + " is not supported.");
115+
console.warn("The API:" + api + " is not supported.");
116+
}
117+
113118
// Stops/Resumes sending the local video stream.
114119
async function enableLocalVideo(enabled) {
115120
client_manager.enableLocalVideo(enabled);

0 commit comments

Comments
 (0)