Skip to content

Commit

Permalink
stop record when stop wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
liangzhuohua committed Jun 19, 2024
1 parent 51ce302 commit c57ba8d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ApplicationWindow {
NativeApi.onRtpStream.connect((sdpFile)=>{
play(sdpFile)
});
play('rtsp://newdev.rdapp.com:554/rtp/44050000001310000007?userId=253774045377');
}
TipsBox{
id:tips
Expand Down Expand Up @@ -116,11 +117,7 @@ ApplicationWindow {
width:parent.width
height: parent.height
property bool started:false
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked:{
function clickEvent() {
if(!recordTimer.started){
recordTimer.started = player.startRecord();
if(recordTimer.started){
Expand All @@ -140,6 +137,13 @@ ApplicationWindow {
}
}
}
MouseArea {
cursorShape: Qt.PointingHandCursor
anchors.fill: parent
onClicked:{
recordTimer.clickEvent();
}
}
}
}
}
Expand Down Expand Up @@ -388,6 +392,9 @@ ApplicationWindow {
}else{
NativeApi.Stop();
player.stop();
if(recordTimer.started){
recordTimer.clickEvent();
}
}
}
}
Expand Down

0 comments on commit c57ba8d

Please sign in to comment.