Skip to content

Commit

Permalink
refs #1454
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed May 29, 2024
1 parent fcf5285 commit 4f22057
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Examples/macOS/PlaybackViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ final class PlaybackViewController: NSViewController {
}

@IBAction private func didTappedPlayback(_ button: NSButton) {
netStreamSwitcher.open(.playback)
if button.title == "Playback" {
button.title = "Close"
netStreamSwitcher.open(.playback)
} else {
button.title = "Playback"
netStreamSwitcher.close()
}
}
}
3 changes: 2 additions & 1 deletion Sources/IO/IOTellyUnit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ extension IOTellyUnit: Running {
guard isRunning.value else {
return
}
// https://github.com/shogo4405/HaishinKit.swift/issues/1454
mediaLink.stopRunning()
audioFormat = nil
videoFormat = nil
mediaLink.stopRunning()
isRunning.mutate { $0 = false }
}
}
Expand Down

0 comments on commit 4f22057

Please sign in to comment.