Skip to content

Commit

Permalink
Merge pull request #112 from SonicCloudOrg/v1.3.1-release
Browse files Browse the repository at this point in the history
V1.3.1 release
  • Loading branch information
ZhouYixun authored Feb 24, 2022
2 parents 16040ed + 6bf5300 commit 75d5693
Show file tree
Hide file tree
Showing 12 changed files with 669 additions and 173 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
█▄▄▄▄▄█▀ ██▄▄██ ██ ███ ▄▄██▄▄ ██▄▄▄▄█
▀▀▀▀▀ ▀▀▀▀ ▀▀ ▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀
version: 1.3.1-beta
version: 1.3.1-release
author: SonicCloudOrg
-->
<!DOCTYPE html>
Expand Down
15 changes: 13 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sonic-client-web",
"version": "1.3.1-beta",
"version": "1.3.1-release",
"author": "SonicCloudOrg",
"scripts": {
"dev": "vite",
Expand All @@ -12,6 +12,7 @@
"axios": "0.21.4",
"echarts": "5.2.1",
"element-plus": "1.1.0-beta.24",
"jmuxer": "^2.0.3",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"moment": "2.29.1",
Expand Down
17 changes: 16 additions & 1 deletion src/assets/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,19 @@ body,

.remote-tab .el-tabs__header {
margin-right: 0px !important;
}
}

.el-drawer__body {
overflow: auto;
padding: 20px 0 0 20px!important;
}

.refresh .el-switch__label{
color: #909399!important;
font-size:13px!important;
}

.refresh .el-switch__label.is-active{
color: #67C23A!important;
font-size:13px!important;
}
Binary file added src/assets/img/deltainno.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/components/StepShow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ defineProps({
>
{{ step.content }}
</span>
<span v-if="step.stepType === 'swipe2'">
<el-tag type="info" size="small">{{ step.elements[0]['eleName'] }}</el-tag>
<el-tag size="small" style="margin-left: 10px; margin-right: 10px"
>滑动拖拽到</el-tag
>
<el-tag type="info" size="small">{{ step.elements[1]['eleName'] }}</el-tag>
</span>
<span v-if="step.stepType === 'longPress'">
<el-tag size="small">长按控件元素</el-tag>
<el-tag
Expand Down
15 changes: 15 additions & 0 deletions src/components/StepUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ const androidOptions = ref([
value: "sendKeys",
label: "输入文本",
},
{
value: "swipe2",
label: "拖拽控件元素",
},
{
value: "longPress",
label: "长按控件元素",
Expand Down Expand Up @@ -542,6 +546,10 @@ const iOSOptions = ref([
value: "sendKeys",
label: "输入文本",
},
{
value: "swipe2",
label: "拖拽控件元素",
},
{
value: "longPress",
label: "长按控件元素",
Expand Down Expand Up @@ -885,6 +893,13 @@ onMounted(() => {
</el-form-item>
</div>

<div v-if="step.stepType === 'swipe2'">
<element-select label="从控件" place="请选择控件元素"
:index="0" :project-id="projectId" type="normal" :step="step"/>
<element-select label="拖拽到" place="请选择控件元素"
:index="1" :project-id="projectId" type="normal" :step="step"/>
</div>

<div v-if="step.stepType === 'longPress'">
<element-select label="控件元素" place="请选择控件元素"
:index="0" :project-id="projectId" type="normal" :step="step"/>
Expand Down
83 changes: 83 additions & 0 deletions src/lib/audio-processor/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* 音频接受处理器
*/
import JMuxer from 'jmuxer';
import Socket from './socket';

const DEFAULT_WS_URL = 'ws://localhost:8080';

export default class AudioProcessor {
constructor(options) {
const wsUrl = options.wsUrl || DEFAULT_WS_URL
/**
* node: 'player',
* mode: 'audio',
* debug: true,
* flushingTime: 0,
* wsUrl
*/
this.jmuxer = new JMuxer({
mode: 'audio',
flushingTime: 0,
// onReady() {
// console.log('Jmuxer audio init onReady!');
// },
// onError(data) {
// console.error('Buffer error encountered', data);
// },
...options
});
this.audioDom = document.getElementById(options.node)
this.initWebSocket(wsUrl)
}

initWebSocket(url) {
const that = this
this.ws = new Socket({
url,
binaryType: 'arraybuffer',
isErrorReconnect: false,
onmessage: function(event) {
var data = that.parse(event.data);
data && that.jmuxer.feed(data);
}
});
}

/**
* 音频解析
* @param {*} data AAC Buffer 视频流
* @returns
*/
parse(data) {
let input = new Uint8Array(data)

return {
audio: input
};
}

onPlay() {
this.audioDom.load()
const playPromise = this.audioDom.play()
if (playPromise !== undefined) {
playPromise.then(() => {
this.audioDom.play()
})
}
}

onPause() {
this.audioDom.pause()
}

onReload() {
this.audioDom.load()
}

onDestroy() {
this.ws.handleClose()
this.audioDom.pause()
this.jmuxer.destroy()
}
}
Loading

0 comments on commit 75d5693

Please sign in to comment.