zelloptt / zello-channel-api Goto Github PK
View Code? Open in Web Editor NEWWebSocket-based API and SDKs to connect to Zello channels (BETA)
License: MIT License
WebSocket-based API and SDKs to connect to Zello channels (BETA)
License: MIT License
I have a test python client that encodes audio data in opus at 120 ms packet duration. IOS client doesn't play the audio sent to it. There is no indication on the client either.
However if i encoded the audio at 60ms eveerything works great.
Is there a limitation on the ios clients for opus packet duration supported ?
Please help
https://github.com/samirkumardas/opus-to-pcm/blob/master/src/opus-to-pcm.js shows a destroy
function that is not called by the SDK
I create this new issue as a stub for those looking for the same base thing as I do.
Let's keep it simple: how to send an mp3/wav/ogg file to a channel?
Sending a prerecordered message example from this repo kind of lacks the part were we pick the file itself. It's not actually clear what those fancy digits mean.
Thanks in advance!
Hi Guys, Thanks for the quick turn-around on the JS SDK - It's looking good!
I had a query RE: Authenticating:
When you create the ZCC.Session object, you provide it with the address for the Zello server, your authentication token, the name of the channel you are connecting to, and optionally a username and password.
In what cases is the username & password optional? In my testing I have to supply it. Am I missing a method of generating an auth token which includes the username and password? I'm hoping that is the case, because we'd rather not store zello credentials if we can help it.
If that is the case, could you provide some guidance on what that looks like?
Thanks in advance,
Tom
Hi,
We're currently building an integration using your JS SDK. Our app is using React and Webpack, transpiling ES6 with Babel.
We'd like to add your library to the bundle we create. We'd rather avoid relying on global variables, loading multiple files or forking your code.
Currently your webpack config builds multiple files and then uses scriptjs
to load required dependencies. That all makes sense for many cases. It's also very useful that each file has UMD format.
But is that possible to create a single bundle with no external dependencies?
For now to load the library I have tried code similar to:
import Sdk from "vendor/zello/zcc.sdk.js";
...
Sdk.init({
player: true,
recorder: false,
encoder: false,
widget: false
});
In order to make this work I needed a simple fix for the JS error (I'll send PR shortly). But still it doesn't correctly resolve paths to various files...
As a side note, have you considered adding JS SDK to npm?
Thank you,
Adam
in my case (electon-vue) need to do fix
if (src && src.match(/zcc.sdk\.js$/)) {
zello-channel-api/sdks/js/src/classes/sdk.js
Line 141 in a280728
Actually the channel is Hardcoded, but how change it whit a button for example.
Hi Zello Team,
I've been creating a basic browser client using the channel API. Login and receiving channel status is working nicely, but I'm having some trouble playing the audio in the stream data packets that are received.
My main source of reference is this section of API.md
:
Stream data
The same packet structure is used for any streamed data (e.g. audio) travelling both ways. The packet ID field is only used with the audio packets sent from the server to a client. Fields are stored in network byte order.{type(8) = 0x01, stream_id(32), packet_id(32), data[]}
But I'm not sure how I should be parsing the data received via the onmessage
callback on my websocket:
...
websocket = new WebSocket("wss://zello.io/ws");
websocket.onopen = function() {
print("Connection initialised...");
}
websocket.onclose = function() {
print("Connection closed...");
}
websocket.onerror = function(error) {
print("Connection Error: " + error);
}
websocket.onmessage = function(event) {
if (event.data instanceof Blob) {
// extract audio somehow?
audio_bytes = ??? event.data ???
audio_buffer.push(audio_bytes);
} else {
console.log(event.data);
}
}
...
Should I just be dropping the first 72 bytes (8 + 32 + 32) and appending to the buffer, or have I misunderstood? Any extra detail/example code would be most appreciated.
After connecting as a rider, I have an option to back out to the previous screen called "Select your role" by pressing "Cancel" where I will be presented with the "Disconnect" button. Similarly, after connecting as a driver, I can press the "Back" button and end up in the same place. The problem is that even though the app still appears to be connected to a channel, there's no way to get back to the main map screen. The only way to get back is by disconnecting to go to the main screen, choosing the same role, and hitting the "Connect" button on the second screen. I suggest to disconnect from the channel immediately and fall through all the way down to the first screen when the driver exits the map screen.
Would you please create an example for proper way to take a voice data stream so that it can be sent to api or saved to disk.
var GpcmData=[];
session.on('incoming_voice_data_decoded', function(pcmData, incomingMessage) {
GpcmData.push(pcmData);
if (!showIncomingDataChunks()) {
return;
}
appendLog(`<b>incoming_voice_data_decoded</b> id: <b>${incomingMessage.instanceId}</b>, data: ${pcmData.length} bytes`);
});
Dear support,
My app has to be able to listen to multiple channels at the same time.
It is similar to the Zello app from AppStore.
How can I implement it in my app?
Failed : error 0:50 [50]
2018-04-19 12:05:07.123538+0530 ZelloChannelDemo[15550:6672943] [ZCC] socket closed with error Error Domain=NSPOSIXErrorDomain Code=50 "Network is down" UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}
I am using this Python3 code in an attempt to stream an opus file to a channel:
if 'stream_id' in recv:
self.stream_id = int(recv['stream_id'])
with open('stream.opus', 'rb') as f:
raw_data = f.read()
self.ws.send(b'\x01' + self.stream_id.to_bytes(4, 'big') + raw_data)
But unfortunately it doesn't work. The connection drops as soon as I send that data.
Anyone know how to fix it?
Trying to repeat one of the examples with sending pre-precordered message and I get different errors in the console.
const zccPreRecorderedSend = () => {
// I'll be back from Terminator
let encodedBuffers = [
[88, 1, 242, 94, 114, 54, 146, 28, 217, 32, 18, 72, 135, 121, 24, 0, 129, 104, 229, 180, 250, 158, 160, 180, 176, 152, 40, 87, 126, 50, 226, 234, 30, 112, 154, 119, 32, 168, 10, 138, 124, 192],
[88, 2, 104, 146, 166, 145, 200, 23, 85, 73, 209, 89, 45, 162, 134, 247, 148, 108, 171, 58, 71, 113, 224, 115, 101, 235, 207, 167, 143, 254, 189, 65, 248, 251, 39, 139, 7, 12, 120, 162, 136, 93, 3, 217, 45, 59, 104, 183, 141, 198, 88],
[88, 225, 133, 148, 11, 113, 79, 203, 245, 33, 23, 1, 111, 242, 127, 166, 124, 77, 80, 206, 201, 4, 46, 120, 172, 180, 198, 175, 214, 17, 158, 107, 38, 208, 157, 86, 106, 116, 157, 134, 67, 11, 67, 72, 66, 63, 148, 57, 223, 187, 160, 221, 189, 230, 146, 206, 101, 105, 170, 212, 130, 69, 185, 2, 150, 40, 34, 137, 103, 191, 231, 179, 210, 132, 250, 175, 190, 8, 86, 238, 133, 49, 179, 160, 232, 74, 216, 48, 151, 87, 138, 236, 2, 42, 158, 8, 250, 0, 82, 18, 235, 250, 197, 1, 1, 16],
[88, 224, 69, 167, 149, 13, 204, 234, 144, 144, 140, 254, 76, 137, 65, 254, 48, 203, 168, 66, 102, 124, 25, 19, 73, 4, 35, 133, 154, 101, 172, 9, 5, 35, 71, 31, 53, 134, 49, 79, 211, 203, 88, 143, 204, 58, 212, 142, 111, 26, 122, 216, 110, 191, 247, 29, 222, 248, 223, 109, 211, 97, 5, 80, 124, 190, 230, 85, 117, 108, 115, 228, 137, 178, 247, 25, 137, 64, 249, 155, 211, 213, 1, 117, 204, 0, 50, 88, 105, 166, 68, 190, 37, 213, 77, 207, 207, 196, 212, 52, 63, 154, 120, 136, 18, 21, 13, 36, 234, 96, 169, 137, 161, 71, 57, 108, 38, 96, 188, 88, 19, 187, 203, 253, 239, 30, 68, 87, 80, 77, 42, 54, 224, 87, 140, 126, 45, 223, 55, 106, 137, 139, 176, 226, 100, 96, 112],
[88, 236, 166, 117, 201, 148, 178, 114, 149, 52, 65, 96, 94, 129, 37, 16, 40, 197, 207, 98, 221, 81, 178, 25, 221, 211, 28, 50, 18, 162, 38, 31, 120, 114, 16, 114, 192, 153, 80, 239, 26, 79, 146, 40, 186, 35, 38, 143, 43, 232, 123, 207, 70, 90, 11, 17, 204, 43, 81, 241, 194, 147, 104, 24, 121, 151, 21, 229, 173, 12, 30, 64, 1, 186, 203, 243, 152, 29, 67, 59, 209, 172, 141, 84, 150, 226, 117, 178, 9, 59, 35, 38, 167, 141, 132, 178, 213, 117, 65, 245, 154, 52, 100, 103, 82, 213, 172, 10, 221, 24, 111, 31, 65, 157, 133, 141, 19, 211, 234, 44, 77, 68, 88, 13, 108, 69, 109, 120, 229, 203, 139, 202, 188, 122, 61, 139, 245, 17, 65, 49, 142, 195, 10],
[88, 237, 139, 57, 111, 18, 88, 241, 88, 247, 24, 247, 97, 218, 121, 26, 205, 63, 118, 201, 29, 184, 28, 193, 210, 1, 45, 252, 20, 55, 245, 24, 199, 84, 83, 234, 189, 138, 107, 74, 236, 207, 77, 231, 202, 0, 33, 4, 225, 225, 67, 116, 143, 217, 239, 209, 226, 90, 36, 249, 112, 105, 32, 183, 252, 119, 155, 84, 38, 212, 224, 93, 231, 133, 126, 6, 126, 255, 133, 86, 101, 157, 207, 191, 40, 216, 10, 118, 18, 101, 12, 91, 92, 28, 73, 106, 193, 160, 126, 143, 60, 18, 211, 72, 81, 166, 148, 80, 192, 134, 209, 83, 115, 85, 254, 105, 19, 59, 156, 9, 3, 88, 16, 76, 181, 160, 38, 134, 155, 15, 77, 246, 237, 65, 196, 137, 183, 200, 62, 210, 16],
[88, 236, 243, 225, 74, 18, 11, 46, 42, 245, 198, 199, 14, 228, 166, 70, 108, 195, 97, 141, 237, 67, 9, 54, 91, 158, 43, 92, 168, 31, 121, 149, 179, 248, 80, 106, 108, 198, 252, 21, 31, 246, 175, 234, 108, 49, 215, 233, 238, 168, 252, 248, 144, 181, 36, 233, 248, 48, 212, 164, 139, 13, 24, 216, 52, 161, 49, 98, 61, 208, 111, 115, 10, 152, 46, 142, 216, 49, 159, 88, 179, 113, 142, 213, 45, 16, 136, 98, 237, 164, 107, 106, 149, 154, 116, 177, 131, 53, 224, 237, 39, 125, 45, 220, 110, 141, 121, 29, 100, 18, 230, 74, 181, 3, 14, 159, 149, 40, 205, 248, 104, 111, 169, 34, 255, 130, 160],
[88, 235, 132, 39, 124, 255, 126, 206, 63, 215, 134, 116, 18, 23, 143, 22, 18, 205, 241, 88, 217, 27, 43, 255, 83, 1, 184, 48, 25, 84, 83, 26, 171, 248, 163, 205, 27, 162, 56, 133, 121, 4, 52, 45, 29, 190, 1, 186, 25, 92, 151, 47, 124, 217, 234, 248, 231, 222, 212, 201, 164, 167, 32, 93, 119, 164, 189, 37, 87, 105, 228, 52, 114, 70, 25, 123, 113, 207, 59, 83, 145, 128, 36, 142, 141, 68, 6, 210, 104, 25, 1, 48, 169, 62, 142, 72, 213, 56, 26, 191, 82, 25, 140, 45, 190, 164, 246, 214, 214, 182, 73, 171, 168, 182, 221, 55, 203, 192, 38, 167, 218, 42, 30, 204, 92, 74, 145, 23, 152, 12, 146, 40, 161, 63, 141, 186, 91, 65, 157],
[88, 234, 64, 102, 12, 194, 175, 230, 190, 186, 205, 253, 1, 183, 73, 136, 82, 43, 24, 247, 0, 239, 84, 103, 66, 190, 166, 141, 94, 233, 241, 247, 41, 90, 155, 149, 8, 245, 163, 185, 30, 26, 49, 125, 249, 160, 78, 95, 47, 190, 106, 28, 171, 224, 186, 112, 161, 96, 139, 62, 95, 82, 229, 247, 177, 30, 186, 41, 224, 244, 238, 190, 217, 116, 121, 253, 17, 0, 220, 213, 202, 0, 236, 71, 104, 79, 241, 147, 227, 16, 114, 208, 131, 155, 233, 248, 230, 103, 42, 179, 144, 89, 18, 155, 171, 62, 156, 147, 84, 2, 173, 146, 239, 204, 88, 32, 49, 73, 61, 9, 43, 73, 227, 90, 122, 169, 209, 233, 216, 188, 74, 65, 54, 230, 1, 84, 242, 254, 235, 236, 96, 224],
[88, 236, 255, 150, 112, 156, 1, 139, 0, 137, 142, 227, 3, 117, 170, 100, 188, 26, 75, 16, 43, 139, 226, 20, 242, 228, 3, 76, 184, 171, 248, 28, 19, 254, 230, 11, 193, 85, 94, 104, 172, 16, 189, 213, 146, 51, 146, 151, 119, 3, 74, 111, 116, 84, 32, 20, 222, 79, 154, 97, 168, 7, 55, 242, 159, 75, 168, 159, 249, 16, 178, 149, 60, 51, 12, 225, 190, 47, 75, 81, 254, 202, 57, 233, 12, 17, 105, 70, 69, 9, 174, 17, 219, 124, 238, 109, 85, 116, 113, 97, 21, 12, 131, 223, 210, 167, 47, 242, 190, 195, 235, 208, 78, 44, 199, 198, 146, 237, 188, 192],
[88, 236, 92, 133, 67, 66, 59, 222, 43, 100, 83, 158, 151, 232, 102, 209, 102, 72, 52, 231, 78, 55, 12, 188, 56, 17, 179, 99, 46, 90, 153, 240, 113, 103, 53, 47, 127, 117, 209, 140, 132, 76, 213, 95, 246, 227, 42, 126, 50, 17, 156, 228, 5, 212, 135, 128, 54, 68, 151, 142, 235, 212, 135, 125, 149, 86, 181, 33, 81, 239, 154, 99, 118, 218, 135, 236, 220, 25, 142, 118, 119, 140, 241, 222, 144, 95, 150, 75, 229, 34, 201, 240, 138, 112, 14, 159, 89, 45, 170, 14, 80, 254, 108, 222, 195, 66, 77, 56, 173, 227, 99, 107, 239, 113, 253, 209, 38, 168, 158, 173, 142, 61, 206, 94, 159, 44, 41, 52, 7, 104, 32],
[88, 234, 205, 249, 182, 249, 112, 161, 216, 222, 58, 231, 239, 157, 223, 223, 164, 6, 60, 68, 31, 173, 48, 23, 205, 235, 161, 246, 86, 89, 213, 125, 49, 67, 69, 120, 9, 229, 25, 95, 56, 50, 65, 242, 255, 205, 227, 210, 102, 138, 102, 106, 43, 28, 149, 58, 0, 90, 183, 50, 124, 31, 14, 5, 90, 114, 12, 162, 52, 23, 11, 3, 236, 51, 85, 127, 133, 244, 12, 140, 46, 184, 122, 76, 183, 71, 45, 124, 56, 179, 212, 213, 124, 217, 109, 84, 76, 0, 149, 72, 184, 202, 12, 222, 118, 138, 108, 126, 1, 6, 205, 176, 35, 230, 57, 102, 232, 74, 207, 9, 218, 42, 233, 252, 102, 194, 113, 110, 19, 25, 54, 242, 38, 24],
[88, 237, 170, 30, 87, 40, 46, 37, 236, 10, 133, 217, 180, 203, 66, 212, 180, 240, 199, 128, 88, 171, 219, 223, 118, 169, 35, 176, 139, 192, 83, 161, 206, 14, 211, 33, 202, 10, 179, 179, 255, 35, 72, 188, 110, 230, 94, 167, 29, 64, 138, 59, 137, 209, 144, 129, 222, 214, 230, 236, 31, 185, 190, 169, 218, 134, 77, 209, 3, 113, 128, 151, 66, 131, 120, 220, 223, 163, 91, 213, 1, 249, 138, 81, 151, 61, 214, 126, 53, 86, 57, 233, 31, 213, 8, 18, 24, 183, 113, 82, 109, 155, 188, 247, 253, 77, 196, 42, 111, 179, 224, 221, 26, 166, 231, 244, 211, 167, 175, 62, 210, 199, 224],
[88, 238, 52, 216, 85, 14, 25, 155, 71, 210, 82, 240, 231, 91, 91, 73, 230, 79, 15, 128, 209, 32, 150, 186, 91, 180, 100, 119, 33, 83, 152, 91, 120, 226, 142, 226, 117, 239, 162, 6, 187, 125, 21, 122, 133, 229, 23, 246, 74, 34, 249, 122, 65, 78, 154, 42, 127, 131, 64, 65, 108, 150, 5, 255, 209, 97, 78, 53, 254, 94, 190, 143, 99, 105, 189, 183, 124, 108, 241, 227, 76, 97, 177, 173, 31, 219, 129, 244, 19, 132, 191, 230, 2, 120, 45, 48, 111, 35, 201, 180, 167, 125, 248, 202, 108, 26, 228, 120, 9, 173, 224, 220, 160],
[88, 238, 250, 210, 110, 204, 94, 99, 19, 18, 221, 218, 24, 28, 220, 167, 95, 85, 238, 53, 223, 161, 170, 190, 14, 232, 102, 241, 103, 110, 23, 231, 156, 132, 189, 83, 59, 207, 9, 160, 197, 180, 196, 118, 114, 99, 158, 10, 177, 139, 50, 13, 26, 55, 198, 18, 46, 158, 190, 72, 129, 54, 3, 207, 16, 16, 14, 239, 195, 253, 208, 237, 11, 188, 122, 89, 28, 42, 134, 97, 101, 167, 239, 180, 243, 4, 148, 35, 198, 46, 140, 205, 96, 11, 218, 196, 248, 61, 174, 176, 176, 86, 200, 33, 42, 208, 239, 19, 177, 95, 144, 135, 124, 45, 208, 223, 18, 24, 108, 4],
[88, 193, 76, 73, 88, 247, 178, 208, 150, 14, 33, 15, 138, 122, 238, 50, 48, 37, 219, 194, 240, 118, 64, 59, 41, 111, 188, 86, 167, 57, 237, 126, 137, 188, 81, 70, 193, 62, 69, 153, 135, 20, 145, 46, 89, 13, 211, 140, 44, 112, 227, 123, 193, 173, 101, 246, 16, 240, 121, 105, 41, 252, 242, 188, 208],
[88, 6, 11, 130, 75, 95, 183, 27, 195, 224, 160, 175, 213, 130, 22, 152, 102, 2, 96, 79, 227, 238, 0, 181, 73, 2, 52, 38, 52, 203, 95, 127, 252, 224, 151, 101, 8, 43, 222, 143, 218, 39, 46, 220, 113, 247, 163, 133, 136, 228, 30, 23, 207, 88, 34, 35],
[88, 2, 153, 193, 125, 14, 69, 252, 77, 196, 217, 82, 167, 199, 190, 93, 157, 1, 150, 37, 236, 10, 212, 6, 25, 232, 146, 137, 212, 189, 203, 238, 89, 61, 91, 248, 69, 193, 60, 156, 210, 59, 39, 108, 146, 128, 233]
];
let outgoingMessage = null;
let CustomEncoder = function() {
let self = this;
self.sendBuffer();
};
CustomEncoder.prototype.sendBuffer = function() {
let self = this;
let buffer = encodedBuffers.shift();
if (buffer) {
self.ondata(new Uint8Array(buffer));
setTimeout(function() {
self.sendBuffer();
}, 60);
} else {
outgoingMessage.stop();
}
};
const options = {
autoStart: true,
encoderSampleRate: 16000,
encoderFrameSize: 60,
encoder: CustomEncoder,
};
console.log("Starting sending pre-recordered message...");
outgoingMessage = session.startVoiceMessage(options);
};
The output:
Starting sending pre-recordered message...
[10] zcc.outgoingmessage.js:1 Uncaught TypeError: e.encoder.encode is not a function
at t.options.recorder.options.recorder.ondata (zcc.outgoingmessage.js:1)
at t.value (zcc.recorder.js:1)
at ScriptProcessorNode.scriptProcessorNode.onaudioprocess (zcc.recorder.js:1)
options.recorder.options.recorder.ondata @ zcc.outgoingmessage.js:1
value @ zcc.recorder.js:1
scriptProcessorNode.onaudioprocess @ zcc.recorder.js:1
zcc.recorder.js:1 Uncaught TypeError: this.encoder.postMessage is not a function
at t.value (zcc.recorder.js:1)
at t.value (zcc.outgoingmessage.js:1)
at t.value (zcc.outgoingmessage.js:1)
at CustomEncoder.sendBuffer (Channel.js:106)
at Channel.js:103
What does it mean?
JS lib version: 0.4
When I inspect packets of zellowork, There is something named codec_header, like this: "codec_header":"BACRw/zk97nOVhDYKFmGltB5" . I want to know what is the format of codec_header? It's more than frequency and framesPerPacket and frameSize.
I wonder is there a way to list channel users using JavaScript SDK or natively via web sockets API.
It would be really awesome to have it working as would allow us to create administrative bots, reminders and notifications and etc.
It would be nice if Developers could rapidly adopt the SDK via Swift Package Manager that will be available in Xcode 11.
Steps to reproduce:
This is related to the closed issue: #15
I'm responding to @agatx 's comment:
If your scenario requires rapid creation of connections from the same IP please contact us with details about what you are trying to accomplish.
One of the potential use cases for our integration is having a large number of users logging on and testing their Zello comms while all connected to the same wifi network (imagine a training course, or a briefing session or similar).
Because they are all on the same wifi network, their external IPs will be the same, and thus will share the 10 connections/minute/IP restrictions that are currently in place.
The issue is made worse by the JS SDK re-trying a failed connection multiple times. So if a user get's their password wrong, the login is retried until the connection limit is reached, which then blocks other users on the same wifi network.
Preventing retries in the event of bad credentials, and raising the limit to 50 requests/min/IP would probably avoid this issue for us in the foreseeable future.
Thanks,
Tom
Dear Zelloptt,
I have downloaded the ZelloChannelKit for iOS and install into 2 devices the ZellochanelDemo app.
I added my development token and logged in as driver from the first device and as rider in the second. Unfortunately I couldn't make any communication, as the messages don't appear to be playing in either device.
Also in an example I tried, but the session.startVoiceMessage() function always returns nil.
Both devices have accepted the microphone usage.
Thanks.
How long is a token valid?
I am trying to configure this setting, to reuse the token, but the connection is not established.
const crypto = require('crypto');
const tokenExpirationSeconds = 1440;
class TokenManager {
static createJwt(issuer, privateKey) {
if (!issuer || !privateKey) {
return false;
}
const header = {
alg: 'RS256',
typ: 'JWT'
};
const payload = {
iss: issuer,
exp: parseInt(new Date().getTime() / 1000, 10) + tokenExpirationSeconds
};
const pkg = Buffer.from(JSON.stringify(header)).toString('base64') + "." + Buffer.from(JSON.stringify(payload)).toString('base64');
const sign = crypto.createSign('RSA-SHA256');
sign.update(pkg);
const signature = sign.sign(privateKey, 'base64');
return pkg + "." + signature;
}
}
module.exports = TokenManager;
How to get (js) sender info from incoming message?
Integrated the SDK as suggested in the docs but somehow my app is constantly crashing after I added the PTT related code. Can you please help?
Log attached here
I am using python and a websocket, but I am unable to. Is this the right way to send it?
ws.send(json.dumps({"type(8)": "0x01", "stream_id(32)": stop, "data": data}))
Thanks
Hi!
Is it possible use library on server side?
const {Sdk} = require('./zcc.sdk')
Hi Zello team,
We've been doing an integration with your Javascript SDK and i've encountered a weird transient issue. I'm not sure how to reproduce it but I thought it was worth flagging up.
Every so often, even if there's nobody talking, when trying to send a message I get "Channel is not ready" errors sent back. The documentation indicates that this means that the channel is not online, and I should wait for an event to say that the channel is online. However, the channel is online, i've already had that data come through, and there's nobody chatting on it.
Furthermore, when logged into the official Zello mobile app as another user, I can send messages through that fine.
Any help you could give in solving this would be greatly appreciated.
Cheers,
Matt.
Hello Allan here, I come through this message to heal a doubt.
I would like to know if the Zello Channels SDK for android is compatible with androidx. grade.properties {
android.enableJetifier = true
android.useAndroidX = true
org.gradle.jvmargs = -Xmx1536m
}
I'm getting error at compile time "Warning: com.my.pkg.Channel: can not find referenced class com.zello.channel.sdk.SessionListener $ DefaultImpls"
Thank you.
How to save data?
Inactive state should return a rejected promise
I am using zello-channel-api to build a python client and using it to listen in and also send audio to my channels of interest.
However, when i send the following start_stream command after successfully connecting to my channel
Done sending {'command': 'start_stream', 'seq': 2, 'type': 'audio', 'codec': 'opus', 'codec_header': 'gD4BPA==', 'packet_duration': 60}
I see the below response from the Zello Server
server ... > {"error":"no phone","seq":2}
How do i interpret this error ? and how do i get pass this error to be able to send audio packets from my python client to my channels.
I have written some python code to connect to a channel, stream, remove first 9 bytes from the data packets, condense them into one text file and save.
From there I am having trouble turning that raw data into and audio file using python. I have seen the opus encoding stuff but cannot figure out how to use it correctly, currently the file just plays a quick burst of static when played with pyaudio and when b64decode/encode is used before before playing.
Hi!
I'm using JS library v.0.4.
Token is generated just today.
I wrote a sample web app which implemenets basic functions like joining a channel, sending text and voice messages.
The problem is that while I can perfectly join some channels, I can't join others.
Here is a screenshot of Chrome console:
And the output is:
Client.js:14 Initializing...
Client.js:18 ZCC SDK loaded.
Client.js:39 Connecting...
Client.js:43 Connected: {refresh_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJaQ…fQ==.DOnGmjso5/k7oNVkNUPdVE929OUigSiv0Lmk91scI3E=", success: true, seq: 1}
zcc.session.js:1 Uncaught Error: Uncaught, unspecified 'error' event.
at t.f.emit (zcc.session.js:1)
at t.value (zcc.session.js:1)
at t.value (zcc.session.js:1)
at t.value (zcc.session.js:1)
at WebSocket.<anonymous> (zcc.session.js:1)
f.emit @ zcc.session.js:1
value @ zcc.session.js:1
value @ zcc.session.js:1
value @ zcc.session.js:1
(anonymous) @ zcc.session.js:1
...
The error message repeats 5 more times.
What can be the reason for not joining a channel?
Might it be some "russian letters" in its name? (it has "Ш" letter for example)
Also this channel is private but I do can join it* using this account from Zello.
Ideas?
Hi Zello team,
Apologies for creating more than one issue in quick succession, especially as this isn't an issue but a request.
We've noticed that when you use a hardware PTT button in the Zello app, you get a tone when you press it to indicate that you can speak. Is this tone, along with any other tones that Zello uses, available for use by us in our own integrations?
Cheers,
Matt.
Hey,
I am trying to use the Javascript SDK in an angular app. I added the script tag with the url from the docs, but when trying to initialize:
ZCC.Sdk.init({
player: true,
recorder: true,
encoder: true,
widget: true
})
.then(function () {
console.log('zcc.init.success')
})
.catch(function(err) {
console.error('zcc.init.failed', err);
})
an error is thrown from zcc.sdk.js Uncaught TypeError: Cannot read property 'match' of null.
I looked deeper and it has to do with the getMyUrl method, getAttribute('src') may return null, it's not being handled.
Hi, In iOS no playing the audio, receive the stream ut no playing.
LOG says:
Incoming stream not found, ignoring end.
This only hapens when i send audio from this SDK Android, when send audio from ZelloWork App works fine.
on most channels I try to implement, https://github.com/zelloptt/zello-channel-api/blob/master/sdks/js/examples/05-custom-recorder-echo.html.
Always gives this error.
custom-recorder-echo.html: 436 Uncaught TypeError: Cannot read property 'instanceId' of undefined
at t. (custom-recorder-echo.html: 436)
at t.f.emit (zcc.session.js: 1)
at t.value (zcc.session.js: 1)
at t.value (zcc.session.js: 1)
at t.value (zcc.session.js: 1)
at WebSocket. (zcc.session.js: 1)
on Android: com.zello.com.embeddable.demo V/ZelloChannels: [i] Incoming voice matching id stream_id not found
'But on some channels it works'
Already tried to reconfigure the channel, but always causes this error mentioned above
We have slated adding images to the project, and since Zello's Cocoa team primarily does iOS development we may accidentally pigeon hole ourselves into UIKit. The consequence of this is presenting users from easily using our SDK on macOS and iOS. Certainly, project Catalyst is a workaround for this however some potential SDK users may be veteran Cocoa developers and not thrilled with the idea of having to learn CocoaTouch to write a macOS app. As we want to encourage as widespread of adoption as we can we should endeavor to make sure our framework compile for MacOS/iOS with feature parity.
Related to #68 - we need to know if the recording device fails for some reason during its lifecycle. Let's discuss approach before we commit changes
I'm unable to keep the client trusted within a channel, it also removes any moderator or admin privileges when logging out.
When I try to connect to more than one channel I get this error message:
Uncaught Error: Uncaught, unspecified 'error' event.
at t.f.emit (zcc.session.js:1)
at t.value (zcc.session.js:1)
at t.value (zcc.session.js:1)
at t.value (zcc.session.js:1)
at WebSocket.<anonymous> (zcc.session.js:1)
It's actually the same as I was getting yesterday: #49 but now it seems to be reproducable for any two channels. Sure this error is not the same as in the referenced issue.
I use a development token.
JS library version is 0.4
Hello,
I am working on a Python script that would allow pushing audio files into Zello channel. However it is unclear to me how to convert the audio data into the format that Zello would accept.
codec_header
and packet_duration
fields in start_stream
request?packet_duration
to 200 milliseconds, like it was in the documentation example and passing 200 ms long Ogg file, but that didn't work - probably because Ogg is container format that wraps Opus format within. However, how do I get the exact data that Zello server expects to receive? I looked at RFC7845 and suspect that maybe it's Ogg audio data page payload, but I'm not sure?Is there a way to use ffmpeg or some other tooling to convert arbitrary audio data in a format that Zello server can accept?
I can't find a way to connect to channels that are set to use a password. I can connect to other public channels fine. Is there an option that needs to be set in the var session = new ZCC.Session({… call.
Hi,
We're hitting Too Many Requests error when using JS SDK and using this simple code:
const session = new ZCC.Session({
serverUrl,
channel,
authToken,
username,
password
});
session.connect();
In Chrome:
WebSocket connection to 'wss://zellowork.io/ws/***' failed: Error during WebSocket handshake: Unexpected response code: 429
In Safari:
WebSocket connection to 'wss://zellowork.io/ws/***' failed: Unexpected response code: 429
That happens both using developer tokens and production ones. It's intermittent but more often fails than works. Across multiple machines and for different user credentials.
I've checked docs (AUTH.md) and (API.md) but I couldn't find any info about this error: what are the actual limits and how to fix.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.