Skip to content

Commit

Permalink
Merge branch 'release/2020.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
SUZUKI Tetsuya committed Feb 25, 2020
2 parents 83f61ae + 4c8a039 commit 59bd1e6
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 11 deletions.
12 changes: 12 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
- FIX
- バグ修正


## 2020.2

### CHANGE

- 受信時にマイクのパーミッションを要求しないようにした

### FIX

- ``Sora.remove(mediaChannel:)`` 実行時に ``onRemoveMediaChannel`` が呼ばれない事象を修正した


## 2020.1

本バージョンよりバージョン表記を「リリース年.リリース回数」に変更した。
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ platform :ios, '10.0'

target 'Sora' do
use_frameworks!
pod 'WebRTC', '79.5.0'
pod 'WebRTC', '79.5.0-shiguredo'
pod 'Starscream', '3.1.1'
end
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sora iOS SDK

[![CircleCI branch](https://img.shields.io/circleci/project/github/shiguredo/sora-ios-sdk/develop.svg)](https://github.com/shiguredo/sora-ios-sdk)
[![CircleCI branch](https://img.shields.io/circleci/project/github/shiguredo/sora-ios-sdk/develop.svg)](https://github.com/shiguredo/sora-ios-sdk)
[![GitHub tag](https://img.shields.io/github/tag/shiguredo/sora-ios-sdk.svg)](https://github.com/shiguredo/sora-ios-sdk)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

Expand All @@ -13,12 +13,16 @@ Sora iOS SDK は [WebRTC SFU Sora](https://sora.shiguredo.jp) の iOS クライ
We check PRs or Issues only when written in JAPANESE.
In other languages, we won't be able to deal with them. Thank you for your understanding.

## サポートについて
## Discord

Sora iOS SDK に関する質問・要望・バグなどの報告は Issues の利用をお願いします。
https://discord.gg/Ac9fJ9S

Sora iOS SDK に関する質問・要望などの報告は Disocrd へお願いします。

バグに関してはまず Discord へお願いします。
ただし、 Sora のライセンス契約の有無に関わらず、 Issue への応答時間と問題の解決を保証しませんのでご了承ください。

Sora iOS SDK に対する有償のサポートについては現在提供しておりません
Sora iOS SDK に対する有償のサポートについては提供しておりません

## システム条件

Expand Down Expand Up @@ -54,7 +58,7 @@ Xcode と Swift のバージョンによっては、 CocoaPods で取得でき
Apache License 2.0

```
Copyright 2017-2019, Shiguredo Inc. and Masashi Ono (akisute)
Copyright 2017-2020, Shiguredo Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions Sora.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Sora"
s.version = "2020.1"
s.version = "2020.2"
s.summary = "Sora iOS SDK"
s.description = <<-DESC
A library to develop Sora client applications.
Expand All @@ -16,6 +16,6 @@ Pod::Spec.new do |s|
s.source_files = "Sora/**/*.swift"
s.resources = ['Sora/info.json', 'Sora/*.xib']
s.prepare_command = 'sh Sora/info.sh'
s.dependency "WebRTC", "79.5.0"
s.dependency "WebRTC", "79.5.0-shiguredo"
s.dependency "Starscream", "3.1.1"
end
2 changes: 1 addition & 1 deletion Sora.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 2020.1;
MARKETING_VERSION = 2020.2;
PRODUCT_BUNDLE_IDENTIFIER = jp.shiguredo.sora.ios.sdk.Sora;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
Expand Down
27 changes: 26 additions & 1 deletion Sora/PeerChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,10 @@ class BasicPeerChannelContext: NSObject, RTCPeerConnectionDelegate {

var onConnectHandler: ((Error?) -> Void)?

private var lock: Lock
var isAudioInputInitialized: Bool = false

private var lock: Lock

init(channel: BasicPeerChannel) {
self.channel = channel
lock = Lock()
Expand Down Expand Up @@ -596,6 +598,8 @@ class BasicPeerChannelContext: NSObject, RTCPeerConnectionDelegate {
if configuration.videoEnabled {
switch configuration.videoCapturerDevice {
case .camera(let settings):
Logger.debug(type: .peerChannel,
message: "initialize video capture device")
// カメラが指定されている場合は、接続処理と同時にデフォルトのCameraVideoCapturerを使用してキャプチャを開始する
if CameraVideoCapturer.shared.isRunning {
CameraVideoCapturer.shared.stop()
Expand All @@ -610,6 +614,27 @@ class BasicPeerChannelContext: NSObject, RTCPeerConnectionDelegate {
}
}

if configuration.audioEnabled {
if !isAudioInputInitialized {
Logger.debug(type: .peerChannel,
message: "audio input is already initialized")
} else {
Logger.debug(type: .peerChannel,
message: "initialize audio input")
RTCAudioSession.sharedInstance().initializeInput { error in
if let error = error {
Logger.debug(type: .peerChannel,
message: "failed to initialize audio input => \(error.localizedDescription)")
return
}

Logger.debug(type: .peerChannel,
message: "audio input is initialized")
}
isAudioInputInitialized = true
}
}

if let track = stream.nativeVideoTrack {
nativeChannel.add(track,
streamIds: [stream.nativeStream.streamId])
Expand Down
2 changes: 1 addition & 1 deletion Sora/Sora.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public final class Sora {
if mediaChannels.contains(mediaChannel) {
Logger.debug(type: .sora, message: "remove media channel")
mediaChannels.remove(mediaChannel)
handlers.onAddMediaChannel?(mediaChannel)
handlers.onRemoveMediaChannel?(mediaChannel)
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions THANKS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
以下の人が Sora iOS SDK に貢献しています (アルファベット順) :

akisute
daihase
m-yoshimo
FromAtom
hkk
tamiyoshi-naka
tsuba-h
soudegesu

0 comments on commit 59bd1e6

Please sign in to comment.