File tree Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Expand file tree Collapse file tree 2 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,6 @@ struct Preference: Sendable {
2
2
// Temp
3
3
static nonisolated ( unsafe) var `default` = Preference ( )
4
4
5
- var uri : String ? = " rtmp://192.168.1.4 /live "
5
+ var uri : String ? = " rtmp://192.168.1.6 /live "
6
6
var streamName : String ? = " live "
7
7
}
Original file line number Diff line number Diff line change @@ -501,18 +501,20 @@ open class RTMPStream: IOStream {
501
501
readyState = . open
502
502
if let fcPublishName {
503
503
connection. call ( " FCUnpublish " , responder: nil , arguments: fcPublishName)
504
+ connection. call ( " deleteStream " , responder: nil , arguments: id)
505
+ } else {
506
+ connection. doOutput ( chunk: RTMPChunk (
507
+ type: . zero,
508
+ streamId: RTMPChunk . StreamID. command. rawValue,
509
+ message: RTMPCommandMessage (
510
+ streamId: id,
511
+ transactionId: 0 ,
512
+ objectEncoding: objectEncoding,
513
+ commandName: " closeStream " ,
514
+ commandObject: nil ,
515
+ arguments: [ ]
516
+ ) ) )
504
517
}
505
- connection. doOutput ( chunk: RTMPChunk (
506
- type: . zero,
507
- streamId: RTMPChunk . StreamID. command. rawValue,
508
- message: RTMPCommandMessage (
509
- streamId: 0 ,
510
- transactionId: 0 ,
511
- objectEncoding: self . objectEncoding,
512
- commandName: " closeStream " ,
513
- commandObject: nil ,
514
- arguments: [ self . id]
515
- ) ) )
516
518
}
517
519
518
520
func doOutput( _ type: RTMPChunkType , chunkStreamId: UInt16 , message: RTMPMessage ) {
You can’t perform that action at this time.
0 commit comments